4223
|
1 " Vim syntax file
|
|
2 " Language: ploki
|
|
3 " Maintainer: Lukas Mai
|
|
4 " Last Change: 2010-02-28
|
|
5 " Version: 0.15
|
|
6
|
|
7 if version < 600
|
|
8 sy clear
|
|
9 elseif exists('b:current_syntax')
|
|
10 finish
|
|
11 endif
|
|
12
|
|
13 syn match plokiStuff /.\+/ contains=plokiList,plokiNumber,plokiSpcErr,plokiSpecial,plokiFunc,plokiString contained
|
|
14
|
|
15 syn match plokiList /#<\|#>/
|
|
16 syn match plokiNumber /\.\d\+\%([Ee][-+]\=\d\+\)\=/
|
|
17 syn match plokiNumber /\d\+\%(\.\d*\)\=\%([Ee][-+]\=\d\+\)\=/
|
|
18 syn match plokiSpcErr /\\/
|
|
19 syn match plokiSpecial
|
|
20 \ /\\\%([!?@_]\|\d\+\|ARG\|AUSG\|EING\|E\|FEHL\|PI\)\=/
|
|
21 syn match plokiFunc /\\\%(ARG:\|ENV\|[LQRU]\)/
|
|
22 syn match plokiFunc
|
|
23 \ /@\%([-+]\|ABS\|ACOS\|APERS\|ASIN\|ATAN2\=\|CHR\|COS\|DEF-P\|EDD-P\|ENV\|ERR-P\|EVAL\|GET\|INT\|IO-P\|LAPERS\|LEGS\|LENGTH\|L[GN]\|NEG\|NOT\|NUM\|OMFG\|ORD\|RE\%(MOVE\|NAEM\|VERSE\)\|SAG\|SAPERS\|SIN\|SQRT\|STR\|SUCH\|TAN\|TYPE OF\)/
|
|
24 syn match plokiEscErr /\\/ contained
|
|
25 syn match plokiEscape /\\\%([abfnrtv"\\V]\|c.\|x\x\x\=\|\o\{1,3}\)/ contained
|
|
26 syn match plokiString '"\%(\%(??/\n\)\@![^"\\]\)*\%(\\c\=.\%(\%(??/\n\)\@![^"\\]\)*\)*"\='
|
|
27 \ contains=plokiEscape,plokiEscErr nextgroup=plokiCont
|
|
28 syn match plokiGarbage '\%(\%(??/\n\)\@!.\)\+' contained nextgroup=plokiCont
|
|
29 syn match plokiCmd
|
|
30 \ /#\|A[BN]RUF\|CLAUDS\|END\|FLUSH\|GO\%(FOR\|TO\)\|IACS\|IF\|KTHX\|LEE\=T\|RESET\|SET\|WUNT/
|
|
31 \ contained
|
|
32 syn match plokiCmd /#!\|ELSE\|END IF\|FI/ contained nextgroup=plokiGarbage
|
|
33 syn region plokiComment matchgroup=plokiCmd start=/REM/ end=/$/
|
|
34 \ contained contains=plokiComment
|
|
35 syn match plokiWord /\S\+/ contained nextgroup=plokiGarbage
|
|
36 syn match plokiCmd /NEXT\s*/ contained nextgroup=plokiWord
|
|
37 syn match plokiLabel /^\s*\%(FOR\s*\S\+\|\d*\)\s*/
|
|
38 \ nextgroup=plokiCmd,plokiComment,plokiSpcErr,plokiSpecial,plokiFunc,plokiString
|
|
39 " ^... around a bug(?)
|
|
40
|
|
41 syn match plokiCont '??/\n' nextgroup=plokiStuff
|
|
42
|
|
43 syn match plokiInsert /^\s*INSERT\%(\%( DA\)\=\)\@>\s*\S\+\%(\s\+\S\+\)*\s*HERE\s*$/ contains=plokiInsFile
|
|
44 syn match plokiInsFile /\%(^\s*INSERT\%(\%( DA\)\=\)\@>\s*\)\@<=\S\+\%(\s\+\S\+\)*\%(\s*HERE\s*$\)\@=/ contained
|
|
45
|
|
46 if version >= 508 || !exists('did_ploki_syn_inits')
|
|
47 if version < 508
|
|
48 let did_ploki_syn_inits = 1
|
|
49 command -nargs=+ HiLink hi link <args>
|
|
50 else
|
|
51 command -nargs=+ HiLink hi def link <args>
|
|
52 endif
|
|
53
|
|
54 HiLink plokiinsFile String
|
|
55 HiLink plokiInsert Preproc
|
|
56 HiLink plokiCont Preproc
|
|
57 HiLink plokiLabel Label
|
|
58 HiLink plokiGarbage Comment
|
|
59 HiLink plokiComment Comment
|
|
60 HiLink plokiCmd Type
|
|
61 HiLink plokiWord Label
|
|
62 HiLink plokiString String
|
|
63 HiLink plokiEscape SpecialChar
|
|
64 HiLink plokiEscErr Error
|
|
65 HiLink plokiFunc Function
|
|
66 HiLink plokiSpecial Special
|
|
67 HiLink plokiSpcErr Error
|
|
68 HiLink plokiNumber Number
|
|
69 HiLink plokiList Preproc
|
|
70
|
|
71 delc HiLink
|
|
72 endif
|
|
73
|
|
74 let b:current_syntax = 'ploki'
|