comparison runtime/syntax/form.vim @ 2034:7bc41231fbc7

Update runtime files.
author Bram Moolenaar <bram@zimbu.org>
date Wed, 06 Jan 2010 20:54:52 +0100
parents 3fc0f57ecb91
children 43efa4f5a8ea
comparison
equal deleted inserted replaced
2033:de5a43c5eedc 2034:7bc41231fbc7
1 " Vim syntax file 1 " Vim syntax file
2 " Language: FORM 2 " Language: FORM
3 " Version: 2.0
3 " Maintainer: Michael M. Tung <michael.tung@uni-mainz.de> 4 " Maintainer: Michael M. Tung <michael.tung@uni-mainz.de>
4 " Last Change: 2001 May 10 5 " Last Change: <Thu Oct 23 13:11:21 CEST 2008>
6 " Past Change: <October 2008 Thomas Reiter thomasr@nikhef.nl>
7 " Past Change: <Wed, 2005/05/25 09:24:58 arwagner wptx44>
5 8
6 " First public release based on 'Symbolic Manipulation with FORM' 9 " First public release based on 'Symbolic Manipulation with FORM'
7 " by J.A.M. Vermaseren, CAN, Netherlands, 1991. 10 " by J.A.M. Vermaseren, CAN, Netherlands, 1991.
8 " This syntax file is still in development. Please send suggestions 11 " This syntax file is still in development. Please send suggestions
9 " to the maintainer. 12 " to the maintainer.
16 finish 19 finish
17 endif 20 endif
18 21
19 syn case ignore 22 syn case ignore
20 23
21 " A bunch of useful FORM keywords 24 " a bunch of useful FORM keywords
22 syn keyword formType global local 25 syn keyword formType global local
23 syn keyword formHeaderStatement symbol symbols cfunction cfunctions 26 syn keyword formHeaderStatement symbol symbols cfunction cfunctions
24 syn keyword formHeaderStatement function functions vector vectors 27 syn keyword formHeaderStatement function functions vector vectors
25 syn keyword formHeaderStatement set sets index indices 28 syn keyword formHeaderStatement tensor tensors ctensor ctensors
29 syn keyword formHeaderStatement set sets index indices table ctable
26 syn keyword formHeaderStatement dimension dimensions unittrace 30 syn keyword formHeaderStatement dimension dimensions unittrace
27 syn keyword formStatement id identify drop skip 31 syn keyword formConditional if else elseif endif while
28 syn keyword formStatement write nwrite
29 syn keyword formStatement format print nprint load save
30 syn keyword formStatement bracket brackets
31 syn keyword formStatement multiply count match only discard
32 syn keyword formStatement trace4 traceN contract symmetrize antisymmetrize
33 syn keyword formConditional if else endif while
34 syn keyword formConditional repeat endrepeat label goto 32 syn keyword formConditional repeat endrepeat label goto
33 syn keyword formConditional argument endargument exit
34 syn keyword formConditional inexpression inside term
35 syn keyword formConditional endinexpression endinside endterm
36 syn keyword formStatement abrackets also antibrackets antisymmetrize
37 syn keyword formStatement argexplode argimplode apply auto autodeclare
38 syn keyword formStatement brackets chainin chainout chisholm cleartable
39 syn keyword formStatement collect commuting compress contract
40 syn keyword formStatement cyclesymmetrize deallocatetable delete
41 syn keyword formStatement dimension discard disorder drop factarg fill
42 syn keyword formStatement fillexpression fixindex format funpowers hide
43 syn keyword formStatement identify idnew idold ifmatch inparallel
44 syn keyword formStatement insidefirst keep load makeinteger many metric
45 syn keyword formStatement moduleoption modulus multi multiply ndrop
46 syn keyword formStatement nfunctions nhide normalize notinparallel
47 syn keyword formStatement nprint nskip ntable ntensors nunhide nwrite
48 syn keyword formStatement off on once only polyfun pophide print
49 syn keyword formStatement printtable propercount pushhide ratio
50 syn keyword formStatement rcyclesymmetrize redefine renumber
51 syn keyword formStatement replaceinarg replaceloop save select
52 syn keyword formStatement setexitflag skip slavepatchsize sort splitarg
53 syn keyword formStatement splitfirstarg splitlastarg sum symmetrize
54 syn keyword formStatement tablebase testuse threadbucketsize totensor
55 syn keyword formStatement tovector trace4 tracen tryreplace unhide
56 syn keyword formStatement unittrace vectors write
57 " for compatibility with older FORM versions:
58 syn keyword formStatement id bracket count match traceN
35 59
36 " some special functions 60 " some special functions
37 syn keyword formStatement g_ gi_ g5_ g6_ g7_ 5_ 6_ 7_ 61 syn keyword formStatement abs_ bernoulli_ binom_ conjg_ count_
38 syn keyword formStatement e_ d_ delta_ theta_ sum_ sump_ 62 syn keyword formStatement d_ dd_ delta_ deltap_ denom_ distrib_
63 syn keyword formStatement dum_ dummy_ dummyten_ e_ exp_ fac_
64 syn keyword formStatement factorin_ firstbracket_ g5_ g6_ g7_
65 syn keyword formStatement g_ gcd_ gi_ integer_ invfac_ match_
66 syn keyword formStatement max_ maxpowerof_ min_ minpowerof_
67 syn keyword formStatement mod_ nargs_ nterms_ pattern_ poly_
68 syn keyword formStatement polyadd_ polydiv_ polygcd_ polyintfac_
69 syn keyword formStatement polymul_ polynorm_ polyrem_ polysub_
70 syn keyword formStatement replace_ reverse_ root_ setfun_ sig_
71 syn keyword formStatement sign_ sum_ sump_ table_ tbl_ term_
72 syn keyword formStatement termsin_ termsinbracket_ theta_ thetap_
73 syn keyword formStatement 5_ 6_ 7_
74
75 syn keyword formReserved sqrt_ ln_ sin_ cos_ tan_ asin_ acos_
76 syn keyword formReserved atan_ atan2_ sinh_ cosh_ tanh_ asinh_
77 syn keyword formReserved acosh_ atanh_ li2_ lin_
78
79 syn keyword formTodo contained TODO FIXME XXX
80
81 syn match formSpecial display contained "\\\(n\|t\|b\|\\\|\"\)"
82 syn match formSpecial display contained "%\(%\|e\|E\|s\|f\|\$\)"
83 syn match formSpecial "\<N\d\+_[?]"
39 84
40 " pattern matching for keywords 85 " pattern matching for keywords
41 syn match formComment "^\ *\*.*$" 86 syn match formComment "^\ *\*.*$" contains=formTodo
42 syn match formComment "\;\ *\*.*$" 87 syn match formComment "\;\ *\*.*$" contains=formTodo
43 syn region formString start=+"+ end=+"+ 88 syn region formString start=+"+ end=+"+ contains=formSpecial
44 syn region formString start=+'+ end=+'+ 89 syn region formString start=+'+ end=+'+
90 syn region formNestedString start=+`+ end=+'+ contains=formNestedString
45 syn match formPreProc "^\=\#[a-zA-z][a-zA-Z0-9]*\>" 91 syn match formPreProc "^\=\#[a-zA-z][a-zA-Z0-9]*\>"
46 syn match formNumber "\<\d\+\>" 92 syn match formNumber "\<\d\+\>"
47 syn match formNumber "\<\d\+\.\d*\>" 93 syn match formNumber "\<\d\+\.\d*\>"
48 syn match formNumber "\.\d\+\>" 94 syn match formNumber "\.\d\+\>"
49 syn match formNumber "-\d" contains=Number 95 syn match formNumber "-\d" contains=Number
50 syn match formNumber "-\.\d" contains=Number 96 syn match formNumber "-\.\d" contains=Number
51 syn match formNumber "i_\+\>" 97 syn match formNumber "i_\+\>"
52 syn match formNumber "fac_\+\>" 98 syn match formNumber "fac_\+\>"
99 " pattern matching wildcards
100 syn match formNumber "?[A-z0-9]*"
101 " dollar-variables (new in 3.x)
102 syn match formNumber "\\$[A-z0-9]*"
103 " scalar products
104 syn match formNumber "^\=[a-zA-z][a-zA-Z0-9]*\.[a-zA-z][a-zA-Z0-9]*\>"
105
53 syn match formDirective "^\=\.[a-zA-z][a-zA-Z0-9]*\>" 106 syn match formDirective "^\=\.[a-zA-z][a-zA-Z0-9]*\>"
54 107
55 " hi User Labels 108 " hi User Labels
56 syn sync ccomment formComment minlines=10 109 syn sync ccomment formComment minlines=10
57 110
72 HiLink formComment Comment 125 HiLink formComment Comment
73 HiLink formPreProc PreProc 126 HiLink formPreProc PreProc
74 HiLink formDirective PreProc 127 HiLink formDirective PreProc
75 HiLink formType Type 128 HiLink formType Type
76 HiLink formString String 129 HiLink formString String
130 HiLink formNestedString String
131 HiLink formReserved Error
132 HiLink formTodo Todo
133 HiLink formSpecial SpecialChar
77 134
78 if !exists("form_enhanced_color") 135 if !exists("form_enhanced_color")
79 HiLink formHeaderStatement Statement 136 HiLink formHeaderStatement Statement
80 else 137 else
81 " enhanced color mode 138 " enhanced color mode