blob: 884c37ebf5611b27a173d3022fa584f658fd7b9c [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" Language: Focus Executable
3" Maintainer: Rob Brady <robb@datatone.com>
4" Last Change: $Date$
5" URL: http://www.datatone.com/~robb/vim/syntax/focexec.vim
6" $Revision$
7
8" this is a very simple syntax file - I will be improving it
9" one thing is how to do computes
10" I don't like that &vars and FUSE() functions highlight to the same color
11" I think some of these things should get different hilights -
12" should MODIFY commands look different than TABLE?
13
14" For version 5.x: Clear all syntax items
15" For version 6.x: Quit when a syntax file was already loaded
16if version < 600
17 syntax clear
18elseif exists("b:current_syntax")
19 finish
20endif
21
22syn case match
23
24" A bunch of useful keywords
25syn keyword focexecTable TABLE SUM BY ACROSS END PRINT HOLD LIST NOPRINT
26syn keyword focexecTable SUBFOOT SUBHEAD HEADING FOOTING PAGE-BREAK AS
27syn keyword focexecTable WHERE AND OR NOSPLIT FORMAT
28syn keyword focexecModify MODIFY DATA ON FIXFORM PROMPT MATCH COMPUTE
29syn keyword focexecModify GOTO CASE ENDCASE TYPE NOMATCH REJECT INCLUDE
30syn keyword focexecModify CONTINUE FROM
31syn keyword focexecNormal CHECK FILE CREATE EX SET IF FILEDEF DEFINE
32syn keyword focexecNormal REBUILD IF RECORDLIMIT FI EQ JOIN
33syn keyword focexecJoin IN TO
34syn keyword focexecFileDef DISK
35syn keyword focexecSet MSG ALL
36syn match focexecDash "-RUN"
37syn match focexecDash "-PROMPT"
38syn match focexecDash "-WINFORM"
39
40" String and Character constants
41syn region focexecString1 start=+"+ end=+"+
42syn region focexecString2 start=+'+ end=+'+
43
44"amper variables
45syn match focexecAmperVar "&&\=[A-Z_]\+"
46
47"fuse functions
48syn keyword focexecFuse GETUSER GETUSR WHOAMI FEXERR ASIS GETTOK UPCASE LOCASE
49syn keyword focexecFuse SUBSTR TODAY TODAYI POSIT HHMMSS BYTVAL EDAUT1 BITVAL
50syn keyword focexecFuse BITSON FGETENV FPUTENV HEXBYT SPAWN YM YMI JULDAT
51syn keyword focexecFuse JULDATI DOWK DOWKI DOWKLI CHGDAT CHGDATI FTOA ATODBL
52syn keyword focexecFuse SOUNDEX RJUST REVERSE PARAG OVRLAY LJUST CTRFLD CTRAN
53syn keyword focexecFuse CHKFMT ARGLEN GREGDT GREGDTI DTYMD DTYMDI DTDMY DTDMYI
54syn keyword focexecFuse DTYDM DTYDMI DTMYD DTMYDI DTDYM DTDYMI DAYMD DAYMDI
55syn keyword focexecFuse DAMDY DAMDYI DADMY DADMYI AYM AYMI AYMD AYMDI CHKPCK
56syn keyword focexecFuse IMOD FMOD DMOD PCKOUT EXP BAR SPELLNM SPELLNUM RTCIVP
57syn keyword focexecFuse PRDUNI PRDNOR RDNORM RDUNIF LCWORD ITOZ RLPHLD IBIPRO
58syn keyword focexecFuse IBIPRW IBIPRC IBIPRU IBIRCP PTHDAT ITOPACK ITONUM
59syn keyword focexecFuse DSMEXEC DSMEVAL DSMERRC MSMEXEC MSMEVAL MSMERRC EXTDXI
60syn keyword focexecFuse BAANHASH EDAYSI DTOG GTOD HSETPT HPART HTIME HNAME
61syn keyword focexecFuse HADD HDIFF HDATE HGETC HCNVRT HDTTM HMIDNT TEMPPATH
62syn keyword focexecFuse DATEADD DATEDIF DATEMOV DATECVT EURHLD EURXCH FINDFOC
63syn keyword focexecFuse FERRMES CNCTUSR CURRPATH USERPATH SYSTEM ASKYN
64syn keyword focexecFuse FUSEMENU POPEDIT POPFILE
65
66syn match focexecNumber "\<\d\+\>"
67syn match focexecNumber "\<\d\+\.\d*\>"
68
69syn match focexecComment "-\*.*"
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_focexec_syntax_inits")
75 if version < 508
76 let did_focexec_syntax_inits = 1
77 command -nargs=+ HiLink hi link <args>
78 else
79 command -nargs=+ HiLink hi def link <args>
80 endif
81
82 HiLink focexecString1 String
83 HiLink focexecString2 String
84 HiLink focexecNumber Number
85 HiLink focexecComment Comment
86 HiLink focexecTable Keyword
87 HiLink focexecModify Keyword
88 HiLink focexecNormal Keyword
89 HiLink focexecSet Keyword
90 HiLink focexecDash Keyword
91 HiLink focexecFileDef Keyword
92 HiLink focexecJoin Keyword
93 HiLink focexecAmperVar Identifier
94 HiLink focexecFuse Function
95
96 delcommand HiLink
97endif
98
99let b:current_syntax = "focexec"
100
101" vim: ts=8