annotate runtime/syntax/gp.vim @ 1628:db1f7f1c40df

updated for version 7.2a
author vimboss
date Wed, 25 Jun 2008 00:22:05 +0000
parents b9740fb41986
children af1e8a1714c2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
1619
b9740fb41986 updated for version 7.2a
vimboss
parents: 827
diff changeset
2 " Language: gp (version 2.4)
827
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 7
diff changeset
3 " Maintainer: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
1619
b9740fb41986 updated for version 7.2a
vimboss
parents: 827
diff changeset
4 " Last change: 2007 Oct 1
827
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 7
diff changeset
5 " URL: http://pari.math.u-bordeaux.fr
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
827
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 7
diff changeset
13 " control statements
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syntax keyword gpStatement break return next
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syntax keyword gpConditional if
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syntax keyword gpRepeat until while for fordiv forprime forstep forvec
827
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 7
diff changeset
17 " storage class
1619
b9740fb41986 updated for version 7.2a
vimboss
parents: 827
diff changeset
18 syntax keyword gpScope my local global
827
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 7
diff changeset
19 " defaults
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 7
diff changeset
20 syntax keyword gpInterfaceKey colors compatible datadir debug debugfiles
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 7
diff changeset
21 syntax keyword gpInterfaceKey debugmem echo factor_add_primes format help
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 7
diff changeset
22 syntax keyword gpInterfaceKey histsize lines log logfile new_galois_format
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 7
diff changeset
23 syntax keyword gpInterfaceKey output parisize path prettyprinter primelimit
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 7
diff changeset
24 syntax keyword gpInterfaceKey prompt prompt_cont psfile realprecision secure
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 7
diff changeset
25 syntax keyword gpInterfaceKey seriesprecision simplify strictmatch TeXstyle timer
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syntax match gpInterface "^\s*\\[a-z].*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syntax keyword gpInterface default
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syntax keyword gpInput read input
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 " functions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*[^ \t=]"me=e-1 contains=gpFunction,gpArgs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*$" contains=gpFunction,gpArgs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syntax match gpArgs contained "[a-zA-Z][_a-zA-Z0-9]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syntax match gpFunction contained "^\s*[a-zA-Z][_a-zA-Z0-9]*("me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 " String and Character constants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " Highlight special (backslash'ed) characters differently
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syntax match gpSpecial contained "\\[ent\\]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syntax region gpString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gpSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 "comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syntax region gpComment start="/\*" end="\*/" contains=gpTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syntax match gpComment "\\\\.*" contains=gpTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syntax keyword gpTodo contained TODO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syntax sync ccomment gpComment minlines=10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 "catch errors caused by wrong parenthesis
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syntax region gpParen transparent start='(' end=')' contains=ALLBUT,gpParenError,gpTodo,gpFunction,gpArgs,gpSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syntax match gpParenError ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syntax match gpInParen contained "[{}]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 if version >= 508 || !exists("did_gp_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 let did_gp_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 HiLink gpConditional Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 HiLink gpRepeat Repeat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 HiLink gpError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 HiLink gpParenError gpError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 HiLink gpInParen gpError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 HiLink gpStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 HiLink gpString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 HiLink gpComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink gpInterface Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink gpInput Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink gpInterfaceKey Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink gpFunction Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink gpScope Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 " contained ones
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 HiLink gpSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 HiLink gpTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 HiLink gpArgs Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 let b:current_syntax = "gp"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 " vim: ts=8