3 " Maintainer: Maurizio Tranchero <maurizio.tranchero@polito.it> - <maurizio.tranchero@gmail.com>
4 " Credits: Luca Necchi <luca.necchi@polito.it>
5 " First Release: Tue May 17 23:49:39 CEST 2005
6 " Last Change: Sat Apr 22 14:56:41 CEST 2006
9 " For version 5.x: Clear all syntax items
10 " For version 6.x: Quit when a syntax file was already loaded
13 elseif exists("b:current_syntax")
20 syn region esterelModule start=/module/ end=/end module/ contains=ALLBUT,esterelModule
21 syn region esterelLoop start=/loop/ end=/end loop/ contains=ALLBUT,esterelModule
22 syn region esterelAbort start=/abort/ end=/when/ contains=ALLBUT,esterelModule
23 syn region esterelAbort start=/weak abort/ end=/when/ contains=ALLBUT,esterelModule
24 syn region esterelEvery start=/every/ end=/end every/ contains=ALLBUT,esterelModule
25 syn region esterelIf start=/if/ end=/end if/ contains=ALLBUT,esterelModule
26 syn region esterelConcurrent transparent start=/\[/ end=/\]/ contains=ALLBUT,esterelModule
27 syn region esterelIfThen start=/if/ end=/then/ oneline
29 syn keyword esterelIO input output inputoutput constant
30 syn keyword esterelBoolean and or not xor xnor nor nand
31 syn keyword esterelExpressions mod
32 syn keyword esterelStatement nothing halt
33 syn keyword esterelStatement module signal sensor end
34 syn keyword esterelStatement every do loop abort weak
35 syn keyword esterelStatement emit present await
36 syn keyword esterelStatement pause when immediate
37 syn keyword esterelStatement if then else case
38 syn keyword esterelStatement var in run suspend
39 syn keyword esterelStatement repeat times combine with
40 syn keyword esterelStatement assert sustain
41 " check what it is the following
42 syn keyword esterelStatement relation
43 syn keyword esterelFunctions function procedure task
44 syn keyword esterelSysCall call trap exit exec
46 syn keyword esterelType integer float bolean
48 syn match esterelComment "%.*$"
49 " Operators and special characters
50 syn match esterelSpecial ":"
51 syn match esterelSpecial "<="
52 syn match esterelSpecial ">="
53 syn match esterelSpecial ";"
54 syn match esterelOperator "\["
55 syn match esterelOperator "\]"
56 syn match esterelOperator ":="
57 syn match esterelStatement "\<\(if\|else\)\>"
58 syn match esterelNone "\<else\s\+if\>$"
59 syn match esterelNone "\<else\s\+if\>\s"
62 if version >= 508 || !exists("did_esterel_syntax_inits")
64 let did_esterel_syntax_inits = 1
65 command -nargs=+ HiLink hi link <args>
67 command -nargs=+ HiLink hi def link <args>
70 HiLink esterelStatement Statement
71 HiLink esterelType Type
72 HiLink esterelComment Comment
73 HiLink esterelBoolean Number
74 HiLink esterelExpressions Number
75 HiLink esterelIO String
76 HiLink esterelOperator Type
77 HiLink esterelSysCall Type
78 HiLink esterelFunctions Type
79 HiLink esterelSpecial Special
84 let b:current_syntax = "esterel"