annotate runtime/syntax/gretl.vim @ 9291:bff3cd5cf922 v7.4.1928

commit https://github.com/vim/vim/commit/76ae22fef3cb224ca7fbf97517f881e825d4d0c2 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 13 20:00:29 2016 +0200 patch 7.4.1928 Problem: Overwriting pointer argument. Solution: Assign to what it points to. (Dominique Pelle)
author Christian Brabandt <cb@256bit.org>
date Mon, 13 Jun 2016 20:15:06 +0200
parents 8cd729851562
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
625
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
1 " Vim syntax file
856
8cd729851562 updated for version 7.0g
vimboss
parents: 625
diff changeset
2 " Language: gretl (http://gretl.sf.net)
625
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
3 " Maintainer: Vaidotas Zemlys <zemlys@gmail.com>
856
8cd729851562 updated for version 7.0g
vimboss
parents: 625
diff changeset
4 " Last Change: 2006 Apr 30
625
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
5 " Filenames: *.inp *.gretl
856
8cd729851562 updated for version 7.0g
vimboss
parents: 625
diff changeset
6 " URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/gretl.vim
625
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
7 " For version 5.x: Clear all syntax items
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
8 " For version 6.x: Quit when a syntax file was already loaded
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
9
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
10 if version < 600
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
11 syntax clear
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
12 elseif exists("b:current_syntax")
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
13 finish
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
14 endif
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
15
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
16 if version >= 600
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
17 setlocal iskeyword=@,48-57,_,.
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
18 else
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
19 set iskeyword=@,48-57,_,.
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
20 endif
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
21
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
22 syn case match
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
23
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
24 " Constant
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
25 " string enclosed in double quotes
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
26 syn region gString start=/"/ skip=/\\\\\|\\"/ end=/"/
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
27 " number with no fractional part or exponent
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
28 syn match gNumber /\d\+/
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
29 " floating point number with integer and fractional parts and optional exponent
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
30 syn match gFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
31 " floating point number with no integer part and optional exponent
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
32 syn match gFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
33 " floating point number with no fractional part and optional exponent
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
34 syn match gFloat /\d\+[Ee][-+]\=\d\+/
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
35
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
36 " Gretl commands
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
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
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
38
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
39 "Gretl genr functions
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
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
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
41
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
42 " Identifier
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
43 " identifier with leading letter and optional following keyword characters
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
44 syn match gIdentifier /\a\k*/
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
45
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
46 " Variable with leading $
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
47 syn match gVariable /\$\k*/
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
48 " Arrow
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
49 syn match gArrow /<-/
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
50
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
51 " Special
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
52 syn match gDelimiter /[,;:]/
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
53
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
54 " Error
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
55 syn region gRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError,gBCstart,gBCend
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
56 syn region gRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
57 syn region gRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
58 syn match gError /[)\]}]/
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
59 syn match gBraceError /[)}]/ contained
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
60 syn match gCurlyError /[)\]]/ contained
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
61 syn match gParenError /[\]}]/ contained
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
62
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
63 " Comment
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
64 syn match gComment /#.*/
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
65 syn match gBCstart /(\*/
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
66 syn match gBCend /\*)/
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
67
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
68 syn region gBlockComment matchgroup=gCommentStart start="(\*" end="\*)"
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
69
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
70 " Define the default highlighting.
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
71 " For version 5.7 and earlier: only when not done already
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
72 " For version 5.8 and later: only when an item doesn't have highlighting yet
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
73 if version >= 508 || !exists("did_r_syn_inits")
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
74 if version < 508
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
75 let did_r_syn_inits = 1
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
76 command -nargs=+ HiLink hi link <args>
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
77 else
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
78 command -nargs=+ HiLink hi def link <args>
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
79 endif
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
80 HiLink gComment Comment
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
81 HiLink gCommentStart Comment
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
82 HiLink gBlockComment Comment
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
83 HiLink gString String
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
84 HiLink gNumber Number
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
85 HiLink gBoolean Boolean
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
86 HiLink gFloat Float
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
87 HiLink gCommands Repeat
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
88 HiLink gGenrFunc Type
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
89 HiLink gDelimiter Delimiter
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
90 HiLink gError Error
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
91 HiLink gBraceError Error
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
92 HiLink gCurlyError Error
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
93 HiLink gParenError Error
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
94 HiLink gIdentifier Normal
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
95 HiLink gVariable Identifier
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
96 HiLink gArrow Repeat
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
97 delcommand HiLink
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
98 endif
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
99
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
100 let b:current_syntax="gretl"
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
101
81fe2ccc1207 updated for version 7.0179
vimboss
parents:
diff changeset
102 " vim: ts=8 sw=2