- created plugin
This commit is contained in:
28
syntax/binder.vim
Normal file
28
syntax/binder.vim
Normal file
@ -0,0 +1,28 @@
|
||||
" Vim syntax file
|
||||
" Language: Binder Language
|
||||
" Maintainer: Andreas Louv <andreas@louv.dk>
|
||||
" Last Change: Mar 20, 2019
|
||||
" Version: 1
|
||||
" URL: https://github.com/andlrc/rpgle.vim
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
let b:current_syntax = 'binder'
|
||||
syntax iskeyword @,48-57,192-255,-,*,/,_
|
||||
|
||||
syntax keyword binderKeywords STRPGMEXP ENDPGMEXP EXPORT SYMBOL PGMLVL LVLCHK SIGNATURE
|
||||
|
||||
syntax match binderSpecial /'[^']\+'/
|
||||
syntax match binderString /"[^"]\+"/
|
||||
syntax match binderIdentifier /\w\+/
|
||||
syntax keyword binderConstant *CURRENT *PRV
|
||||
|
||||
syntax sync fromstart
|
||||
|
||||
highlight link binderKeywords Keyword
|
||||
highlight link binderSpecial Special
|
||||
highlight link binderString String
|
||||
highlight link binderIdentifier Identifier
|
||||
highlight link binderConstant Constant
|
126
syntax/clle.vim
Normal file
126
syntax/clle.vim
Normal file
@ -0,0 +1,126 @@
|
||||
|
||||
" 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
|
523
syntax/rpgle.vim
Normal file
523
syntax/rpgle.vim
Normal file
@ -0,0 +1,523 @@
|
||||
" Vim syntax file
|
||||
" Language: Free-Form ILE RPG
|
||||
" Maintainer: Andreas Louv <andreas@louv.dk>
|
||||
" Last Change: Oct 21, 2019
|
||||
" Version: 81
|
||||
" URL: https://github.com/andlrc/rpgle.vim
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
"runtime! syntax/sqlanywhere.vim
|
||||
syntax include @esql syntax/sqlanywhere.vim
|
||||
|
||||
let b:current_syntax = 'rpgle'
|
||||
|
||||
syntax case ignore
|
||||
syntax iskeyword @,48-57,192-255,-,%,*,/,_
|
||||
|
||||
" Comments {{{
|
||||
|
||||
syntax match rpgleLineComment '//.*' contains=rpgleSpecialComment
|
||||
\ contains=@rpgleCommentProps
|
||||
syntax region rpgleBracketedComment start='/\*'
|
||||
\ end='\*/'
|
||||
\ contains=@rpgleCommentProps
|
||||
" syntax keyword rpgleSpecialComment BESCHREIBUNG AUTHOR ERSTELLDATUM PROGRAMMNUTZEN
|
||||
" \ ÄNDERUNGSDATUM
|
||||
syntax match rpgleSpecialComment '\(programmnutzen:\|beschreibung:\|author:\|erstelldatum:\|änderungsdatum:\|beispielaufruf:\|compilebefehl:\)'
|
||||
syntax cluster rpgleComment contains=rpgleLineComment,rpgleBracketedComment,rpgleSpecialComment
|
||||
|
||||
syntax cluster rpgleCommentProps contains=rpgleTodo,@Spell
|
||||
syntax keyword rpgleTodo contained TODO FIXME
|
||||
|
||||
syntax match rpgleDsReference '\(\w\+\.\)\+\w\+' contained contains=rpgleDsPath
|
||||
syntax match rpgleDsReferenceSql ':\(\w\+\.\)\+\w\+' contained contains=rpgleDsPath
|
||||
syntax match rpgleDsPath '\(\w\|\.\)\+\ze\.' contained nextgroup=rpgledsSeperator
|
||||
syntax match rpgleDsSeperator '\.' contained nextgroup=rpgleDsItem
|
||||
syntax match rpgleDsItem '\w\+' contained
|
||||
|
||||
syntax match rpgleSqlReference ':\zs\w\+' contained
|
||||
|
||||
syntax keyword db2SqlKeywords CLOSQLCSR DATFMT
|
||||
syntax keyword db2SqlValues *ENDMOD *NONE *ISO
|
||||
|
||||
" }}}
|
||||
" Compiler directive {{{
|
||||
|
||||
syntax keyword rpglePreProc **FREE
|
||||
|
||||
syntax keyword rpglePreProc /COPY /DEFINE /EJECT /ELSE /ELSEIF /END-FREE
|
||||
\ /ENDIF /EOF /FREE /IF /INCLUDE /RESTORE /SET
|
||||
\ /SPACE /TITLE /UNDEFINE /SET
|
||||
\ nextgroup=rpglePreProcValue
|
||||
|
||||
syntax match rpglePreProcValue /.*/ contained display
|
||||
|
||||
" }}}
|
||||
" Header Specs {{{
|
||||
|
||||
" CTL-OPT ... ;
|
||||
syntax region rpgleCtlSpec matchgroup=rpgleKeywords
|
||||
\ start=/\<CTL-OPT\>/
|
||||
\ end=/;/
|
||||
\ contains=@rpgleCtlProps
|
||||
syntax cluster rpgleCtlProps contains=rpgleCtlKeywords,rpgleNumber,
|
||||
\@rpgleString,rpgleConstant,rpgleError,
|
||||
\rpgleCtlParanBalance
|
||||
|
||||
syntax region rpgleCtlParanBalance matchgroup=xxx
|
||||
\ start=/(/
|
||||
\ end=/)/
|
||||
\ contains=@rpgleCtlProps
|
||||
|
||||
" Header Keywords
|
||||
syntax keyword rpgleCtlKeywords contained
|
||||
\ ALLOC ACTGRP ALTSEQ ALWNULL AUT BNDDIR CCSID
|
||||
\ CCSIDCVT COPYNEST COPYRIGHT CURSYM CVTOPT
|
||||
\ DATEDIT DATFMT DCLOPT DEBUG DECEDIT DECPREC
|
||||
\ DFTACTGRP DFTNAME ENBPFRCOL EXPROPTS
|
||||
\ EXTBININT FIXNBR FLYDIV FORMSALIGN FTRANS
|
||||
\ GENLVL INDENT INTPREC LANGID MAIN NOMAIN
|
||||
\ OPENOPT OPTIMIZE OPTION PGMINFO PRFDTA
|
||||
\ SRTSEQ STGMDL TEXT THREAD TIMFMT TRUNCNBR
|
||||
\ USERPRF VALIDATE REQPREXP
|
||||
|
||||
" }}}
|
||||
" Declaration Specs {{{
|
||||
|
||||
" Numbers and Strings
|
||||
|
||||
syntax match rpgleNumber display
|
||||
\ /\<-\=\%(\d\|\.\)\+\>/
|
||||
|
||||
syntax match rpgleError /\%(^\|\W\)\@1<='\_.\{-}'\W\@=/
|
||||
syntax match rpgleString /'\([+-]\n\|''\|[^']\)*'/ contains=rpgleStringProps
|
||||
syntax cluster rpgleString contains=rpgleString
|
||||
|
||||
if get(g:, 'rpgle_spellString', 1)
|
||||
syntax cluster rpgleStringProps contains=@Spell
|
||||
endif
|
||||
|
||||
" Constants
|
||||
syntax keyword rpgleConstant *ALL *BLANK *BLANKS *ENTRY *HIVAL *LOVAL *NULL
|
||||
\ *OFF *ON *ZERO *ZEROS *LOCK *ISO0 *HMS0 *EUR *UTF8
|
||||
\ *SYS *OMIT *ALLOC *REQUIRE *WARN *PROC *DATA
|
||||
|
||||
" *IN01 .. *IN99, *INH1 .. *INH9, *INL1 .. *INL9, *INLR, *INRT
|
||||
syntax match rpgleSpecialKey display /\%(\*IN0[1-9]\|\*IN[1-9][0-9]\)/
|
||||
syntax match rpgleSpecialKey display /\*INH[1-9]/
|
||||
syntax match rpgleSpecialKey display /\*INL[1-9]/
|
||||
syntax match rpgleSpecialKey display /\*INU[1-8]/
|
||||
syntax keyword rpgleSpecialKey *INLR *INRT
|
||||
|
||||
" Operators
|
||||
syntax match rpgleOperator display /<>/
|
||||
syntax match rpgleOperator display />=/
|
||||
syntax match rpgleOperator display /<=/
|
||||
syntax match rpgleOperator display /\<in\>/
|
||||
syntax match rpgleOperator display /\<to\>/
|
||||
syntax match rpgleOperator display /\<downto\>/
|
||||
syntax match rpgleOperator display /\<by\>/
|
||||
syntax match rpgleOperator display /\<out\>/
|
||||
syntax match rpgleOperator display /[*=><+]/
|
||||
syntax match rpgleOperator display /\<-\>/
|
||||
|
||||
" Standalone, Constant
|
||||
syntax region rpgleDclSpec display matchgroup=rpgleDclKeywords
|
||||
\ start=/\<DCL-[SCF]\>/
|
||||
\ end=/$/
|
||||
\ contains=rpgleDclProp
|
||||
|
||||
" Procedure Interface
|
||||
syntax keyword rpgleError END-PI
|
||||
syntax region rpgleDclSpec matchgroup=rpgleDclKeywords
|
||||
\ keepend
|
||||
\ start=/\<DCL-PI\>/
|
||||
\ end=/\<END-PI\>/
|
||||
\ contains=rpgleDclProp,rpgleDclPiName
|
||||
\ fold
|
||||
|
||||
" Special PI Name
|
||||
syntax keyword rpgleDclPiName *N
|
||||
|
||||
" Prototype
|
||||
syntax keyword rpgleError END-PR
|
||||
syntax region rpgleDclSpec matchgroup=rpgleDclKeywords
|
||||
\ keepend
|
||||
\ start=/\<DCL-PR\>/
|
||||
\ end=/\(\<END-PR\>\|OVERLOAD\)/
|
||||
\ contains=rpgleDclProp
|
||||
\ fold
|
||||
|
||||
" Data Structure
|
||||
syntax keyword rpgleError LIKEDS LIKEREC END-DS
|
||||
|
||||
syntax keyword rpgleError ;;
|
||||
|
||||
syntax region rpgleDclSpec matchgroup=rpgleDclKeywords
|
||||
\ keepend
|
||||
\ start=/\<DCL-DS\>/
|
||||
\ end=/\<END-DS\>/
|
||||
\ contains=rpgleDclProp
|
||||
|
||||
" These this syntax regions cannot be "display", even though it is on one line,
|
||||
" as the rule above could be matched wrongly then.
|
||||
syntax region rpgleDclSpec matchgroup=rpgleDclKeywords
|
||||
\ start=/\<DCL-DS\>\ze.*LIKEDS/
|
||||
\ start=/\<DCL-DS\>\ze.*LIKEREC/
|
||||
\ end=/$/
|
||||
\ contains=rpgleDclProp
|
||||
|
||||
" Declaration Types
|
||||
syntax keyword rpgleDclTypes contained
|
||||
\ BINDEC CHAR DATE DATE FLOAT GRAPH IND INT OBJECT
|
||||
\ PACKED POINTER TIME TIMESTAMP UCS2 UCS2 UNS
|
||||
\ VARCHAR VARGRAPH VARUCS2 ZONED
|
||||
|
||||
" Declaration Keywords
|
||||
syntax keyword rpgleDclKeywords contained
|
||||
\ ALIAS ALIGN ALT ALTSEQ ASCEND BASED CCSID
|
||||
\ CLASS CONST CTDATA DATFMT DESCEND DIM DTAARA
|
||||
\ EXPORT EXT EXTFLD EXTFMT EXTNAME EXTPGM
|
||||
\ EXTPROC FROMFILE IMPORT INZ LEN LIKE LIKEDS
|
||||
\ LIKEFILE LIKEREC NOOPT NULLIND OCCURS OPDESC
|
||||
\ OPTIONS OVERLAY PACKEVEN PERRCD POS PREFIX
|
||||
\ PSDS QUALIFIED RTNPARM STATIC TEMPLATE TIMFMT
|
||||
\ TOFILE VALUE PRINTER USROPN OFLIND INDDS WORKSTN
|
||||
\ SFILE INFDS SQLTYPE OVERLOAD
|
||||
|
||||
|
||||
" Declaration Constants
|
||||
syntax keyword rpgleDclSpecialKeys contained
|
||||
\ *NOPASS *OMIT *VARSIZE *STRING *RIGHTADJ *AUTO *VAR *DCLCASE *EXACT
|
||||
\ *TRIM
|
||||
|
||||
syntax keyword rpgleDclSqlTypes contained
|
||||
\ CLOB CLOB_LOCATOR DBCLOB DBCLOB_LOCATOR
|
||||
\ BLOB BLOB_LOCATOR
|
||||
\ BINARY VARBINARY
|
||||
\ XML_CLOB XML_DBCLOB XML_BLOB XML_LOCATOR
|
||||
\ XML_BLOB_FILE XML_CLOB_FILE XML_DBCLOB_FILE
|
||||
\ BLOB_FILE CLOB_FILE DBCLOB_FILE
|
||||
\ ROW_ID RESULT_SET_LOCATOR
|
||||
|
||||
syntax region rpgleDclParenBalance matchgroup=rpgleDclBrackets
|
||||
\ start=/(/
|
||||
\ end=/)/
|
||||
\ contains=@rpgleComment,rpgleDclSpecialKeys,rpgleDclSqlTypes,
|
||||
\rpgleNumber,@rpgleString,
|
||||
\rpgleConstant,rpgleError,
|
||||
\rpgleDclParenBalance,rpgleBIF
|
||||
|
||||
|
||||
syntax match rpgleDclProp /\s*/ contained nextgroup=rpgleDclPropName
|
||||
syntax match rpgleDclPropName /\k\+/ contained nextgroup=rpgleDclPropTail
|
||||
\ contains=@rpgleComment
|
||||
syntax match rpgleDclPropTail /.\+/ contained
|
||||
\ contains=@rpgleComment,rpgleDclTypes,
|
||||
\rpgleDclKeywords,rpgleError,
|
||||
\rpgleDclParenBalance
|
||||
|
||||
" }}}
|
||||
" Calculation Specs {{{
|
||||
|
||||
" IF ... ENDIF
|
||||
syntax keyword rpgleError ENDIF
|
||||
syntax region rpgleIf matchgroup=rpgleConditional
|
||||
\ start=/\<IF\>/
|
||||
\ end=/\<ENDIF\>/
|
||||
\ contains=@rpgleNest,rpgleElse
|
||||
\ fold
|
||||
|
||||
" ELSE ELSEIF
|
||||
syntax keyword rpgleError ELSE ELSEIF
|
||||
syntax keyword rpgleElse contained ELSE ELSEIF
|
||||
|
||||
" NOT, AND, OR
|
||||
syntax keyword rpgleConditional NOT AND OR
|
||||
|
||||
" DOW .. ENDDO, DOU .. ENDDO
|
||||
syntax keyword rpgleError ENDDO
|
||||
syntax region rpgleDo matchgroup=rpgleRepeat
|
||||
\ start=/\<DO[WU]\>/
|
||||
\ end=/\<ENDDO\>/
|
||||
\ contains=@rpgleNest
|
||||
\ fold
|
||||
|
||||
" FOR ... ENDFOR
|
||||
syntax region rpgleFor matchgroup=rpgleRepeat
|
||||
\ start=/\<FOR\>/
|
||||
\ end=/\<ENDFOR\>/
|
||||
\ contains=@rpgleNest
|
||||
\ fold
|
||||
syntax keyword rpgleError ENDFOR
|
||||
|
||||
syntax region rpgleForEach matchgroup=rpgleRepeat
|
||||
\ start=/\<FOR-EACH\>/
|
||||
\ end=/\<ENDFOR\>/
|
||||
\ contains=@rpgleNest
|
||||
\ fold
|
||||
|
||||
" ITER, LEAVE
|
||||
syntax keyword rpgleRepeat contained ITER LEAVE
|
||||
|
||||
" MONITOR ... ENDMON
|
||||
syntax keyword rpgleError ENDMON
|
||||
syntax region rpgleMonitor matchgroup=rpgleConditional
|
||||
\ start=/\<MONITOR\>/
|
||||
\ end=/\<ENDMON\>/
|
||||
\ contains=@rpgleNest,rpgleOnError
|
||||
\ fold
|
||||
|
||||
" ON-ERROR
|
||||
syntax keyword rpgleError ON-ERROR
|
||||
syntax keyword rpgleOnError contained ON-ERROR
|
||||
|
||||
" ON-EXIT
|
||||
syntax keyword rpgleOnExit contained ON-EXIT
|
||||
|
||||
" SELECT ... ENDSL
|
||||
syntax keyword rpgleError ENDSL
|
||||
syntax region rpgleSelect matchgroup=rpgleKeywords
|
||||
\ start=/\<SELECT\>/
|
||||
\ end=/\<ENDSL\>/
|
||||
\ contains=@rpgleNest,rpgleWhenOther
|
||||
\ fold
|
||||
|
||||
" WHEN, OTHER
|
||||
syntax keyword rpgleError WHEN OTHER
|
||||
syntax keyword rpgleWhenOther contained WHEN OTHER
|
||||
|
||||
" Exec SQL
|
||||
syntax region rpgleSql matchgroup=rpgleKeywords
|
||||
\ start=/\<EXEC\_s\+SQL\>/
|
||||
\ end=/;/
|
||||
\ contains=@esql,rpgleDsReferenceSql,rpgleSqlReference,db2SqlKeywords,
|
||||
\ db2SqlValues
|
||||
|
||||
" Build In Functions
|
||||
syntax match rpgleError /%\w\+/
|
||||
|
||||
syntax keyword rpgleBIF %ABS
|
||||
\ %ADDR
|
||||
\ %ALLOC
|
||||
\ %BITAND
|
||||
\ %BITNOT
|
||||
\ %BITOR
|
||||
\ %BITXOR
|
||||
\ %CHAR
|
||||
\ %CHECK
|
||||
\ %CHECKR
|
||||
\ %DATA
|
||||
\ %GEN
|
||||
\ %OKEDOKE
|
||||
\ %DATE
|
||||
\ %DAYS
|
||||
\ %DEC
|
||||
\ %DECH
|
||||
\ %DECPOS
|
||||
\ %DIFF
|
||||
\ %DIV
|
||||
\ %EDITC
|
||||
\ %EDITFLT
|
||||
\ %EDITW
|
||||
\ %ELEM
|
||||
\ %EOF
|
||||
\ %EQUAL
|
||||
\ %ERROR
|
||||
\ %FIELDS
|
||||
\ %FLOAT
|
||||
\ %FOUND
|
||||
\ %GRAPH
|
||||
\ %HANDLER
|
||||
\ %HOURS
|
||||
\ %INT
|
||||
\ %INTH
|
||||
\ %KDS
|
||||
\ %LEN
|
||||
\ %LOOKUP
|
||||
\ %LOOKUPLT
|
||||
\ %LOOKUPLE
|
||||
\ %LOOKUPGT
|
||||
\ %LOOKUPGE
|
||||
\ %MAX
|
||||
\ %MIN
|
||||
\ %MINUTES
|
||||
\ %MONTHS
|
||||
\ %MSECONDS
|
||||
\ %NULLIND
|
||||
\ %OCCUR
|
||||
\ %OPEN
|
||||
\ %PADDR
|
||||
\ %PARMS
|
||||
\ %PARMNUM
|
||||
\ %PARSER
|
||||
\ %PROC
|
||||
\ %REALLOC
|
||||
\ %REM
|
||||
\ %REPLACE
|
||||
\ %SCAN
|
||||
\ %SCANR
|
||||
\ %SCANRPL
|
||||
\ %SECONDS
|
||||
\ %SHTDN
|
||||
\ %SIZE
|
||||
\ %SQRT
|
||||
\ %STATUS
|
||||
\ %STR
|
||||
\ %SUBARR
|
||||
\ %SUBDT
|
||||
\ %SUBST
|
||||
\ %THIS
|
||||
\ %TIME
|
||||
\ %TIMESTAMP
|
||||
\ %TLOOKUPxx
|
||||
\ %TRIM
|
||||
\ %TRIML
|
||||
\ %TRIMR
|
||||
\ %UCS2
|
||||
\ %UNS
|
||||
\ %UNSH
|
||||
\ %XFOOT
|
||||
\ %XLATE
|
||||
\ %XML
|
||||
\ %YEARS
|
||||
\ %RANGE
|
||||
\ %LIST
|
||||
\ %UPPER
|
||||
\ %LOWER
|
||||
|
||||
" Procedures, the match group is to avoid infinite recursion as a
|
||||
" ``rpgleProcCall'' can be within another ``rpgleProcCall''
|
||||
syntax match rpgleError /)/
|
||||
syntax region rpgleProcCall matchgroup=rpgleProcCallName
|
||||
\ start=/%\@1<!\<\w\+(/
|
||||
\ end=/)/
|
||||
\ contains=@rpgleProcArgs
|
||||
\ nextgroup=rpgleDsSeperator
|
||||
|
||||
"syntax region rpgleDsArray \.\w\+
|
||||
|
||||
syntax cluster rpgleProcArgs contains=rpgleBIF,@rpgleComment,rpgleConstant,
|
||||
\rpgleNumber,rpglePreProc,rpgleProcCall,
|
||||
\rpgleSpecialKey,
|
||||
\@rpgleString,rpgleError,rpgleParenBalance,rpgleDsReference,
|
||||
\rpgleConstant
|
||||
syntax keyword rpgleKeywords RETURN
|
||||
\ SORTA
|
||||
\ SORTD
|
||||
\ WRITE
|
||||
\ OPEN
|
||||
\ CLOSE
|
||||
\ EXFMT
|
||||
\ DSPLY
|
||||
\ READC
|
||||
\ CLEAR
|
||||
\ DATA-GEN
|
||||
\ READ
|
||||
\ CHAIN
|
||||
\ UPDATE
|
||||
\ EVAL
|
||||
\ EVALR
|
||||
\ DUMP
|
||||
|
||||
" BEGSR .. ENDSR
|
||||
syntax keyword rpgleError ENDSR
|
||||
syntax region rpgleSub matchgroup=rpgleKeywords
|
||||
\ start=/\<BEGSR\>/
|
||||
\ end=/\<ENDSR\>/
|
||||
\ contains=@rpgleNest
|
||||
\ fold
|
||||
|
||||
" EXSR
|
||||
syntax keyword rpgleKeywords EXSR
|
||||
|
||||
" }}}
|
||||
" Procedure Specs {{{
|
||||
|
||||
syntax region rpgleDclProcBody matchgroup=rpgleDclProc
|
||||
\ start=/\<DCL-PROC\>/
|
||||
\ end=/\<END-PROC\>/
|
||||
\ contains=@rpgleDclProcNest
|
||||
\ fold
|
||||
syntax cluster rpgleDclProcNest contains=@rpgleNest,rpgleSub,rpgleDclSpec,
|
||||
\rpgleDclProcName,rpgleError,rpgleOnExit
|
||||
syntax keyword rpgleError END-PROC
|
||||
|
||||
" Procedure Name
|
||||
syntax match rpgleDclProcName display contained skipwhite
|
||||
\ /\%(DCL-PROC\s\+\)\@10<=\w\+/
|
||||
\ nextgroup=rpgleDclProcExport
|
||||
|
||||
" Export
|
||||
syntax keyword rpgleDclProcExport contained EXPORT
|
||||
|
||||
" }}}
|
||||
|
||||
syntax region rpgleParenBalance matchgroup=rpgleBIFBrackets
|
||||
\ start=/(/
|
||||
\ end=/)/
|
||||
\ contains=@rpgleNest
|
||||
|
||||
" All nestable groups, i.e. mostly Calculation Spec keywords:
|
||||
syntax cluster rpgleNest contains=rpgleBIF,@rpgleComment,rpgleConditional,
|
||||
\rpgleConstant,rpgleDo,rpgleFor,rpgleForEach,rpgleIf,
|
||||
\rpgleKeywords,rpgleMonitor,rpgleNumber,
|
||||
\rpgleOperator,rpglePreProc,rpgleProcCall,
|
||||
\rpgleRepeat,rpgleSelect,rpgleSpecialKey,
|
||||
\rpgleSql,@rpgleString,rpgleError,
|
||||
\rpgleParenBalance,rpgleDsReference
|
||||
|
||||
"syntax match rpgleDclProcName display skipwhite /\k*\ze\((.*)\)/
|
||||
|
||||
syntax sync fromstart
|
||||
|
||||
highlight link rpgleProcCallName Function
|
||||
highlight link rpgleError Error
|
||||
highlight link rpglePreProc PreProc
|
||||
highlight link rpgleProc Function
|
||||
highlight link rpgleSpecialKey SpecialKey
|
||||
highlight link rpgleNumber Number
|
||||
highlight link rpgleString String
|
||||
highlight link rpgleOperator Operator
|
||||
highlight link rpgleComment Comment
|
||||
highlight link rpgleSpecialComment SpecialComment
|
||||
highlight link rpgleTodo Todo
|
||||
highlight link rpgleConstant Constant
|
||||
highlight link rpgleConditional Conditional
|
||||
highlight link rpgleRepeat Repeat
|
||||
highlight link rpgleKeywords Keyword
|
||||
highlight link rpgleSpecial Special
|
||||
highlight link rpgleTypes Type
|
||||
highlight link rpgleDsReference Operator
|
||||
highlight link rpgleDsPath PreProc
|
||||
highlight link rpgleDsItem Identifier
|
||||
highlight link rpgleSqlReference Identifier
|
||||
highlight link db2SqlKeywords Conditional
|
||||
highlight link db2SqlValues PreProc
|
||||
|
||||
highlight link rpgleLineComment rpgleComment
|
||||
highlight link rpgleBracketedComment rpgleComment
|
||||
|
||||
highlight link rpgleCtlKeywords rpgleKeywords
|
||||
highlight link rpgleDclTypes rpgleTypes
|
||||
highlight link rpgleDclSqlTypes rpgleTypes
|
||||
highlight link rpgleDclKeywords rpgleKeywords
|
||||
highlight link rpgleDclProc rpgleKeywords
|
||||
highlight link rpgleDclProcExport rpgleKeywords
|
||||
highlight link rpgleDclProcName rpgleProc
|
||||
highlight link rpgleDclPiName rpgleSpecial
|
||||
highlight link rpgleDclSpecialKeys rpgleSpecialKey
|
||||
highlight link rpgleElse rpgleConditional
|
||||
highlight link rpgleOnError rpgleKeywords
|
||||
highlight link rpgleOnExit rpgleKeywords
|
||||
highlight link rpgleWhenOther rpgleKeywords
|
||||
highlight link rpgleBIF rpgleSpecial
|
||||
highlight link rpgleBIFBrackets rpgleSpecial
|
||||
highlight link rpgleDclBrackets Comment
|
||||
|
||||
highlight link rpgleDclPropName Constant
|
||||
|
||||
" vim: foldmethod=marker
|
Reference in New Issue
Block a user