Merge branch 'MacVim'
[MacVim/KaoriYa.git] / runtime / syntax / eviews.vim
blobaa65fda3ff6e00b8e09f02bc61ee1e2c306e7031
1 " Vim syntax file
2 " Language:     Eviews (http://www.eviews.com)
3 " Maintainer:   Vaidotas Zemlys <zemlys@gmail.com>
4 " Last Change:  2006 Apr 30
5 " Filenames:    *.prg
6 " URL:  http://uosis.mif.vu.lt/~zemlys/vim-syntax/eviews.vim
7 " For version 5.x: Clear all syntax items
8 " For version 6.x: Quit when a syntax file was already loaded
9 if version < 600
10   syntax clear
11 elseif exists("b:current_syntax")
12   finish
13 endif
15 if version >= 600
16   setlocal iskeyword=@,48-57,_,.
17 else
18   set iskeyword=@,48-57,_,.
19 endif
21 syn case match
23 " Comment
24 syn match eComment /\'.*/
26 " Constant
27 " string enclosed in double quotes
28 syn region eString start=/"/ skip=/\\\\\|\\"/ end=/"/
29 " number with no fractional part or exponent
30 syn match eNumber /\d\+/
31 " floating point number with integer and fractional parts and optional exponent
32 syn match eFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/
33 " floating point number with no integer part and optional exponent
34 syn match eFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/
35 " floating point number with no fractional part and optional exponent
36 syn match eFloat /\d\+[Ee][-+]\=\d\+/
38 " Identifier
39 " identifier with leading letter and optional following keyword characters
40 syn match eIdentifier /\a\k*/
42 " Eviews Programing Language
43 syn keyword eProgLang  @date else endif @errorcount @evpath exitloop for if @isobject next poff pon return statusline step stop  @temppath then @time to @toc wend while  include call subroutine endsub and or
45 " Eviews Objects, Views and Procedures
46 syn keyword eOVP alpha coef equation graph group link logl matrix model pool rowvector sample scalar series sspace sym system table text valmap var vector
49 " Standard Eviews Commands
50 syn keyword eStdCmd 3sls add addassign addinit addtext align alpha append arch archtest area arlm arma arroots auto axis bar bdstest binary block boxplot boxplotby bplabel cause ccopy cd cdfplot cellipse censored cfetch checkderivs chow clabel cleartext close coef coefcov coint comment control copy cor correl correlsq count cov create cross data datelabel dates db dbcopy dbcreate dbdelete dbopen dbpack dbrebuild dbrename dbrepair decomp define delete derivs describe displayname do draw driconvert drop dtable ec edftest endog eqs equation errbar exclude exit expand fetch fill fiml fit forecast freeze freq frml garch genr gmm grads graph group hconvert hfetch hilo hist hlabel hpf impulse jbera kdensity kerfit label laglen legend line linefit link linkto load logit logl ls makecoint makederivs makeendog makefilter makegarch makegrads makegraph makegroup makelimits makemodel makeregs makeresids makesignals makestates makestats makesystem map matrix means merge metafile ml model msg name nnfit open options ordered output override pageappend pagecontract pagecopy pagecreate pagedelete pageload pagerename pagesave pageselect pagestack pagestruct pageunstack param pcomp pie pool predict print probit program qqplot qstats range read rename representations resample reset residcor residcov resids results rls rndint rndseed rowvector run sample save scalar scale scat scatmat scenario seas seasplot series set setbpelem setcell setcolwidth setconvert setelem setfillcolor setfont setformat setheight setindent setjust setline setlines setmerge settextcolor setwidth sheet show signalgraphs smooth smpl solve solveopt sort spec spike sspace statby statefinal stategraphs stateinit stats statusline stomna store structure sur svar sym system table template testadd testbtw testby testdrop testexog testfit testlags teststat text tic toc trace tramoseats tsls unlink update updatecoefs uroot usage valmap var vars vector wald wfcreate wfopen wfsave wfselect white wls workfile write wtsls x11 x12 xy xyline xypair 
52 " Constant Identifier
53 syn match eConstant /\!\k*/
54 " String Identifier
55 syn match eStringId /%\k*/
56 " Command Identifier
57 syn match eCommand /@\k*/
59 " Special
60 syn match eDelimiter /[,;:]/
62 " Error
63 syn region eRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError
64 syn region eRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError
65 syn region eRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError
66 syn match eError      /[)\]}]/
67 syn match eBraceError /[)}]/ contained
68 syn match eCurlyError /[)\]]/ contained
69 syn match eParenError /[\]}]/ contained
71 " Define the default highlighting.
72 " For version 5.7 and earlier: only when not done already
73 " For version 5.8 and later: only when an item doesn't have highlighting yet
74 if version >= 508 || !exists("did_r_syn_inits")
75   if version < 508
76     let did_r_syn_inits = 1
77     command -nargs=+ HiLink hi link <args>
78   else
79     command -nargs=+ HiLink hi def link <args>
80   endif
81   HiLink eComment     Comment
82   HiLink eConstant    Identifier
83   HiLink eStringId    Identifier
84   HiLink eCommand     Type
85   HiLink eString      String
86   HiLink eNumber      Number
87   HiLink eBoolean     Boolean
88   HiLink eFloat       Float
89   HiLink eConditional Conditional
90   HiLink eProgLang    Statement
91   HiLink eOVP         Statement
92   HiLink eStdCmd      Statement
93   HiLink eIdentifier  Normal
94   HiLink eDelimiter   Delimiter
95   HiLink eError       Error
96   HiLink eBraceError  Error
97   HiLink eCurlyError  Error
98   HiLink eParenError  Error
99   delcommand HiLink
100 endif
102 let b:current_syntax="eviews"
104 " vim: ts=8 sw=2