Mercurial > vim
comparison runtime/syntax/lex.vim @ 22:cc049b00ee70
updated for version 7.0014
author | vimboss |
---|---|
date | Thu, 02 Sep 2004 19:12:26 +0000 |
parents | 3fc0f57ecb91 |
children | 125e80798a85 |
comparison
equal
deleted
inserted
replaced
21:db5102f7e29f | 22:cc049b00ee70 |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: Lex | 2 " Language: Lex |
3 " Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> | 3 " Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> |
4 " Last Change: Sep 02, 2003 | 4 " Last Change: Jul 28, 2004 |
5 " Version: 4 | 5 " Version: 5 |
6 " URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax | 6 " URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax |
7 " | 7 " |
8 " Option: | 8 " Option: |
9 " lex_uses_cpp : if this variable exists, then C++ is loaded rather than C | 9 " lex_uses_cpp : if this variable exists, then C++ is loaded rather than C |
10 | 10 |
30 else | 30 else |
31 so <sfile>:p:h/c.vim | 31 so <sfile>:p:h/c.vim |
32 endif | 32 endif |
33 endif | 33 endif |
34 | 34 |
35 " --- ========= --- | |
35 " --- Lex stuff --- | 36 " --- Lex stuff --- |
37 " --- ========= --- | |
36 | 38 |
37 "I'd prefer to use lex.* , but it doesn't handle forward definitions yet | 39 "I'd prefer to use lex.* , but it doesn't handle forward definitions yet |
38 syn cluster lexListGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatString,lexPatTag,lexPatTag,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,lexPatCode,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenError | 40 syn cluster lexListGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatString,lexPatTag,lexPatTag,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,lexPatCode,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenError |
39 syn cluster lexListPatCodeGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatTag,lexPatTag,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenError | 41 syn cluster lexListPatCodeGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatTag,lexPatTag,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenError |
40 | 42 |
41 " Abbreviations Section | 43 " Abbreviations Section |
42 syn region lexAbbrvBlock start="^\([a-zA-Z_]\+\t\|%{\)" end="^%%$"me=e-2 skipnl nextgroup=lexPatBlock contains=lexAbbrv,lexInclude,lexAbbrvComment | 44 syn region lexAbbrvBlock start="^\(\h\+\s\|%{\)" end="^\ze%%$" skipnl nextgroup=lexPatBlock contains=lexAbbrv,lexInclude,lexAbbrvComment,lexStartState |
43 syn match lexAbbrv "^\I\i*\s"me=e-1 skipwhite contained nextgroup=lexAbbrvRegExp | 45 syn match lexAbbrv "^\I\i*\s"me=e-1 skipwhite contained nextgroup=lexAbbrvRegExp |
44 syn match lexAbbrv "^%[sx]" contained | 46 syn match lexAbbrv "^%[sx]" contained |
45 syn match lexAbbrvRegExp "\s\S.*$"lc=1 contained nextgroup=lexAbbrv,lexInclude | 47 syn match lexAbbrvRegExp "\s\S.*$"lc=1 contained nextgroup=lexAbbrv,lexInclude |
46 syn region lexInclude matchgroup=lexSep start="^%{" end="%}" contained contains=ALLBUT,@lexListGroup | 48 syn region lexInclude matchgroup=lexSep start="^%{" end="%}" contained contains=ALLBUT,@lexListGroup |
47 syn region lexAbbrvComment start="^\s\+/\*" end="\*/" contains=@Spell | 49 syn region lexAbbrvComment start="^\s\+/\*" end="\*/" contains=@Spell |
50 syn region lexStartState matchgroup=lexAbbrv start="^%\a\+" end="$" contained | |
48 | 51 |
49 "%% : Patterns {Actions} | 52 "%% : Patterns {Actions} |
50 syn region lexPatBlock matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPat,lexPatTag,lexPatComment | 53 syn region lexPatBlock matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPat,lexPatTag,lexPatComment |
51 syn region lexPat start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 contained nextgroup=lexMorePat,lexPatSep contains=lexPatString,lexSlashQuote,lexBrace | 54 syn region lexPat start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 contained nextgroup=lexMorePat,lexPatSep contains=lexPatString,lexSlashQuote,lexBrace |
52 syn region lexBrace start="\[" skip=+\\\\\|\\+ end="]" contained | 55 syn region lexBrace start="\[" skip=+\\\\\|\\+ end="]" contained |
79 " The default highlighting. | 82 " The default highlighting. |
80 hi def link lexSlashQuote lexPat | 83 hi def link lexSlashQuote lexPat |
81 hi def link lexBrace lexPat | 84 hi def link lexBrace lexPat |
82 hi def link lexAbbrvComment lexPatComment | 85 hi def link lexAbbrvComment lexPatComment |
83 | 86 |
87 hi def link lexAbbrvRegExp Macro | |
84 hi def link lexAbbrv SpecialChar | 88 hi def link lexAbbrv SpecialChar |
85 hi def link lexAbbrvRegExp Macro | |
86 hi def link lexCFunctions Function | 89 hi def link lexCFunctions Function |
87 hi def link lexMorePat SpecialChar | 90 hi def link lexMorePat SpecialChar |
91 hi def link lexPatComment Comment | |
88 hi def link lexPat Function | 92 hi def link lexPat Function |
89 hi def link lexPatComment Comment | |
90 hi def link lexPatString Function | 93 hi def link lexPatString Function |
91 hi def link lexPatTag Special | 94 hi def link lexPatTag Special |
92 hi def link lexSep Delimiter | 95 hi def link lexSep Delimiter |
96 hi def link lexStartState Statement | |
93 | 97 |
94 let b:current_syntax = "lex" | 98 let b:current_syntax = "lex" |
95 | 99 |
96 " vim:ts=10 | 100 " vim:ts=10 |