1" Vim syntax file 2" Language: lace 3" Maintainer: Jocelyn Fiat <[email protected]> 4" Last Change: 2001 May 09 5 6" Copyright Interactive Software Engineering, 1998 7" You are free to use this file as you please, but 8" if you make a change or improvement you must send 9" it to the maintainer at <[email protected]> 10 11 12" quit when a syntax file was already loaded 13if exists("b:current_syntax") 14 finish 15endif 16 17" LACE is case insensitive, but the style guide lines are not. 18 19if !exists("lace_case_insensitive") 20 syn case match 21else 22 syn case ignore 23endif 24 25" A bunch of useful LACE keywords 26syn keyword laceTopStruct system root default option visible cluster 27syn keyword laceTopStruct external generate end 28syn keyword laceOptionClause collect assertion debug optimize trace 29syn keyword laceOptionClause profile inline precompiled multithreaded 30syn keyword laceOptionClause exception_trace dead_code_removal 31syn keyword laceOptionClause array_optimization 32syn keyword laceOptionClause inlining_size inlining 33syn keyword laceOptionClause console_application dynamic_runtime 34syn keyword laceOptionClause line_generation 35syn keyword laceOptionMark yes no all 36syn keyword laceOptionMark require ensure invariant loop check 37syn keyword laceClusterProp use include exclude 38syn keyword laceAdaptClassName adapt ignore rename as 39syn keyword laceAdaptClassName creation export visible 40syn keyword laceExternal include_path object makefile 41 42" Operators 43syn match laceOperator "\$" 44syn match laceBrackets "[[\]]" 45syn match laceExport "[{}]" 46 47" Constants 48syn keyword laceBool true false 49syn keyword laceBool True False 50syn region laceString start=+"+ skip=+%"+ end=+"+ contains=laceEscape,laceStringError 51syn match laceEscape contained "%[^/]" 52syn match laceEscape contained "%/\d\+/" 53syn match laceEscape contained "^[ \t]*%" 54syn match laceEscape contained "%[ \t]*$" 55syn match laceStringError contained "%/[^0-9]" 56syn match laceStringError contained "%/\d\+[^0-9/]" 57syn match laceStringError "'\(%[^/]\|%/\d\+/\|[^'%]\)\+'" 58syn match laceCharacter "'\(%[^/]\|%/\d\+/\|[^'%]\)'" contains=laceEscape 59syn match laceNumber "-\=\<\d\+\(_\d\+\)*\>" 60syn match laceNumber "\<[01]\+[bB]\>" 61syn match laceNumber "-\=\<\d\+\(_\d\+\)*\.\(\d\+\(_\d\+\)*\)\=\([eE][-+]\=\d\+\(_\d\+\)*\)\=" 62syn match laceNumber "-\=\.\d\+\(_\d\+\)*\([eE][-+]\=\d\+\(_\d\+\)*\)\=" 63syn match laceComment "--.*" contains=laceTodo 64 65 66syn case match 67 68" Case sensitive stuff 69 70syn keyword laceTodo TODO XXX FIXME 71syn match laceClassName "\<[A-Z][A-Z0-9_]*\>" 72syn match laceCluster "[a-zA-Z][a-zA-Z0-9_]*\s*:" 73syn match laceCluster "[a-zA-Z][a-zA-Z0-9_]*\s*(\s*[a-zA-Z][a-zA-Z0-9_]*\s*)\s*:" 74 75" Catch mismatched parentheses 76syn match laceParenError ")" 77syn match laceBracketError "\]" 78syn region laceGeneric transparent matchgroup=laceBrackets start="\[" end="\]" contains=ALLBUT,laceBracketError 79syn region laceParen transparent start="(" end=")" contains=ALLBUT,laceParenError 80 81" Should suffice for even very long strings and expressions 82syn sync lines=40 83 84" Define the default highlighting. 85" Only when an item doesn't have highlighting yet 86 87hi def link laceTopStruct PreProc 88 89hi def link laceOptionClause Statement 90hi def link laceOptionMark Constant 91hi def link laceClusterProp Label 92hi def link laceAdaptClassName Label 93hi def link laceExternal Statement 94hi def link laceCluster ModeMsg 95 96hi def link laceEscape Special 97 98hi def link laceBool Boolean 99hi def link laceString String 100hi def link laceCharacter Character 101hi def link laceClassName Type 102hi def link laceNumber Number 103 104hi def link laceOperator Special 105hi def link laceArray Special 106hi def link laceExport Special 107hi def link laceCreation Special 108hi def link laceBrackets Special 109hi def link laceConstraint Special 110 111hi def link laceComment Comment 112 113hi def link laceError Error 114hi def link laceStringError Error 115hi def link laceParenError Error 116hi def link laceBracketError Error 117hi def link laceTodo Todo 118 119 120let b:current_syntax = "lace" 121 122" vim: ts=4 123