127 lines
4.2 KiB
VimL
127 lines
4.2 KiB
VimL
|
|
" if exists('b:current_syntax')
|
|
" finish
|
|
" endif
|
|
|
|
" let b:current_syntax = 'clle'
|
|
|
|
" syntax case ignore
|
|
" syntax iskeyword @,48-57,192-255,-,%,*,/,_
|
|
|
|
|
|
" syntax region clleProgramm matchgroup=clleBlock
|
|
" \ start=/\<PGM\>/
|
|
" \ end=/\<ENDPGM\>/
|
|
" \ contains=@clleNest
|
|
|
|
" syntax region clleMon matchgroup=clleBlock
|
|
" \ start=/\<MONMSG\>/
|
|
" \ end=/\<ENDDO\>/
|
|
" \ contains=@clleNest
|
|
|
|
" syntax region clleDclSpec display matchgroup=clleDclKeywords
|
|
" \ start=/\<DCL\>/
|
|
" \ end=/$/
|
|
" \ contains=clleDclProp,clleDclParms,clleParm,
|
|
|
|
" syntax region clleVarMut matchgroup=clleMutKeywords
|
|
" \ start=/\<CHGVAR\>/
|
|
" \ end=/$/
|
|
" \ contains=clleDclParms
|
|
|
|
" syntax match clleCmd /-\n\w\+/
|
|
" \ nextgroup=clleParms
|
|
|
|
" syntax match clleDclProp /\s*/ contained nextgroup=clleDclPropName
|
|
" syntax match clleDclPropName /&\k\+/ contained
|
|
|
|
" " syntax match clleParm /\w\+\ze(/ contained nextgroup=clleParenBalance
|
|
|
|
" syntax region clleParenBalance matchgroup=clleBIFBrackets
|
|
" \ start=/(/
|
|
" \ end=/)/
|
|
" \ contains=@clleNest
|
|
|
|
" syntax cluster clleNest contains=clleBlock,clleCommand,clleMon,clleDclSpec,clleTypes,clleVarMut,
|
|
" \ clleKeyParams
|
|
|
|
" syntax region clleComment matchgroup=clleCommentSigns
|
|
" \ start=/\/\*/
|
|
" \ end=/\*\//
|
|
|
|
" syntax keyword clleTypes contained *DEC *CHAR *YES *NO
|
|
|
|
" syntax keyword clleDclParms contained TYPE LEN VALUE VAR
|
|
|
|
" syntax match clleKeyParams /\*\w\+/ contained
|
|
|
|
|
|
|
|
" highlight link clleKeyParams SpecialKey
|
|
" highlight link clleCommentSigns Comment
|
|
" highlight link clleComment Comment
|
|
" highlight link clleCmd Function
|
|
" highlight link clleCommand Function
|
|
" " highlight link clleMon Conditional
|
|
" highlight link clleBlock Conditional
|
|
" highlight link clleDclKeywords Keyword
|
|
" highlight link clleMutKeywords Function
|
|
" highlight link clleDclPropName Constant
|
|
" highlight link clleDclParms Keyword
|
|
" highlight link clleTypes Type
|
|
" highlight link clleBIFBrackets Comment
|
|
" Vim syntax for CLLE
|
|
" This may use some of the Rexx code, but probably not.
|
|
" The Command/Program keyword lists will need to be modified as I come across
|
|
" more
|
|
|
|
syntax case ignore
|
|
|
|
syntax match clleLabel /^[^/*]*:/
|
|
highlight link clleLabel labels
|
|
|
|
syntax region clleComment start="/\*" end="\*/" contains=clleComment
|
|
highlight link clleComment comment
|
|
|
|
syntax match clleParam /[^ ]\{1}[^ %]*(/hs=s+0,he=e-1
|
|
highlight link clleParam type
|
|
|
|
syntax region clleString start=/'/ skip=/''/ end=/'/ oneline
|
|
highlight link clleString string
|
|
|
|
syntax match clleVariable /&[^) ]*/
|
|
highlight link clleVariable identifier
|
|
|
|
syntax keyword clleControl if do goto enddo else dofor return
|
|
highlight link clleControl keyword
|
|
|
|
syntax keyword clleCommand pgm dcl dclf monmsg chgvar subr endsubr callsubr call endpgm
|
|
\ rtvjoba rtvneta rcvf rtvusrprf
|
|
highlight link clleCommand keyword
|
|
|
|
syntax match clleKeyword /\*\w\+/
|
|
highlight link clleKeyword Special
|
|
|
|
syntax keyword clleProgram sndpgmmsg rmvlible addlible chkobj cpylib rtvdtaara
|
|
\ rtvmsg sndpgmmsg ovrprtf dltf crtpf crtlf clrpfm ovrdbf dltovr cpyf
|
|
\ crtddmf rclddmcnv crtsavf clrsavf savobj savlib rstobj rstlib ftp cf
|
|
\ clrlib rgzpfm dspffd chgdtaara ovrmsgf chgjob rmvmsg clof
|
|
\ sbmjob dspobjd opndbf cpysrcf dltmod movobj crtdtaq dltdtaq crtsqlrpgi
|
|
\ crtsrvpgm
|
|
highlight link clleProgram keyword
|
|
|
|
setlocal iskeyword+=%
|
|
syntax keyword clleBIF %address %addr %binary %bin %offset %ofs %substring %sst %switch
|
|
highlight link clleBIF BIF
|
|
|
|
setlocal iskeyword+=*
|
|
syntax keyword clleChoices *char *dec *int *defined *auto *based *blank
|
|
\ *eq *gt *ge *ne *lt *le *and *or *no *yes *nolist *nomax *nosrc
|
|
\ *last *first *dtaara *lib *libl *add *replace *savf *all
|
|
\ *cat *tcat *bcat *ip *lda *mdy *dmy *ymd *prv *ext *status
|
|
highlight link clleChoices preproc
|
|
|
|
" groups
|
|
highlight BIF guifg=red
|
|
highlight labels guifg=darkgrey
|