diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 0c15693c5e..dc8b3f99c5 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -370,6 +370,20 @@ ADA See |ft-ada-syntax| +ALGOL 68 *algol68* *ft-algol68-syntax* + +This syntax file currently targets the Algol 68 Genie project using the +default UPPER stropping regime. It should also be usuable in other +environments using the UPPER stropping regime, though somewhat less complete. + +Highlighting can be further configured with the following variables. + +Variable Highlight ~ +*algol68_no_preludes* no prelude identifiers, procedures or + bold word operators +*algol68_symbolic_operators* all prelude symbolic operators + + ANT *ft-ant-syntax* The ant syntax file provides syntax highlighting for javascript and python diff --git a/runtime/ftplugin/algol68.vim b/runtime/ftplugin/algol68.vim new file mode 100644 index 0000000000..b995a1fcee --- /dev/null +++ b/runtime/ftplugin/algol68.vim @@ -0,0 +1,47 @@ +" Vim filetype plugin +" Language: Algol 68 +" Maintainer: Doug Kearns +" Last Change: 2026 Apr 23 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +" TODO: 'comments' + +setlocal commentstring=#\ %s\ # + +let &l:include='\c\%(^\|;\)\s*\%(PR\|PRAGMAT\)\s\+\%(read\|include\)' + +let b:undo_ftplugin = "setl cms< inc<" + +if exists("loaded_matchit") && !exists("b:match_words") + let b:match_ignorecase = 0 + let b:match_words = '\:\,' .. + \ '\:\:\:\:\,' .. + \ '\:\:\:\:\,' .. + "\ TODO: loops have overlapping start and intermediate keywords like + "\ `TO` which are difficult to match with patterns alone. + \ '\:\' + let b:match_skip = 's:Comment\|String\|PreProc' + let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_skip b:match_words" +endif + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Algol 68 Source Files (*.a68)\t*.a68\n" + if has("win32") + let b:browsefilter ..= "All Files (*.*)\t*\n" + else + let b:browsefilter ..= "All Files (*)\t*\n" + endif + let b:undo_ftplugin ..= " | unlet! b:browsefilter" +endif + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8 diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index 01824fe74c..6c70d8929a 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -245,6 +245,7 @@ local extension = { adb = 'ada', tdf = 'ahdl', aidl = 'aidl', + a68 = 'algol68', aml = 'aml', run = 'ampl', g4 = 'antlr4', diff --git a/runtime/syntax/algol68.vim b/runtime/syntax/algol68.vim new file mode 100644 index 0000000000..129e938074 --- /dev/null +++ b/runtime/syntax/algol68.vim @@ -0,0 +1,469 @@ +" Vim syntax file +" Language: Algol 68 +" Version: 0.4 +" Maintainer: Janis Papanagnou +" Previous Maintainer: NevilleD.ALGOL_68@sgr-a.net +" Last Change: 2026 Apr 23 + +if exists("b:current_syntax") + finish +endif + +syn sync minlines=250 maxlines=500 + +" Algol68 Final Report, unrevised +syn keyword algol68PreProc PRIORITY +syn keyword algol68Operator BTB CTB CONJ QUOTE CT CTAB EITHER SIGN + + +" Algol68 Revised Report +syn keyword algol68Boolean TRUE FALSE +syn keyword algol68Conditional IF THEN ELSE ELIF FI +syn keyword algol68Conditional CASE IN OUT OUSE ESAC +syn keyword algol68Constant NIL SKIP EMPTY +syn keyword algol68Statement MODE OP PRIO PROC +syn keyword algol68Label GOTO +syn match algol68Label "\" +syn keyword algol68Operator ABS REPR ROUND ENTIER ARG BIN LENG SHORTEN ODD +syn keyword algol68Operator SHL SHR ROL ROR UP DOWN LEVEL LWB UPB I RE IM +syn keyword algol68Operator OVER MOD ELEM SET CLEAR +syn keyword algol68Operator LT LE GE GT +syn keyword algol68Operator EQ NE +syn keyword algol68Operator AND OR XOR NOT +" Genie short-circuit pseudo operators +syn keyword algol68Operator THEF ANDF ANDTH ELSF ORF OREL +syn keyword algol68Operator ANDTHEN ORELSE +syn keyword algol68Operator MINUSAB PLUSAB TIMESAB DIVAB OVERAB MODAB PLUSTO +syn keyword algol68Operator IS ISNT OF AT +syn keyword algol68Operator SORT ELEMS +syn keyword algol68Repeat FOR FROM BY UPTO DOWNTO TO WHILE DO UNTIL OD +syn keyword algol68Statement PAR BEGIN END EXIT +syn keyword algol68Struct STRUCT +syn keyword algol68PreProc VECTOR +syn keyword algol68Type FLEX HEAP LOC LONG REF SHORT +syn keyword algol68Type VOID BOOL INT REAL COMPL CHAR STRING COMPLEX +syn keyword algol68Type BITS BYTES FILE CHANNEL PIPE SEMA SOUND +syn keyword algol68Type FORMAT STRUCT UNION +" Genie extensions in addition to ROUND and ENTIER +syn keyword algol68Operator FLOOR CEIL NINT TRUNC FRAC FIX + + " 20011222az: Added new items. +syn keyword algol68Todo contained TODO FIXME XXX DEBUG NOTE + + +" String +syn region algol68String matchgroup=algol68String start=+"+ end=+"+ contains=algol68StringEscape +syn match algol68StringEscape contained '""' +syn match algol68StringEscape contained "\\$" + + +syn match algol68Identifier "\<[a-z][a-z0-9_]*\>" + + +if exists("algol68_symbolic_operators") + syn match algol68SymbolOperator "\\" + syn match algol68SymbolOperator ":=\|=" + syn match algol68SymbolOperator "[~^]" + syn match algol68SymbolOperator "[~^]=" + syn match algol68SymbolOperator "[<>]" + syn match algol68SymbolOperator "[<>]=" + syn match algol68SymbolOperator "\%([-+*%/]\|%\*\)" + syn match algol68SymbolOperator "\%([-+*%/]\|%\*\):=" + syn match algol68SymbolOperator "+=:" + syn match algol68SymbolOperator "*\*\|&" +endif + +syn match algol68Number "\<\d\+\%(\s\+\d\+\)*\>" + +syn match algol68Float "\c\.\d\+\%(\s\+\d\+\)*\%(\s*[e\\⏨]\s*[-+]\?\s*\d\+\%(\s\+\d\+\)*\)\?\>" +syn match algol68Float "\c\<\d\+\%(\s\+\d\+\)*\%(\s*[e\\⏨]\s*[-+]\?\s*\d\+\%(\s\+\d\+\)*\)\>" +syn match algol68Float "\c\<\d\+\%(\s\+\d\+\)*\s*\.\s*\d\+\%(\s\+\d\+\)*\%(\s*[e\\⏨]\s*[-+]\?\s*\d\+\%(\s\+\d\+\)*\)\?\>" + +syn match algol68HexNumber "\c\<2r\s*[01]\+\%(\s\+[01]\+\)*\>" +syn match algol68HexNumber "\c\<4r\s*[0-3]\+\%(\s\+[0-3]\+\)*\>" +syn match algol68HexNumber "\c\<8r\s*[0-7]\+\%(\s\+[0-7]\+\)*\>" +syn match algol68HexNumber "\c\<16r\s*[0-9a-f]\+\%(\s\+[0-9a-f]\+\)*\>" + + +syn region algol68Special start="\$" end="\$" contains=algol68String +syn region algol68Comment start="¢" end="¢" contains=algol68Todo,algol68SpaceError +syn region algol68Comment start="£" end="£" contains=algol68Todo,algol68SpaceError +syn region algol68Comment start="#" end="#" contains=algol68Todo,algol68SpaceError +syn region algol68Comment start="\" end="\" contains=algol68Todo,algol68SpaceError +syn region algol68Comment start="\" end="\" contains=algol68Todo,algol68SpaceError +syn region algol68PreProc start="\" end="\" contains=algol68Todo,algol68SpaceError +syn region algol68PreProc start="\" end="\" contains=algol68Todo,algol68SpaceError +" algol68r +syn region algol68Comment start="{" end="}" contains=algol68Todo,algol68SpaceError +syn region algol68Comment start="{{{" end="}}}" contains=algol68Todo,algol68SpaceError + +" ALGOL 68r +syn keyword algol68PreProc DECS CONTEXT configinfo A68CONFIG KEEP FINISH USE SYSPROCS IOSTATE FORALL +" ALGOL 68c +syn keyword algol68PreProc USING ENVIRON FOREACH ASSERT + +if !exists("algol68_no_preludes") + + +" THE STANDARD ENVIRONMENT + +" Enquiries + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Transput Files and Channels + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Transput Event Routines + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Connections to Files + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Positioning on Files + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" I/O on Files (Standard) + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" I/O on Files (Algol68C) + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Enquiries on Files + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Keyboard Control + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Math Constants + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Math Basic Functions + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!\%(\s\{1,7}[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Math Trigonometric Functions + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + " long-long-sinpi/cospi/tanpi/cotpi + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + " a special case in Genie? + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Random Number Generator + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Garbage Collection and Memory + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" I/O on Strings + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" +" Character Type Tests + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" +" Operations on Characters + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" +" Search in Strings + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Time and Date + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Type Operations + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!\%(\s*[a-z0-9]\)\@!" + +" Runtime + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + + +" UNIX EXTENSIONS + +" Environment Functions + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Processes + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" File types and attributes + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Fetching web page contents and sending requests + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Regular expressions in string manipulation + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Curses support + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + + +" POSTGRESQL CLIENT ROUTINES + +" Connecting to a server + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Sending queries and retrieving results + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Connection status information + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + + +" SOUND + + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn keyword algol68Operator RESOLUTION CHANNELS RATE SAMPLES + + +" DRAWING USING THE GNU PLOTTING UTILITIES + +" Setting up a graphics device + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Specifying colours + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Drawing objects + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Drawing text + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + + +" EXTRA NUMERICAL PROCEDURES + +" COMPLEX Functions + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + " cas casin casinh dcas dcasin dcasinh qcas qcasin qcasinh longcas longlongcas + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + " a special case in Genie? + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" REAL Airy Functions + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" REAL Bessel Functions + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + + " only a few could be sensibly merged; we keep them apart + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" REAL Elliptic Integrals + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" REAL Error and Gamma Functions + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + " is the following a special case in Genie? + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "gamma\s*\%(\%(inc\s*\%(gsl\|[pq]\)\)\|inv\|star\)\>\%(\s*\%([a-z_]\|\l\d\+\)\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + + + +" Scaling Factors + + " strangely missing some common factors (hecto, deca, deci, centi), + " also myria, and the more extreme factors (quetta, ronna, ronto, quecto) + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + + +" Physical Constants + +" Fundamental Constants + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Astronomy and Astrophysics + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Atomic and Nuclear Physics + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Time + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Imperial units + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Nautical units + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Volume + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Mass and weight + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Thermal energy and power + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Pressure + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Viscosity + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Light and illumination + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Radioactivity + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + +" Force and energy + syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + + +" Functions from GSL + + syn keyword algol68Operator CV RV T INV PINV MEAN DET TRACE NORM DYAD BEFORE ABOVE + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + + +" Functions from R Mathlib + + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + " note: Genie documents 'r rn chisq' but it's missing in the code? + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8\%(\s*[a-z0-9]\)\@!" + + +endif + +" Define the default highlighting. +hi def link algol68Boolean Boolean +hi def link algol68Comment Comment +hi def link algol68Conditional Conditional +hi def link algol68Constant Constant +hi def link algol68Float Float +hi def link algol68Function Function +hi def link algol68Label Label +hi def link algol68MatrixDelimiter Identifier +hi def link algol68HexNumber Number +hi def link algol68Number Number +hi def link algol68Operator Operator +hi def link algol68Predefined Identifier +hi def link algol68PreProc PreProc +hi def link algol68Repeat Repeat +hi def link algol68SpaceError Error +hi def link algol68Statement Statement +hi def link algol68String String +hi def link algol68StringEscape Special +hi def link algol68Struct algol68Statement +hi def link algol68SymbolOperator algol68Operator +hi def link algol68Todo Todo +hi def link algol68Type Type +hi def link algol68ShowTab Error + +let b:current_syntax = "algol68" + +" vim: ts=8 sw=2