2 " Language: CA-OpenROAD
3 " Maintainer: Luis Moreno <lmoreno@eresmas.net>
4 " Last change: 2001 May 10
6 " For version 5.x: Clear all syntax items
7 " For version 6.x: Quit when a syntax file was already loaded
11 elseif exists("b:current_syntax")
17 syntax keyword openroadKeyword ABORT ALL ALTER AND ANY AS ASC AT AVG BEGIN
18 syntax keyword openroadKeyword BETWEEN BY BYREF CALL CALLFRAME CALLPROC CASE
19 syntax keyword openroadKeyword CLEAR CLOSE COMMIT CONNECT CONTINUE COPY COUNT
20 syntax keyword openroadKeyword CREATE CURRENT DBEVENT DECLARE DEFAULT DELETE
21 syntax keyword openroadKeyword DELETEROW DESC DIRECT DISCONNECT DISTINCT DO
22 syntax keyword openroadKeyword DROP ELSE ELSEIF END ENDCASE ENDDECLARE ENDFOR
23 syntax keyword openroadKeyword ENDIF ENDLOOP ENDWHILE ESCAPE EXECUTE EXISTS
24 syntax keyword openroadKeyword EXIT FETCH FIELD FOR FROM GOTOFRAME GRANT GROUP
25 syntax keyword openroadKeyword HAVING IF IMMEDIATE IN INDEX INITIALISE
26 syntax keyword openroadKeyword INITIALIZE INQUIRE_INGRES INQUIRE_SQL INSERT
27 syntax keyword openroadKeyword INSERTROW INSTALLATION INTEGRITY INTO KEY LIKE
28 syntax keyword openroadKeyword LINK MAX MESSAGE METHOD MIN MODE MODIFY NEXT
29 syntax keyword openroadKeyword NOECHO NOT NULL OF ON OPEN OPENFRAME OR ORDER
30 syntax keyword openroadKeyword PERMIT PROCEDURE PROMPT QUALIFICATION RAISE
31 syntax keyword openroadKeyword REGISTER RELOCATE REMOVE REPEAT REPEATED RESUME
32 syntax keyword openroadKeyword RETURN RETURNING REVOKE ROLE ROLLBACK RULE SAVE
33 syntax keyword openroadKeyword SAVEPOINT SELECT SET SLEEP SOME SUM SYSTEM TABLE
34 syntax keyword openroadKeyword THEN TO TRANSACTION UNION UNIQUE UNTIL UPDATE
35 syntax keyword openroadKeyword VALUES VIEW WHERE WHILE WITH WORK
37 syntax keyword openroadEvent CHILDCLICK CHILDCLICKPOINT CHILDDETAILS
38 syntax keyword openroadEvent CHILDDOUBLECLICK CHILDDRAGBOX CHILDDRAGSEGMENT
39 syntax keyword openroadEvent CHILDENTRY CHILDEXIT CHILDMOVED CHILDPROPERTIES
40 syntax keyword openroadEvent CHILDRESIZED CHILDSCROLL CHILDSELECT
41 syntax keyword openroadEvent CHILDSETVALUE CHILDUNSELECT CHILDVALIDATE
42 syntax keyword openroadEvent CLICK CLICKPOINT DBEVENT DETAILS DOUBLECLICK
43 syntax keyword openroadEvent DRAGBOX DRAGSEGMENT ENTRY EXIT INSERTROW MOVED
44 syntax keyword openroadEvent PROPERTIES RESIZED SCROLL SELECT
45 syntax keyword openroadEvent SELECTIONCHANGED SETVALUE TERMINATE UNSELECT
46 syntax keyword openroadEvent USEREVENT VALIDATE WINDOWCLOSE WINDOWICON
47 syntax keyword openroadEvent WINDOWMOVED WINDOWRESIZED WINDOWVISIBLE
49 syntax keyword openroadTodo contained TODO
51 " Catch errors caused by wrong parenthesis
53 syntax cluster openroadParenGroup contains=openroadParenError,openroadTodo
54 syntax region openroadParen transparent start='(' end=')' contains=ALLBUT,@openroadParenGroup
55 syntax match openroadParenError ")"
56 highlight link openroadParenError cError
61 syntax match openroadNumber "\<[0-9]\+\>"
66 syntax region openroadString start=+'+ end=+'+
68 " Operators and Data Types
70 syntax match openroadOperator /[\+\-\*\/=\<\>;\(\)]/
71 syntax keyword openroadType SMALLINT INTEGER1 INTEGER2 INTEGER4 INTEGER
72 syntax keyword openroadType INT1 INT2 INT4 FLOAT CHAR VARCHAR DATE
73 syntax keyword openroadType ARRAY IFNULL
77 syntax keyword openroadClass ActiveField DBSessionObject FrameExec
78 syntax keyword openroadClass ProcExec QueryObject StringObject
79 syntax keyword openroadClass CurFrame CurProcedure CurMethod CurObject
83 syntax keyword openroadConst FALSE IS NOT NULL TRUE
84 syntax keyword openroadConst FM_UPDATE FM_QUERY FM_READ FM_USER1 FM_USER2
85 syntax keyword openroadConst FM_USER3
89 syntax match openroadIdent /[a-zA-Z_][a-zA-Z_]*![a-zA-Z_][a-zA-Z_]*/
93 if exists("openroad_comment_strings")
94 syntax match openroadCommentSkip contained "^\s*\*\($\|\s\+\)"
95 syntax region openroadCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$"
96 syntax region openroadComment start="/\*" end="\*/" contains=openroadCommentString,openroadCharacter,openroadNumber
97 syntax match openroadComment "//.*" contains=openroadComment2String,openroadCharacter,openroadNumber
99 syn region openroadComment start="/\*" end="\*/"
100 syn match openroadComment "//.*"
103 " Define the default highlighting.
104 " For version 5.7 and earlier: only when not done already
105 " For version 5.8 and later: only when an item doesn't have highlighting yet
107 if version >= 508 || !exists("did_openroad_syntax_inits")
109 let did_openroad_syntax_inits = 1
110 command -nargs=+ HiLink hi link <args>
112 command -nargs=+ HiLink hi def link <args>
115 HiLink openroadKeyword Statement
116 HiLink openroadEvent Statement
117 HiLink openroadNumber Number
118 HiLink openroadString String
119 HiLink openroadComment Comment
120 HiLink openroadOperator Operator
121 HiLink openroadType Type
122 HiLink openroadClass Type
123 HiLink openroadConst Constant
124 HiLink openroadIdent Identifier
125 HiLink openroadTodo Todo
130 let b:current_syntax = "openroad"