codekingpro/portable-devtools
114k
1" Vim syntax file2" Language: occam3" Copyright: Fred Barnes <frmb2@kent.ac.uk>, Mario Schweigler <ms44@kent.ac.uk>4" Maintainer: Mario Schweigler <ms44@kent.ac.uk>5" Last Change: 24 May 20036 7" quit when a syntax file was already loaded8if exists("b:current_syntax")9 finish10endif11 12"{{{ Settings13" Set shift width for indent14setlocal shiftwidth=215" Set the tab key size to two spaces16setlocal softtabstop=217" Let tab keys always be expanded to spaces18setlocal expandtab19 20" Dots are valid in occam identifiers21setlocal iskeyword+=.22"}}}23 24syn case match25 26syn keyword occamType BYTE BOOL INT INT16 INT32 INT64 REAL32 REAL64 ANY27syn keyword occamType CHAN DATA OF TYPE TIMER INITIAL VAL PORT MOBILE PLACED28syn keyword occamType PROCESSOR PACKED RECORD PROTOCOL SHARED ROUND TRUNC29 30syn keyword occamStructure SEQ PAR IF ALT PRI FORKING PLACE AT31 32syn keyword occamKeyword PROC IS TRUE FALSE SIZE RECURSIVE REC33syn keyword occamKeyword RETYPES RESHAPES STEP FROM FOR RESCHEDULE STOP SKIP FORK34syn keyword occamKeyword FUNCTION VALOF RESULT ELSE CLONE CLAIM35syn keyword occamBoolean TRUE FALSE36syn keyword occamRepeat WHILE37syn keyword occamConditional CASE38syn keyword occamConstant MOSTNEG MOSTPOS39 40syn match occamBrackets /\[\|\]/41syn match occamParantheses /(\|)/42 43syn keyword occamOperator AFTER TIMES MINUS PLUS INITIAL REM AND OR XOR NOT44syn keyword occamOperator BITAND BITOR BITNOT BYTESIN OFFSETOF45 46syn match occamOperator /::\|:=\|?\|!/47syn match occamOperator /<\|>\|+\|-\|\*\|\/\|\\\|=\|\~/48syn match occamOperator /@\|\$\$\|%\|&&\|<&\|&>\|<\]\|\[>\|\^/49 50syn match occamSpecialChar /\M**\|*'\|*"\|*#\(\[0-9A-F\]\+\)/ contained51syn match occamChar /\M\L\='\[^*\]'/52syn match occamChar /L'[^']*'/ contains=occamSpecialChar53 54syn case ignore55syn match occamTodo /\<todo\>:\=/ contained56syn match occamNote /\<note\>:\=/ contained57syn case match58syn keyword occamNote NOT contained59 60syn match occamComment /--.*/ contains=occamCommentTitle,occamTodo,occamNote61syn match occamCommentTitle /--\s*\u\a*\(\s\+\u\a*\)*:/hs=s+2 contained contains=occamTodo,occamNote62syn match occamCommentTitle /--\s*KROC-LIBRARY\(\.so\|\.a\)\=\s*$/hs=s+2 contained63syn match occamCommentTitle /--\s*\(KROC-OPTIONS:\|RUN-PARAMETERS:\)/hs=s+2 contained64 65syn match occamIdentifier /\<[A-Z.][A-Z.0-9]*\>/66syn match occamFunction /\<[A-Za-z.][A-Za-z0-9.]*\>/ contained67 68syn match occamPPIdentifier /##.\{-}\>/69 70syn region occamString start=/"/ skip=/\M*"/ end=/"/ contains=occamSpecialChar71syn region occamCharString start=/'/ end=/'/ contains=occamSpecialChar72 73syn match occamNumber /\<\d\+\(\.\d\+\(E\(+\|-\)\d\+\)\=\)\=/74syn match occamNumber /-\d\+\(\.\d\+\(E\(+\|-\)\d\+\)\=\)\=/75syn match occamNumber /#\(\d\|[A-F]\)\+/76syn match occamNumber /-#\(\d\|[A-F]\)\+/77 78syn keyword occamCDString SHARED EXTERNAL DEFINED NOALIAS NOUSAGE NOT contained79syn keyword occamCDString FILE LINE PROCESS.PRIORITY OCCAM2.5 contained80syn keyword occamCDString USER.DEFINED.OPERATORS INITIAL.DECL MOBILES contained81syn keyword occamCDString BLOCKING.SYSCALLS VERSION NEED.QUAD.ALIGNMENT contained82syn keyword occamCDString TARGET.CANONICAL TARGET.CPU TARGET.OS TARGET.VENDOR contained83syn keyword occamCDString TRUE FALSE AND OR contained84syn match occamCDString /<\|>\|=\|(\|)/ contained85 86syn region occamCDirective start=/#\(USE\|INCLUDE\|PRAGMA\|DEFINE\|UNDEFINE\|UNDEF\|IF\|ELIF\|ELSE\|ENDIF\|WARNING\|ERROR\|RELAX\)\>/ end=/$/ contains=occamString,occamComment,occamCDString87 88 89hi def link occamType Type90hi def link occamKeyword Keyword91hi def link occamComment Comment92hi def link occamCommentTitle PreProc93hi def link occamTodo Todo94hi def link occamNote Todo95hi def link occamString String96hi def link occamCharString String97hi def link occamNumber Number98hi def link occamCDirective PreProc99hi def link occamCDString String100hi def link occamPPIdentifier PreProc101hi def link occamBoolean Boolean102hi def link occamSpecialChar SpecialChar103hi def link occamChar Character104hi def link occamStructure Structure105hi def link occamIdentifier Identifier106hi def link occamConstant Constant107hi def link occamOperator Operator108hi def link occamFunction Ignore109hi def link occamRepeat Repeat110hi def link occamConditional Conditional111hi def link occamBrackets Type112hi def link occamParantheses Delimiter113 114 115let b:current_syntax = "occam"116 117 