2 " Language: gp (version 2.1)
3 " Maintainer: Karim Belabas <Karim.Belabas@math.u-psud.fr>
4 " Last change: 2001 May 10
8 elseif exists("b:current_syntax")
12 " some control statements
13 syntax keyword gpStatement break return next
14 syntax keyword gpConditional if
15 syntax keyword gpRepeat until while for fordiv forprime forstep forvec
16 syntax keyword gpScope local global
18 syntax keyword gpInterfaceKey buffersize colors compatible debug debugmem
19 syntax keyword gpInterfaceKey echo format help histsize log logfile output
20 syntax keyword gpInterfaceKey parisize path primelimit prompt psfile
21 syntax keyword gpInterfaceKey realprecision seriesprecision simplify
22 syntax keyword gpInterfaceKey strictmatch timer
24 syntax match gpInterface "^\s*\\[a-z].*"
25 syntax keyword gpInterface default
26 syntax keyword gpInput read input
29 syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*[^ \t=]"me=e-1 contains=gpFunction,gpArgs
30 syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*$" contains=gpFunction,gpArgs
31 syntax match gpArgs contained "[a-zA-Z][_a-zA-Z0-9]*"
32 syntax match gpFunction contained "^\s*[a-zA-Z][_a-zA-Z0-9]*("me=e-1
34 " String and Character constants
35 " Highlight special (backslash'ed) characters differently
36 syntax match gpSpecial contained "\\[ent\\]"
37 syntax region gpString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gpSpecial
40 syntax region gpComment start="/\*" end="\*/" contains=gpTodo
41 syntax match gpComment "\\\\.*" contains=gpTodo
42 syntax keyword gpTodo contained TODO
43 syntax sync ccomment gpComment minlines=10
45 "catch errors caused by wrong parenthesis
46 syntax region gpParen transparent start='(' end=')' contains=ALLBUT,gpParenError,gpTodo,gpFunction,gpArgs,gpSpecial
47 syntax match gpParenError ")"
48 syntax match gpInParen contained "[{}]"
50 if version >= 508 || !exists("did_gp_syn_inits")
52 let did_gp_syn_inits = 1
53 command -nargs=+ HiLink hi link <args>
55 command -nargs=+ HiLink hi def link <args>
58 HiLink gpConditional Conditional
59 HiLink gpRepeat Repeat
61 HiLink gpParenError gpError
62 HiLink gpInParen gpError
63 HiLink gpStatement Statement
64 HiLink gpString String
65 HiLink gpComment Comment
66 HiLink gpInterface Type
68 HiLink gpInterfaceKey Statement
69 HiLink gpFunction Function
72 HiLink gpSpecial Special
78 let b:current_syntax = "gp"