On Mon, Mar 8, 2010 at 12:07 AM, Charles E Campbell Jr
<[email protected]> wrote:
> Dominique Pellé wrote:
>>
>> Hi
>>
>> Attached patch fixes a syntax highlighting problem in Vim-7.2.385
>> when opening the attached flex file "foo.l".
>>
>> Notice how syntax hightlighting is wrong right after
>> "<def_mode>{ID}" in the first screenshot.
>>
>> http://dominique.pelle.free.fr/pic/flex-syntax-highlighting-before.png
>> http://dominique.pelle.free.fr/pic/flex-syntax-highlighting-after.png
>>
>
> Unfortunately this patch destroys the capability to handle "start condition
> scopes".
>
> <SCs>{
> list of rules (ith <SCs> prefixes automatically applied)
> }
>
> A SCs is a list of one or more start conditions. See
> http://dinosaur.compilertools.net/flex/manpage.html .
You're right. I was aware of the "start conditions" (my sample
flex file which showed broken syntax highlighting in Vim
contained one) but I was not aware of the "start condition
scopes". Hmmm, it's harder to fix the highlighting problem
then. Curly braces are used for all kind of things in flex files:
- in regexes to match something n times: (e.g. r{2,5})
- in references to name definitions (e.g. {DIGIT})
- for start condition scopes, which can be nested
multiple times (e.g. <SCs>{ ... })
- to delimit the action (these should always have space(s)
before them according to your link)
I'm don't really know vim syntax file enough yet to fix.
Time to read ":help syntax"...
-- Dominique
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php