blob: 03cfb25e60b73c796a3e8c9c8dee8e7cfe07e6d4 [file] [log] [blame]
Bram Moolenaar4770d092006-01-12 23:22:24 +00001" Vim syntax file
2" Language: Eviews (http://www.eviews.com)
3" Maintainer: Vaidotas Zemlys <zemlys@gmail.com>
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00004" Last Change: 2006 Apr 30
Bram Moolenaar4770d092006-01-12 23:22:24 +00005" Filenames: *.prg
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006" URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/eviews.vim
Bram Moolenaar89bcfda2016-08-30 23:26:57 +02007" quit when a syntax file was already loaded
8if exists("b:current_syntax")
Bram Moolenaar4770d092006-01-12 23:22:24 +00009 finish
10endif
11
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020012setlocal iskeyword=@,48-57,_,.
Bram Moolenaar4770d092006-01-12 23:22:24 +000013
14syn case match
15
16" Comment
17syn match eComment /\'.*/
18
19" Constant
20" string enclosed in double quotes
21syn region eString start=/"/ skip=/\\\\\|\\"/ end=/"/
22" number with no fractional part or exponent
23syn match eNumber /\d\+/
24" floating point number with integer and fractional parts and optional exponent
25syn match eFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/
26" floating point number with no integer part and optional exponent
27syn match eFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/
28" floating point number with no fractional part and optional exponent
29syn match eFloat /\d\+[Ee][-+]\=\d\+/
30
31" Identifier
32" identifier with leading letter and optional following keyword characters
33syn match eIdentifier /\a\k*/
34
35" Eviews Programing Language
36syn 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
37
38" Eviews Objects, Views and Procedures
39syn keyword eOVP alpha coef equation graph group link logl matrix model pool rowvector sample scalar series sspace sym system table text valmap var vector
40
41
42" Standard Eviews Commands
43syn 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
44
45" Constant Identifier
46syn match eConstant /\!\k*/
47" String Identifier
48syn match eStringId /%\k*/
49" Command Identifier
50syn match eCommand /@\k*/
51
52" Special
53syn match eDelimiter /[,;:]/
54
55" Error
56syn region eRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError
57syn region eRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError
58syn region eRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError
59syn match eError /[)\]}]/
60syn match eBraceError /[)}]/ contained
61syn match eCurlyError /[)\]]/ contained
62syn match eParenError /[\]}]/ contained
63
64" Define the default highlighting.
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020065" Only when an item doesn't have highlighting yet
Bram Moolenaarf37506f2016-08-31 22:22:10 +020066hi def link eComment Comment
67hi def link eConstant Identifier
68hi def link eStringId Identifier
69hi def link eCommand Type
70hi def link eString String
71hi def link eNumber Number
72hi def link eBoolean Boolean
73hi def link eFloat Float
74hi def link eConditional Conditional
75hi def link eProgLang Statement
76hi def link eOVP Statement
77hi def link eStdCmd Statement
78hi def link eIdentifier Normal
79hi def link eDelimiter Delimiter
80hi def link eError Error
81hi def link eBraceError Error
82hi def link eCurlyError Error
83hi def link eParenError Error
Bram Moolenaar4770d092006-01-12 23:22:24 +000084
85let b:current_syntax="eviews"
86
87" vim: ts=8 sw=2