From 029f72b1a93430b24b88eb3a72c6114d9f149737 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 10 Apr 2024 22:09:20 +0200 Subject: Adding upstream version 2:9.1.0016. Signed-off-by: Daniel Baumann --- runtime/syntax/baan.vim | 1917 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1917 insertions(+) create mode 100644 runtime/syntax/baan.vim (limited to 'runtime/syntax/baan.vim') diff --git a/runtime/syntax/baan.vim b/runtime/syntax/baan.vim new file mode 100644 index 0000000..9a42a43 --- /dev/null +++ b/runtime/syntax/baan.vim @@ -0,0 +1,1917 @@ +" Vim syntax file" +" Language: Baan +" Maintainer: Erik Remmelzwaal (erik.remmelzwaal 0x40 ssaglobal.com) +" Originally owned by: Erwin Smit / Her van de Vliert +" Last change: v1.17 2006/04/26 10:40:18 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +"********************************** Lexical setting ***************************" +syn case ignore +setlocal iskeyword+=. +"setlocal ignorecase "This is not a local yet ;-( +" Identifier +syn match baanIdentifier "\<\k\+\>" + +"************************************* 3GL ************************************" +syn match baan3glpre "#ident\>" +syn match baan3glpre "#include\>" +syn region baan3glpre start="#define\>" end="^[^^|]"me=s-1 contains=baanString,baanConstant,baanNumber,baanComment,baansql +syn match baan3glpre "#undef\>" +syn match baan3glpre "#pragma\>" +syn match baan3glpre "#if\>" +syn match baan3glpre "#ifdef\>" +syn match baan3glpre "#ifndef\>" +syn match baan3glpre "#elif\>" +syn match baan3glpre "#else\>" +syn match baan3glpre "#endif\>" + +" Some keywords are only defined when no foldinat based break bset call continue default +syn keyword baan3gl empty fixed ge global goto gt le lt mb +syn keyword baan3gl multibyte ne ofr prompt repeat static step stop +syn keyword baan3gl until void wherebind ref reference break continue +syn keyword baan3gl and or to not in +syn keyword baan3gl eq input end return at print +syn keyword baanType domain double long string table boolean common +syn keyword baanType bset void xmlNode +syn keyword baanStorageClass dim base based extern global fixed MB const +syn keyword baanConstant pi true false + +" Folding settings +if exists("baan_fold") && baan_fold + syn region baanFunctionFold matchgroup=baan3gl start="^\z(\s*\)\" matchgroup=NONE end="^\z1}" transparent fold keepend +else + syn keyword baan3gl function +endif +if exists("baan_fold") && baan_fold && exists("baan_fold_block") && baan_fold_block + syn region baanCondFold matchgroup=baanConditional start="^\z(\s*\)\(if\>\|else\>\)" end="^\z1endif\>" end="^\z1else\>"me=s-1 transparent fold keepend extend + syn region baanCondFold matchgroup=baanConditional start="^\z(\s*\)for\>" end="^\z1endfor\>" transparent fold keepend extend + syn region baanCondFold matchgroup=baanConditional start="^\z(\s*\)while\>" end="^\z1endwhile\>" transparent fold keepend extend + syn region baanDLLUsage matchgroup=baan3gl start="^\z(\s*\)dllusage\>" end="^\z1enddllusage\>" fold contains=baanNumber,baanConstant,baanType + syn region baanFunUsage matchgroup=baan3gl start="^\z(\s*\)functionusage\>" end="^\z1endfunctionusage\>" fold contains=baanNumber,baanConstant,baanType + syn region baanCondFold matchgroup=baanConditional start="^\z(\s*\)\(case\>\|default\>\)\>" end="^\z1endcase\>" end="^\z1\(case\>\|default\>\)"me=s-1 transparent fold keepend extend + syn keyword baanConditional then else endif while endwhile endfor case endcase + syn match baanConditional "\" +else + syn match baanConditional "\" contains=baansql + syn match baanConditional "\" + syn keyword baanConditional if then else endif while endwhile endfor case endcase default + syn region baanDLLUsage matchgroup=baan3gl start="\" end="\" contains=baanNumber,baanConstant,baanType + syn region baanFunUsage matchgroup=baan3gl start="\" end="\" contains=baanNumber,baanConstant,baanType +endif + +"************************************* SQL ************************************" +syn keyword baansql from selectbind +syn keyword baansql where wherebind whereused exsists +syn keyword baansql between inrange having +syn keyword baansql hint ordered asc desc +syn match baansql "\" +syn match baansql "\" +syn match baansql "\" +syn match baansql "\" +syn match baansql "\" +syn match baansql "\" +syn match baansql "\" +syn match baansql "\" +syn match baansql "\" +" references +syn keyword path reference +syn match baansql "\" +syn match baansql "\" +syn match baansql "\" +syn match baansql "\" +syn match baansql "\" +" hints +syn keyword baansql hint and ordered asc desc +syn match baansql "\" +syn match baansql "\" +syn match baansql "\" +syn match baansql "\" +syn match baansql "\" +syn match baansql "\" +syn match baansql "\" +syn match baansql "\" +" update +syn keyword baansql set + +if exists("baan_fold") && baan_fold && exists("baan_fold_sql") && baan_fold_sql + syn region baanSQLFold matchgroup=baansql start="^\z(\s*\)\(select\>\|selectdo\>\|selectempty\>\|selecterror\>\|selecteos\>\)" end="^\z1endselect\>" end="^\z1\(selectdo\>\|selectempty\>\|selecterror\>\|selecteos\>\)"me=s-1 transparent fold keepend extend + "syn region baanSQLFold matchgroup=baansql start="^\z(\s*\)\(update\>\|updateempty\>\|updateerror\>\|selecteos\>\)" end="^\z1endupdate\>" end="^\z1\(updateempty\>\|updateerror\>\|selecteos\>\)"me=s-1 transparent fold keepend extend + syn region baanSQLFold matchgroup=baansql start="^\z(\s*\)\(update\>\|updateempty\>\|updateerror\>\)" end="^\z1endupdate\>" end="^\z1\(updateempty\>\|updateerror\>\)"me=s-1 transparent fold keepend extend + syn region baanSQLFold matchgroup=baansql start="^\z(\s*\)\(delete\s\+from\>\|deleteempty\>\|deleteerror\>\)" end="^\z1enddelete\>" end="^\z1\(deleteempty\>\|deleteerror\>\)"me=s-1 transparent fold keepend extend +else + syn keyword baansql select selectdo selectempty selecterror selecteos endselect + " delete + syn match baansql "\" + syn keyword baansql deleteempty deleteerror deleteeos enddelete + " update + syn keyword baansql update updateempty updateerror updateeos endupdate +endif + +setlocal foldmethod=syntax +"syn sync fromstart +syn sync minlines=100 + + +"These are bshell functions +if exists("baan_obsolete") +syn match baansql "commit\.transaction()" +syn match baansql "abort\.transaction()" +syn match baansql "db\.columns\.to\.record" +syn match baansql "db\.record\.to\.columns" +syn match baansql "db\.bind" +syn match baansql "db\.change\.order" +syn match baansql "db\.set\.to\.default" +syn match baansql "DB\.RETRY" +syn match baansql "db\.delayed\.lock" +syn match baansql "db\.retry\.point()" +syn match baansql "db\.retry\.hit()" +syn match baansql "db\.return\.dupl" +syn match baansql "db\.skip\.dupl" +syn match baansql "db\.row\.length" +endif + +" Constants +syn keyword baanConstant __function__ +syn keyword baanConstant __object__ +syn keyword baanConstant __file__ +syn keyword baanConstant __line__ + +syn keyword baanConstant ABORT.PROGRAM +syn keyword baanConstant ADD.SET +syn keyword baanConstant ALL_ENUMS_EXCEPT +syn keyword baanConstant APPL.EXCL +syn keyword baanConstant APPL.READ +syn keyword baanConstant APPL.WAIT +syn keyword baanConstant APPL.WIDE +syn keyword baanConstant APPL.WRITE +syn keyword baanConstant ASK.HELPINFO +syn keyword baanConstant AUTG_PRINT +syn keyword baanConstant AUTG_DISPLAY +syn keyword baanConstant AUTG_MODIFY +syn keyword baanConstant AUTG_INSERT +syn keyword baanConstant AUTG_DELETE +syn keyword baanConstant AUTG_ALL +syn keyword baanConstant BMS +syn keyword baanConstant CALCULATOR +syn keyword baanConstant CALENDAR +syn keyword baanConstant CHANGE.ORDER +syn keyword baanConstant CMD.OPTIONS +syn keyword baanConstant CMD.WHATS.THIS +syn keyword baanConstant CMF.MESSAGE +syn keyword baanConstant CMF.TASK +syn keyword baanConstant CMF.APPOINTMENT +syn match baanConstant "\" +"number with dot" +syn match baanNumber "\<\-\=\d\+\.\d*\>" +"number starting with a dot" +syn match baanNumber "\<\-\=\.\d\+\>" + +" String Error does not work correct with vim 6.0 +syn match baanOpenStringError +^[^^"]+ display contained excludenl +syn region baanString start=+"+ skip=+""+ end=+"+ end=+^[^^]+ contains=baanOpenStringError keepend + +" Comment" +syn match baanComment "|$" +syn match baanComment "|.$" +syn match baanComment "|[^ ]" +syn match baanComment "|[^#].*[^ ]" +syn match baanCommenth "^|#lra.*$" +syn match baanCommenth "^|#mdm.*$" +syn match baanCommenth "^|#[0-9][0-9][0-9][0-9][0-9].*$" +syn match baanCommenth "^|#N\=o\=Include.*$" +" Oldcode" +syn match baanUncommented "^|[^*#].*[^ ]" +" DLL section +" SpaceError" +syn match baanSpaces " " +syn match baanSpaceError "\s*$" +syn match baanSpaceError " " + +" Baan error" + +if exists("baan_code_stds") && baan_code_stds +syn match BaanError "^\s*i\..*=\s*\(\k\|\"\)*\s*$" "assignment of an input var" +syn match BaanError "^\s*ref.*\s[ilse]\..*$" " ref variable defined with i, l, e and s" +syn match BaanError "^\s*const.*\s[olse]\..*$" " const variable defined with o, l, e and s" +syn match BaanError "^\s*static.*\s\(i\|g\|l\|o\|io\)\..*$" " static defined without s." +syn match BaanError "^\s*\(domain\s\|long\s\|string\s\).*\so\.\k*[,)]" " ref variable without ref" +syn match BaanError "^\s*\(domain\s\|long\s\|string\s\).*\se\.\k*[,)]" " 'e.' variable without extern" +syn match BaanError "^\s*i\..*,\s*|\s*ref.*$" " +endif + +"**************************** bshell functions ******************************** +syn match baanBshell "\