annotate runtime/syntax/gp.vim @ 7:3fc0f57ecb91 v7.0001

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