2 " Language: gp (version 2.2)
3 " Maintainer: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
4 " Last change: 2006 Apr 12
5 " URL: http://pari.math.u-bordeaux.fr
9 elseif exists("b:current_syntax")
14 syntax keyword gpStatement break return next
15 syntax keyword gpConditional if
16 syntax keyword gpRepeat until while for fordiv forprime forstep forvec
18 syntax keyword gpScope local global
20 syntax keyword gpInterfaceKey colors compatible datadir debug debugfiles
21 syntax keyword gpInterfaceKey debugmem echo factor_add_primes format help
22 syntax keyword gpInterfaceKey histsize lines log logfile new_galois_format
23 syntax keyword gpInterfaceKey output parisize path prettyprinter primelimit
24 syntax keyword gpInterfaceKey prompt prompt_cont psfile realprecision secure
25 syntax keyword gpInterfaceKey seriesprecision simplify strictmatch TeXstyle timer
27 syntax match gpInterface "^\s*\\[a-z].*"
28 syntax keyword gpInterface default
29 syntax keyword gpInput read input
32 syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*[^ \t=]"me=e-1 contains=gpFunction,gpArgs
33 syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*$" contains=gpFunction,gpArgs
34 syntax match gpArgs contained "[a-zA-Z][_a-zA-Z0-9]*"
35 syntax match gpFunction contained "^\s*[a-zA-Z][_a-zA-Z0-9]*("me=e-1
37 " String and Character constants
38 " Highlight special (backslash'ed) characters differently
39 syntax match gpSpecial contained "\\[ent\\]"
40 syntax region gpString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gpSpecial
43 syntax region gpComment start="/\*" end="\*/" contains=gpTodo
44 syntax match gpComment "\\\\.*" contains=gpTodo
45 syntax keyword gpTodo contained TODO
46 syntax sync ccomment gpComment minlines=10
48 "catch errors caused by wrong parenthesis
49 syntax region gpParen transparent start='(' end=')' contains=ALLBUT,gpParenError,gpTodo,gpFunction,gpArgs,gpSpecial
50 syntax match gpParenError ")"
51 syntax match gpInParen contained "[{}]"
53 if version >= 508 || !exists("did_gp_syn_inits")
55 let did_gp_syn_inits = 1
56 command -nargs=+ HiLink hi link <args>
58 command -nargs=+ HiLink hi def link <args>
61 HiLink gpConditional Conditional
62 HiLink gpRepeat Repeat
64 HiLink gpParenError gpError
65 HiLink gpInParen gpError
66 HiLink gpStatement Statement
67 HiLink gpString String
68 HiLink gpComment Comment
69 HiLink gpInterface Type
71 HiLink gpInterfaceKey Statement
72 HiLink gpFunction Function
75 HiLink gpSpecial Special
81 let b:current_syntax = "gp"