vim: update release.sh to vim 7.3
[msysgit/mtrensch.git] / share / vim / vim72 / syntax / gretl.vim
blob37299b894acffe584eece6d50c34f006c2c99a39
1 " Vim syntax file
2 " Language:     gretl (http://gretl.sf.net)
3 " Maintainer:   Vaidotas Zemlys <zemlys@gmail.com>
4 " Last Change:  2006 Apr 30
5 " Filenames:    *.inp *.gretl
6 " URL:  http://uosis.mif.vu.lt/~zemlys/vim-syntax/gretl.vim
7 " For version 5.x: Clear all syntax items
8 " For version 6.x: Quit when a syntax file was already loaded
10 if version < 600
11   syntax clear
12 elseif exists("b:current_syntax")
13   finish
14 endif
16 if version >= 600
17   setlocal iskeyword=@,48-57,_,.
18 else
19   set iskeyword=@,48-57,_,.
20 endif
22 syn case match
24 " Constant
25 " string enclosed in double quotes
26 syn region gString start=/"/ skip=/\\\\\|\\"/ end=/"/
27 " number with no fractional part or exponent
28 syn match gNumber /\d\+/
29 " floating point number with integer and fractional parts and optional exponent
30 syn match gFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/
31 " floating point number with no integer part and optional exponent
32 syn match gFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/
33 " floating point number with no fractional part and optional exponent
34 syn match gFloat /\d\+[Ee][-+]\=\d\+/
36 " Gretl commands
37 syn keyword gCommands add addobs addto adf append ar arch arma break boxplot chow coeffsum coint coint2 corc corr corrgm criteria critical cusum data delete diff else end endif endloop eqnprint equation estimate fcast fcasterr fit freq function funcerr garch genr gnuplot graph hausman hccm help hilu hsk hurst if import include info kpss label labels lad lags ldiff leverage lmtest logistic logit logs loop mahal meantest mle modeltab mpols multiply nls nulldata ols omit omitfrom open outfile panel pca pergm plot poisson pooled print printf probit pvalue pwe quit remember rename reset restrict rhodiff rmplot run runs scatters sdiff set setobs setmiss shell sim smpl spearman square store summary system tabprint testuhat tobit transpos tsls var varlist vartest vecm vif wls 
39 "Gretl genr functions
40 syn keyword gGenrFunc log exp sin cos tan atan diff ldiff sdiff mean sd min max sort int ln coeff abs rho sqrt sum nobs firstobs lastobs normal uniform stderr cum missing ok misszero corr vcv var sst cov median zeromiss pvalue critical obsnum mpow dnorm cnorm gamma lngamma resample hpfilt bkfilt fracdiff varnum isvector islist nelem 
42 " Identifier
43 " identifier with leading letter and optional following keyword characters
44 syn match gIdentifier /\a\k*/
46 "  Variable with leading $
47 syn match gVariable /\$\k*/
48 " Arrow
49 syn match gArrow /<-/
51 " Special
52 syn match gDelimiter /[,;:]/
54 " Error
55 syn region gRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError,gBCstart,gBCend
56 syn region gRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError
57 syn region gRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError
58 syn match gError      /[)\]}]/
59 syn match gBraceError /[)}]/ contained
60 syn match gCurlyError /[)\]]/ contained
61 syn match gParenError /[\]}]/ contained
63 " Comment
64 syn match gComment /#.*/
65 syn match gBCstart /(\*/
66 syn match gBCend /\*)/
68 syn region gBlockComment matchgroup=gCommentStart start="(\*" end="\*)"
70 " Define the default highlighting.
71 " For version 5.7 and earlier: only when not done already
72 " For version 5.8 and later: only when an item doesn't have highlighting yet
73 if version >= 508 || !exists("did_r_syn_inits")
74   if version < 508
75     let did_r_syn_inits = 1
76     command -nargs=+ HiLink hi link <args>
77   else
78     command -nargs=+ HiLink hi def link <args>
79   endif
80   HiLink gComment      Comment
81   HiLink gCommentStart Comment
82   HiLink gBlockComment Comment
83   HiLink gString       String
84   HiLink gNumber       Number
85   HiLink gBoolean      Boolean
86   HiLink gFloat        Float
87   HiLink gCommands     Repeat   
88   HiLink gGenrFunc     Type
89   HiLink gDelimiter    Delimiter
90   HiLink gError        Error
91   HiLink gBraceError   Error
92   HiLink gCurlyError   Error
93   HiLink gParenError   Error
94   HiLink gIdentifier   Normal
95   HiLink gVariable     Identifier
96   HiLink gArrow        Repeat
97   delcommand HiLink
98 endif
100 let b:current_syntax="gretl"
102 " vim: ts=8 sw=2