codekingpro/portable-devtools
114k
1 2" Vim syntax file3" Language: AfLex (from Lex syntax file)4" Maintainer: Mathieu Clabaut <mathieu.clabaut@free.fr>5" LastChange: 02 May 20016" Original: Lex, maintained by Dr. Charles E. Campbell, Jr.7" Comment: Replaced sourcing c.vim file by ada.vim and rename lex*8" in aflex*9 10" quit when a syntax file was already loaded11if exists("b:current_syntax")12 finish13endif14 15" Read the Ada syntax to start with16runtime! syntax/ada.vim17unlet b:current_syntax18 19 20" --- AfLex stuff ---21 22"I'd prefer to use aflex.* , but it doesn't handle forward definitions yet23syn cluster aflexListGroup contains=aflexAbbrvBlock,aflexAbbrv,aflexAbbrv,aflexAbbrvRegExp,aflexInclude,aflexPatBlock,aflexPat,aflexBrace,aflexPatString,aflexPatTag,aflexPatTag,aflexPatComment,aflexPatCodeLine,aflexMorePat,aflexPatSep,aflexSlashQuote,aflexPatCode,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut224syn cluster aflexListPatCodeGroup contains=aflexAbbrvBlock,aflexAbbrv,aflexAbbrv,aflexAbbrvRegExp,aflexInclude,aflexPatBlock,aflexPat,aflexBrace,aflexPatTag,aflexPatTag,aflexPatComment,aflexPatCodeLine,aflexMorePat,aflexPatSep,aflexSlashQuote,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut225 26" Abbreviations Section27syn region aflexAbbrvBlock start="^\([a-zA-Z_]\+\t\|%{\)" end="^%%$"me=e-2 skipnl nextgroup=aflexPatBlock contains=aflexAbbrv,aflexInclude,aflexAbbrvComment28syn match aflexAbbrv "^\I\i*\s"me=e-1 skipwhite contained nextgroup=aflexAbbrvRegExp29syn match aflexAbbrv "^%[sx]" contained30syn match aflexAbbrvRegExp "\s\S.*$"lc=1 contained nextgroup=aflexAbbrv,aflexInclude31syn region aflexInclude matchgroup=aflexSep start="^%{" end="%}" contained contains=ALLBUT,@aflexListGroup32syn region aflexAbbrvComment start="^\s\+/\*" end="\*/"33 34"%% : Patterns {Actions}35syn region aflexPatBlock matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=aflexPat,aflexPatTag,aflexPatComment36syn region aflexPat start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 contained nextgroup=aflexMorePat,aflexPatSep contains=aflexPatString,aflexSlashQuote,aflexBrace37syn region aflexBrace start="\[" skip=+\\\\\|\\+ end="]" contained38syn region aflexPatString matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ contained39syn match aflexPatTag "^<\I\i*\(,\I\i*\)*>*" contained nextgroup=aflexPat,aflexPatTag,aflexMorePat,aflexPatSep40syn match aflexPatTag +^<\I\i*\(,\I\i*\)*>*\(\\\\\)*\\"+ contained nextgroup=aflexPat,aflexPatTag,aflexMorePat,aflexPatSep41syn region aflexPatComment start="^\s*/\*" end="\*/" skipnl contained contains=cTodo nextgroup=aflexPatComment,aflexPat,aflexPatString,aflexPatTag42syn match aflexPatCodeLine ".*$" contained contains=ALLBUT,@aflexListGroup43syn match aflexMorePat "\s*|\s*$" skipnl contained nextgroup=aflexPat,aflexPatTag,aflexPatComment44syn match aflexPatSep "\s\+" contained nextgroup=aflexMorePat,aflexPatCode,aflexPatCodeLine45syn match aflexSlashQuote +\(\\\\\)*\\"+ contained46syn region aflexPatCode matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" skipnl contained contains=ALLBUT,@aflexListPatCodeGroup47 48syn keyword aflexCFunctions BEGIN input unput woutput yyleng yylook yytext49syn keyword aflexCFunctions ECHO output winput wunput yyless yymore yywrap50 51" <c.vim> includes several ALLBUTs; these have to be treated so as to exclude aflex* groups52syn cluster cParenGroup add=aflex.*53syn cluster cDefineGroup add=aflex.*54syn cluster cPreProcGroup add=aflex.*55syn cluster cMultiGroup add=aflex.*56 57" Synchronization58syn sync clear59syn sync minlines=30060syn sync match aflexSyncPat grouphere aflexPatBlock "^%[a-zA-Z]"61syn sync match aflexSyncPat groupthere aflexPatBlock "^<$"62syn sync match aflexSyncPat groupthere aflexPatBlock "^%%$"63 64" Define the default highlighting.65" Only when an item doesn't have highlighting yet66hi def link aflexSlashQuote aflexPat67hi def link aflexBrace aflexPat68hi def link aflexAbbrvComment aflexPatComment69 70hi def link aflexAbbrv SpecialChar71hi def link aflexAbbrvRegExp Macro72hi def link aflexCFunctions Function73hi def link aflexMorePat SpecialChar74hi def link aflexPat Function75hi def link aflexPatComment Comment76hi def link aflexPatString Function77hi def link aflexPatTag Special78hi def link aflexSep Delimiter79 80let b:current_syntax = "aflex"81 82" vim:ts=1083 