7
|
1 " Vim syntax file
|
|
2 " Language: Informix 4GL
|
|
3 " Maintainer: Rafal M. Sulejman <rms@poczta.onet.pl>
|
|
4 " Update: 26 Sep 2002
|
|
5 " Changes:
|
|
6 " - Dynamic 4GL/FourJs/4GL 7.30 pseudo comment directives (Julian Bridle)
|
|
7 " - Conditionally allow case insensitive keywords (Julian Bridle)
|
|
8 "
|
|
9
|
|
10 " For version 5.x: Clear all syntax items
|
|
11 " For version 6.x: Quit when a syntax file was already loaded
|
|
12 if version < 600
|
|
13 syntax clear
|
|
14 elseif exists("b:current_syntax")
|
|
15 finish
|
|
16 endif
|
|
17
|
|
18 if exists("fgl_ignore_case")
|
|
19 syntax case ignore
|
|
20 else
|
|
21 syntax case match
|
|
22 endif
|
|
23 syn keyword fglKeyword ABORT ABS ABSOLUTE ACCEPT ACCESS ACOS ADD AFTER ALL
|
|
24 syn keyword fglKeyword ALLOCATE ALTER AND ANSI ANY APPEND ARG_VAL ARRAY ARR_COUNT
|
|
25 syn keyword fglKeyword ARR_CURR AS ASC ASCENDING ASCII ASIN AT ATAN ATAN2 ATTACH
|
|
26 syn keyword fglKeyword ATTRIBUTE ATTRIBUTES AUDIT AUTHORIZATION AUTO AUTONEXT AVERAGE AVG
|
|
27 syn keyword fglKeyword BEFORE BEGIN BETWEEN BLACK BLINK BLUE BOLD BORDER BOTH BOTTOM
|
|
28 syn keyword fglKeyword BREAK BUFFERED BY BYTE
|
|
29 syn keyword fglKeyword CALL CASCADE CASE CHAR CHARACTER CHARACTER_LENGTH CHAR_LENGTH
|
|
30 syn keyword fglKeyword CHECK CLASS_ORIGIN CLEAR CLIPPED CLOSE CLUSTER COLOR
|
|
31 syn keyword fglKeyword COLUMN COLUMNS COMMAND COMMENT COMMENTS COMMIT COMMITTED
|
|
32 syn keyword fglKeyword COMPOSITES COMPRESS CONCURRENT CONNECT CONNECTION
|
|
33 syn keyword fglKeyword CONNECTION_ALIAS CONSTRAINED CONSTRAINT CONSTRAINTS CONSTRUCT
|
|
34 syn keyword fglKeyword CONTINUE CONTROL COS COUNT CREATE CURRENT CURSOR CYAN
|
|
35 syn keyword fglKeyword DATA DATABASE DATASKIP DATE DATETIME DAY DBA DBINFO DBSERVERNAME
|
|
36 syn keyword fglKeyword DEALLOCATE DEBUG DEC DECIMAL DECLARE DEFAULT DEFAULTS DEFER
|
|
37 syn keyword fglKeyword DEFERRED DEFINE DELETE DELIMITER DELIMITERS DESC DESCENDING
|
|
38 syn keyword fglKeyword DESCRIBE DESCRIPTOR DETACH DIAGNOSTICS DIM DIRTY DISABLED
|
|
39 syn keyword fglKeyword DISCONNECT DISPLAY DISTINCT DISTRIBUTIONS DO DORMANT DOUBLE
|
|
40 syn keyword fglKeyword DOWN DOWNSHIFT DROP
|
|
41 syn keyword fglKeyword EACH ELIF ELSE ENABLED END ENTRY ERROR ERRORLOG ERR_GET
|
|
42 syn keyword fglKeyword ERR_PRINT ERR_QUIT ESC ESCAPE EVERY EXCEPTION EXCLUSIVE
|
|
43 syn keyword fglKeyword EXEC EXECUTE EXISTS EXIT EXP EXPLAIN EXPRESSION EXTEND EXTENT
|
|
44 syn keyword fglKeyword EXTERN EXTERNAL
|
|
45 syn keyword fglKeyword F1 F10 F11 F12 F13 F14 F15 F16 F17 F18 F19 F2 F20 F21 F22 F23
|
|
46 syn keyword fglKeyword F24 F25 F26 F27 F28 F29 F3 F30 F31 F32 F33 F34 F35 F36 F37 F38
|
|
47 syn keyword fglKeyword F39 F4 F40 F41 F42 F43 F44 F45 F46 F47 F48 F49 F5 F50 F51 F52
|
|
48 syn keyword fglKeyword F53 F54 F55 F56 F57 F58 F59 F6 F60 F61 F62 F63 F64 F7 F8 F9
|
|
49 syn keyword fglKeyword FALSE FETCH FGL_GETENV FGL_KEYVAL FGL_LASTKEY FIELD FIELD_TOUCHED
|
|
50 syn keyword fglKeyword FILE FILLFACTOR FILTERING FINISH FIRST FLOAT FLUSH FOR
|
|
51 syn keyword fglKeyword FOREACH FOREIGN FORM FORMAT FORMONLY FORTRAN FOUND FRACTION
|
|
52 syn keyword fglKeyword FRAGMENT FREE FROM FUNCTION GET_FLDBUF GLOBAL GLOBALS GO GOTO
|
|
53 syn keyword fglKeyword GRANT GREEN GROUP HAVING HEADER HELP HEX HIDE HIGH HOLD HOUR
|
|
54 syn keyword fglKeyword IDATA IF ILENGTH IMMEDIATE IN INCLUDE INDEX INDEXES INDICATOR
|
|
55 syn keyword fglKeyword INFIELD INIT INITIALIZE INPUT INSERT INSTRUCTIONS INT INTEGER
|
|
56 syn keyword fglKeyword INTERRUPT INTERVAL INTO INT_FLAG INVISIBLE IS ISAM ISOLATION
|
|
57 syn keyword fglKeyword ITYPE
|
|
58 syn keyword fglKeyword KEY LABEL
|
|
59 syn keyword fglKeyword LANGUAGE LAST LEADING LEFT LENGTH LET LIKE LINE
|
|
60 syn keyword fglKeyword LINENO LINES LOAD LOCATE LOCK LOG LOG10 LOGN LONG LOW
|
|
61 syn keyword fglKeyword MAGENTA MAIN MARGIN MATCHES MAX MDY MEDIUM MEMORY MENU MESSAGE
|
|
62 syn keyword fglKeyword MESSAGE_LENGTH MESSAGE_TEXT MIN MINUTE MOD MODE MODIFY MODULE
|
|
63 syn keyword fglKeyword MONEY MONTH MORE
|
|
64 syn keyword fglKeyword NAME NCHAR NEED NEW NEXT NEXTPAGE NO NOCR NOENTRY NONE NORMAL
|
|
65 syn keyword fglKeyword NOT NOTFOUND NULL NULLABLE NUMBER NUMERIC NUM_ARGS NVARCHAR
|
|
66 syn keyword fglKeyword OCTET_LENGTH OF OFF OLD ON ONLY OPEN OPTIMIZATION OPTION OPTIONS
|
|
67 syn keyword fglKeyword OR ORDER OTHERWISE OUTER OUTPUT
|
|
68 syn keyword fglKeyword PAGE PAGENO PAUSE PDQPRIORITY PERCENT PICTURE PIPE POW PRECISION
|
|
69 syn keyword fglKeyword PREPARE PREVIOUS PREVPAGE PRIMARY PRINT PRINTER PRIOR PRIVATE
|
|
70 syn keyword fglKeyword PRIVILEGES PROCEDURE PROGRAM PROMPT PUBLIC PUT
|
|
71 syn keyword fglKeyword QUIT QUIT_FLAG
|
|
72 syn keyword fglKeyword RAISE RANGE READ READONLY REAL RECORD RECOVER RED REFERENCES
|
|
73 syn keyword fglKeyword REFERENCING REGISTER RELATIVE REMAINDER REMOVE RENAME REOPTIMIZATION
|
|
74 syn keyword fglKeyword REPEATABLE REPORT REQUIRED RESOLUTION RESOURCE RESTRICT
|
|
75 syn keyword fglKeyword RESUME RETURN RETURNED_SQLSTATE RETURNING REVERSE REVOKE RIGHT
|
|
76 syn keyword fglKeyword ROBIN ROLE ROLLBACK ROLLFORWARD ROOT ROUND ROW ROWID ROWIDS
|
|
77 syn keyword fglKeyword ROWS ROW_COUNT RUN
|
|
78 syn keyword fglKeyword SCALE SCHEMA SCREEN SCROLL SCR_LINE SECOND SECTION SELECT
|
|
79 syn keyword fglKeyword SERIAL SERIALIZABLE SERVER_NAME SESSION SET SET_COUNT SHARE
|
|
80 syn keyword fglKeyword SHORT SHOW SITENAME SIZE SIZEOF SKIP SLEEP SMALLFLOAT SMALLINT
|
|
81 syn keyword fglKeyword SOME SPACE SPACES SQL SQLAWARN SQLCA SQLCODE SQLERRD SQLERRM
|
|
82 syn keyword fglKeyword SQLERROR SQLERRP SQLSTATE SQLWARNING SQRT STABILITY START
|
|
83 syn keyword fglKeyword STARTLOG STATIC STATISTICS STATUS STDEV STEP STOP STRING STRUCT
|
|
84 syn keyword fglKeyword SUBCLASS_ORIGIN SUM SWITCH SYNONYM SYSTEM
|
|
85 syn keyword fglKeyword SysBlobs SysChecks SysColAuth SysColDepend SysColumns
|
|
86 syn keyword fglKeyword SysConstraints SysDefaults SysDepend SysDistrib SysFragAuth
|
|
87 syn keyword fglKeyword SysFragments SysIndexes SysObjState SysOpClstr SysProcAuth
|
|
88 syn keyword fglKeyword SysProcBody SysProcPlan SysProcedures SysReferences SysRoleAuth
|
|
89 syn keyword fglKeyword SysSynTable SysSynonyms SysTabAuth SysTables SysTrigBody
|
|
90 syn keyword fglKeyword SysTriggers SysUsers SysViews SysViolations
|
|
91 syn keyword fglKeyword TAB TABLE TABLES TAN TEMP TEXT THEN THROUGH THRU TIME TO
|
|
92 syn keyword fglKeyword TODAY TOP TOTAL TRACE TRAILER TRAILING TRANSACTION TRIGGER
|
|
93 syn keyword fglKeyword TRIGGERS TRIM TRUE TRUNC TYPE TYPEDEF
|
|
94 syn keyword fglKeyword UNCOMMITTED UNCONSTRAINED UNDERLINE UNION UNIQUE UNITS UNLOAD
|
|
95 syn keyword fglKeyword UNLOCK UNSIGNED UP UPDATE UPSHIFT USER USING
|
|
96 syn keyword fglKeyword VALIDATE VALUE VALUES VARCHAR VARIABLES VARIANCE VARYING
|
|
97 syn keyword fglKeyword VERIFY VIEW VIOLATIONS
|
|
98 syn keyword fglKeyword WAIT WAITING WARNING WEEKDAY WHEN WHENEVER WHERE WHILE WHITE
|
|
99 syn keyword fglKeyword WINDOW WITH WITHOUT WORDWRAP WORK WRAP WRITE
|
|
100 syn keyword fglKeyword YEAR YELLOW
|
|
101 syn keyword fglKeyword ZEROFILL
|
|
102
|
|
103 " Strings and characters:
|
|
104 syn region fglString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
|
105 syn region fglString start=+'+ skip=+\\\\\|\\"+ end=+'+
|
|
106
|
|
107 " Numbers:
|
|
108 syn match fglNumber "-\=\<[0-9]*\.\=[0-9_]\>"
|
|
109
|
|
110 " Comments:
|
|
111 syn region fglComment start="{" end="}"
|
|
112 syn match fglComment "--.*"
|
|
113 syn match fglComment "#.*"
|
|
114
|
|
115 " Not a comment even though it looks like one (Dynamic 4GL/FourJs directive)
|
|
116 syn match fglSpecial "--#"
|
|
117 syn match fglSpecial "--@"
|
|
118
|
|
119 syn sync ccomment fglComment
|
|
120
|
|
121 " Define the default highlighting.
|
|
122 " For version 5.7 and earlier: only when not done already
|
|
123 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
124 if version >= 508 || !exists("did_fgl_syntax_inits")
|
|
125 if version < 508
|
|
126 let did_fgl_syntax_inits = 1
|
|
127 command -nargs=+ HiLink hi link <args>
|
|
128 else
|
|
129 command -nargs=+ HiLink hi def link <args>
|
|
130 endif
|
|
131
|
|
132 HiLink fglComment Comment
|
|
133 "HiLink fglKeyword fglSpecial
|
|
134 HiLink fglKeyword fglStatement
|
|
135 HiLink fglNumber Number
|
|
136 HiLink fglOperator fglStatement
|
|
137 HiLink fglSpecial Special
|
|
138 HiLink fglStatement Statement
|
|
139 HiLink fglString String
|
|
140 HiLink fglType Type
|
|
141
|
|
142 delcommand HiLink
|
|
143 endif
|
|
144
|
|
145 let b:current_syntax = "fgl"
|
|
146
|
|
147 " vim: ts=8
|