xref: /vim-8.2.3635/runtime/syntax/eviews.vim (revision cb03397a)
1" Vim syntax file
2" Language:	Eviews (http://www.eviews.com)
3" Maintainer:	Vaidotas Zemlys <[email protected]>
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
9if version < 600
10  syntax clear
11elseif exists("b:current_syntax")
12  finish
13endif
14
15if version >= 600
16  setlocal iskeyword=@,48-57,_,.
17else
18  set iskeyword=@,48-57,_,.
19endif
20
21syn case match
22
23" Comment
24syn match eComment /\'.*/
25
26" Constant
27" string enclosed in double quotes
28syn region eString start=/"/ skip=/\\\\\|\\"/ end=/"/
29" number with no fractional part or exponent
30syn match eNumber /\d\+/
31" floating point number with integer and fractional parts and optional exponent
32syn match eFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/
33" floating point number with no integer part and optional exponent
34syn match eFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/
35" floating point number with no fractional part and optional exponent
36syn match eFloat /\d\+[Ee][-+]\=\d\+/
37
38" Identifier
39" identifier with leading letter and optional following keyword characters
40syn match eIdentifier /\a\k*/
41
42" Eviews Programing Language
43syn 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
44
45" Eviews Objects, Views and Procedures
46syn keyword eOVP alpha coef equation graph group link logl matrix model pool rowvector sample scalar series sspace sym system table text valmap var vector
47
48
49" Standard Eviews Commands
50syn 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
51
52" Constant Identifier
53syn match eConstant /\!\k*/
54" String Identifier
55syn match eStringId /%\k*/
56" Command Identifier
57syn match eCommand /@\k*/
58
59" Special
60syn match eDelimiter /[,;:]/
61
62" Error
63syn region eRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError
64syn region eRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError
65syn region eRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError
66syn match eError      /[)\]}]/
67syn match eBraceError /[)}]/ contained
68syn match eCurlyError /[)\]]/ contained
69syn match eParenError /[\]}]/ contained
70
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
74if 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
100endif
101
102let b:current_syntax="eviews"
103
104" vim: ts=8 sw=2
105