1" Vim syntax file
2" Language:		CA-OpenROAD
3" Maintainer:	Luis Moreno <lmoreno@eresmas.net>
4" Last change:	2001 Jun 12
5
6" quit when a syntax file was already loaded
7if exists("b:current_syntax")
8	finish
9endif
10
11syntax case ignore
12
13" Keywords
14"
15syntax keyword openroadKeyword	ABORT ALL ALTER AND ANY AS ASC AT AVG BEGIN
16syntax keyword openroadKeyword	BETWEEN BY BYREF CALL CALLFRAME CALLPROC CASE
17syntax keyword openroadKeyword	CLEAR CLOSE COMMIT CONNECT CONTINUE COPY COUNT
18syntax keyword openroadKeyword	CREATE CURRENT DBEVENT DECLARE DEFAULT DELETE
19syntax keyword openroadKeyword	DELETEROW DESC DIRECT DISCONNECT DISTINCT DO
20syntax keyword openroadKeyword	DROP ELSE ELSEIF END ENDCASE ENDDECLARE ENDFOR
21syntax keyword openroadKeyword	ENDIF ENDLOOP ENDWHILE ESCAPE EXECUTE EXISTS
22syntax keyword openroadKeyword	EXIT FETCH FIELD FOR FROM GOTOFRAME GRANT GROUP
23syntax keyword openroadKeyword	HAVING IF IMMEDIATE IN INDEX INITIALISE
24syntax keyword openroadKeyword	INITIALIZE INQUIRE_INGRES INQUIRE_SQL INSERT
25syntax keyword openroadKeyword	INSERTROW INSTALLATION INTEGRITY INTO KEY LIKE
26syntax keyword openroadKeyword	LINK MAX MESSAGE METHOD MIN MODE MODIFY NEXT
27syntax keyword openroadKeyword	NOECHO NOT NULL OF ON OPEN OPENFRAME OR ORDER
28syntax keyword openroadKeyword	PERMIT PROCEDURE PROMPT QUALIFICATION RAISE
29syntax keyword openroadKeyword	REGISTER RELOCATE REMOVE REPEAT REPEATED RESUME
30syntax keyword openroadKeyword	RETURN RETURNING REVOKE ROLE ROLLBACK RULE SAVE
31syntax keyword openroadKeyword	SAVEPOINT SELECT SET SLEEP SOME SUM SYSTEM TABLE
32syntax keyword openroadKeyword	THEN TO TRANSACTION UNION UNIQUE UNTIL UPDATE
33syntax keyword openroadKeyword	VALUES VIEW WHERE WHILE WITH WORK
34
35syntax keyword openroadTodo contained	TODO
36
37" Catch errors caused by wrong parenthesis
38"
39syntax cluster	openroadParenGroup	contains=openroadParenError,openroadTodo
40syntax region	openroadParen		transparent start='(' end=')' contains=ALLBUT,@openroadParenGroup
41syntax match	openroadParenError	")"
42highlight link	openroadParenError	cError
43
44" Numbers
45"
46syntax match	openroadNumber		"\<[0-9]\+\>"
47
48" String
49"
50syntax region	openroadString		start=+'+  end=+'+
51
52" Operators, Data Types and Functions
53"
54syntax match	openroadOperator	/[\+\-\*\/=\<\>;\(\)]/
55
56syntax keyword	openroadType		ARRAY BYTE CHAR DATE DECIMAL FLOAT FLOAT4
57syntax keyword	openroadType		FLOAT8 INT1 INT2 INT4 INTEGER INTEGER1
58syntax keyword	openroadType		INTEGER2 INTEGER4 MONEY OBJECT_KEY
59syntax keyword	openroadType		SECURITY_LABEL SMALLINT TABLE_KEY VARCHAR
60
61syntax keyword	openroadFunc		IFNULL
62
63" System Classes
64"
65syntax keyword	openroadClass	ACTIVEFIELD ANALOGFIELD APPFLAG APPSOURCE
66syntax keyword	openroadClass	ARRAYOBJECT ATTRIBUTEOBJECT BARFIELD
67syntax keyword	openroadClass	BITMAPOBJECT BOXTRIM BREAKSPEC BUTTONFIELD
68syntax keyword	openroadClass	CELLATTRIBUTE CHOICEBITMAP CHOICEDETAIL
69syntax keyword	openroadClass	CHOICEFIELD CHOICEITEM CHOICELIST CLASS
70syntax keyword	openroadClass	CLASSSOURCE COLUMNCROSS COLUMNFIELD
71syntax keyword	openroadClass	COMPOSITEFIELD COMPSOURCE CONTROLBUTTON
72syntax keyword	openroadClass	CROSSTABLE CURSORBITMAP CURSOROBJECT DATASTREAM
73syntax keyword	openroadClass	DATEOBJECT DBEVENTOBJECT DBSESSIONOBJECT
74syntax keyword	openroadClass	DISPLAYFORM DYNEXPR ELLIPSESHAPE ENTRYFIELD
75syntax keyword	openroadClass	ENUMFIELD EVENT EXTOBJECT EXTOBJFIELD
76syntax keyword	openroadClass	FIELDOBJECT FLEXIBLEFORM FLOATOBJECT FORMFIELD
77syntax keyword	openroadClass	FRAMEEXEC FRAMEFORM FRAMESOURCE FREETRIM
78syntax keyword	openroadClass	GHOSTEXEC GHOSTSOURCE IMAGEFIELD IMAGETRIM
79syntax keyword	openroadClass	INTEGEROBJECT LISTFIELD LISTVIEWCOLATTR
80syntax keyword	openroadClass	LISTVIEWFIELD LONGBYTEOBJECT LONGVCHAROBJECT
81syntax keyword	openroadClass	MATRIXFIELD MENUBAR MENUBUTTON MENUFIELD
82syntax keyword	openroadClass	MENUGROUP MENUITEM MENULIST MENUSEPARATOR
83syntax keyword	openroadClass	MENUSTACK MENUTOGGLE METHODEXEC METHODOBJECT
84syntax keyword	openroadClass	MONEYOBJECT OBJECT OPTIONFIELD OPTIONMENU
85syntax keyword	openroadClass	PALETTEFIELD POPUPBUTTON PROC4GLSOURCE PROCEXEC
86syntax keyword	openroadClass	PROCHANDLE QUERYCOL QUERYOBJECT QUERYPARM
87syntax keyword	openroadClass	QUERYTABLE RADIOFIELD RECTANGLESHAPE ROWCROSS
88syntax keyword	openroadClass	SCALARFIELD SCOPE SCROLLBARFIELD SEGMENTSHAPE
89syntax keyword	openroadClass	SESSIONOBJECT SHAPEFIELD SLIDERFIELD SQLSELECT
90syntax keyword	openroadClass	STACKFIELD STRINGOBJECT SUBFORM TABBAR
91syntax keyword	openroadClass	TABFIELD TABFOLDER TABLEFIELD TABPAGE
92syntax keyword	openroadClass	TOGGLEFIELD TREE TREENODE TREEVIEWFIELD
93syntax keyword	openroadClass	USERCLASSOBJECT USEROBJECT VIEWPORTFIELD
94
95" System Events
96"
97syntax keyword	openroadEvent	CHILDCLICK CHILDCLICKPOINT CHILDCOLLAPSED
98syntax keyword	openroadEvent	CHILDDETAILS CHILDDOUBLECLICK CHILDDRAGBOX
99syntax keyword	openroadEvent	CHILDDRAGSEGMENT CHILDENTRY CHILDEXIT
100syntax keyword	openroadEvent	CHILDEXPANDED CHILDHEADERCLICK CHILDMOVED
101syntax keyword	openroadEvent	CHILDPROPERTIES CHILDRESIZED CHILDSCROLL
102syntax keyword	openroadEvent	CHILDSELECT CHILDSELECTIONCHANGED CHILDSETVALUE
103syntax keyword	openroadEvent	CHILDUNSELECT CHILDVALIDATE CLICK CLICKPOINT
104syntax keyword	openroadEvent	COLLAPSED DBEVENT DETAILS DOUBLECLICK DRAGBOX
105syntax keyword	openroadEvent	DRAGSEGMENT ENTRY EXIT EXPANDED EXTCLASSEVENT
106syntax keyword	openroadEvent	FRAMEACTIVATE FRAMEDEACTIVATE HEADERCLICK
107syntax keyword	openroadEvent	INSERTROW LABELCHANGED MOVED PAGEACTIVATED
108syntax keyword	openroadEvent	PAGECHANGED PAGEDEACTIVATED PROPERTIES RESIZED
109syntax keyword	openroadEvent	SCROLL SELECT SELECTIONCHANGED SETVALUE
110syntax keyword	openroadEvent	TERMINATE UNSELECT USEREVENT VALIDATE
111syntax keyword	openroadEvent	WINDOWCLOSE WINDOWICON WINDOWMOVED WINDOWRESIZED
112syntax keyword	openroadEvent	WINDOWVISIBLE
113
114" System Constants
115"
116syntax keyword	openroadConst	BF_BMP BF_GIF BF_SUNRASTER BF_TIFF
117syntax keyword	openroadConst	BF_WINDOWCURSOR BF_WINDOWICON BF_XBM
118syntax keyword	openroadConst	CC_BACKGROUND CC_BLACK CC_BLUE CC_BROWN CC_CYAN
119syntax keyword	openroadConst	CC_DEFAULT_1 CC_DEFAULT_10 CC_DEFAULT_11
120syntax keyword	openroadConst	CC_DEFAULT_12 CC_DEFAULT_13 CC_DEFAULT_14
121syntax keyword	openroadConst	CC_DEFAULT_15 CC_DEFAULT_16 CC_DEFAULT_17
122syntax keyword	openroadConst	CC_DEFAULT_18 CC_DEFAULT_19 CC_DEFAULT_2
123syntax keyword	openroadConst	CC_DEFAULT_20 CC_DEFAULT_21 CC_DEFAULT_22
124syntax keyword	openroadConst	CC_DEFAULT_23 CC_DEFAULT_24 CC_DEFAULT_25
125syntax keyword	openroadConst	CC_DEFAULT_26 CC_DEFAULT_27 CC_DEFAULT_28
126syntax keyword	openroadConst	CC_DEFAULT_29 CC_DEFAULT_3 CC_DEFAULT_30
127syntax keyword	openroadConst	CC_DEFAULT_4 CC_DEFAULT_5 CC_DEFAULT_6
128syntax keyword	openroadConst	CC_DEFAULT_7 CC_DEFAULT_8 CC_DEFAULT_9
129syntax keyword	openroadConst	CC_FOREGROUND CC_GRAY CC_GREEN CC_LIGHT_BLUE
130syntax keyword	openroadConst	CC_LIGHT_BROWN	CC_LIGHT_CYAN CC_LIGHT_GRAY
131syntax keyword	openroadConst	CC_LIGHT_GREEN CC_LIGHT_ORANGE CC_LIGHT_PINK
132syntax keyword	openroadConst	CC_LIGHT_PURPLE CC_LIGHT_RED CC_LIGHT_YELLOW
133syntax keyword	openroadConst	CC_MAGENTA CC_ORANGE CC_PALE_BLUE CC_PALE_BROWN
134syntax keyword	openroadConst	CC_PALE_CYAN CC_PALE_GRAY CC_PALE_GREEN
135syntax keyword	openroadConst	CC_PALE_ORANGE CC_PALE_PINK CC_PALE_PURPLE
136syntax keyword	openroadConst	CC_PALE_RED CC_PALE_YELLOW CC_PINK CC_PURPLE
137syntax keyword	openroadConst	CC_RED CC_SYS_ACTIVEBORDER CC_SYS_ACTIVECAPTION
138syntax keyword	openroadConst	CC_SYS_APPWORKSPACE CC_SYS_BACKGROUND
139syntax keyword	openroadConst	CC_SYS_BTNFACE CC_SYS_BTNSHADOW CC_SYS_BTNTEXT
140syntax keyword	openroadConst	CC_SYS_CAPTIONTEXT CC_SYS_GRAYTEXT
141syntax keyword	openroadConst	CC_SYS_HIGHLIGHT CC_SYS_HIGHLIGHTTEXT
142syntax keyword	openroadConst	CC_SYS_INACTIVEBORDER CC_SYS_INACTIVECAPTION
143syntax keyword	openroadConst	CC_SYS_INACTIVECAPTIONTEXT CC_SYS_MENU
144syntax keyword	openroadConst	CC_SYS_MENUTEXT CC_SYS_SCROLLBAR CC_SYS_SHADOW
145syntax keyword	openroadConst	CC_SYS_WINDOW CC_SYS_WINDOWFRAME
146syntax keyword	openroadConst	CC_SYS_WINDOWTEXT CC_WHITE CC_YELLOW
147syntax keyword	openroadConst	CL_INVALIDVALUE CP_BOTH CP_COLUMNS CP_NONE
148syntax keyword	openroadConst	CP_ROWS CS_CLOSED CS_CURRENT CS_NOCURRENT
149syntax keyword	openroadConst	CS_NO_MORE_ROWS CS_OPEN CS_OPEN_CACHED DC_BW
150syntax keyword	openroadConst	DC_COLOR DP_AUTOSIZE_FIELD DP_CLIP_IMAGE
151syntax keyword	openroadConst	DP_SCALE_IMAGE_H DP_SCALE_IMAGE_HW
152syntax keyword	openroadConst	DP_SCALE_IMAGE_W DS_CONNECTED DS_DISABLED
153syntax keyword	openroadConst	DS_DISCONNECTED DS_INGRES_DBMS DS_NO_DBMS
154syntax keyword	openroadConst	DS_ORACLE_DBMS DS_SQLSERVER_DBMS DV_NULL
155syntax keyword	openroadConst	DV_STRING DV_SYSTEM EH_NEXT_HANDLER EH_RESUME
156syntax keyword	openroadConst	EH_RETRY EP_INTERACTIVE EP_NONE EP_OUTPUT
157syntax keyword	openroadConst	ER_FAIL ER_NAMEEXISTS ER_OK ER_OUTOFRANGE
158syntax keyword	openroadConst	ER_ROWNOTFOUND ER_USER1 ER_USER10 ER_USER2
159syntax keyword	openroadConst	ER_USER3 ER_USER4 ER_USER5 ER_USER6 ER_USER7
160syntax keyword	openroadConst	ER_USER8 ER_USER9 FALSE FA_BOTTOMCENTER
161syntax keyword	openroadConst	FA_BOTTOMLEFT FA_BOTTOMRIGHT FA_CENTER
162syntax keyword	openroadConst	FA_CENTERLEFT FA_CENTERRIGHT FA_DEFAULT FA_NONE
163syntax keyword	openroadConst	FA_TOPCENTER FA_TOPLEFT FA_TOPRIGHT
164syntax keyword	openroadConst	FB_CHANGEABLE FB_CLICKPOINT FB_DIMMED FB_DRAGBOX
165syntax keyword	openroadConst	FB_DRAGSEGMENT FB_FLEXIBLE FB_INVISIBLE
166syntax keyword	openroadConst	FB_LANDABLE FB_MARKABLE FB_RESIZEABLE
167syntax keyword	openroadConst	FB_VIEWABLE FB_VISIBLE FC_LOWER FC_NONE FC_UPPER
168syntax keyword	openroadConst	FM_QUERY FM_READ FM_UPDATE FM_USER1 FM_USER2
169syntax keyword	openroadConst	FM_USER3 FO_DEFAULT FO_HORIZONTAL FO_VERTICAL
170syntax keyword	openroadConst	FP_BITMAP FP_CLEAR FP_CROSSHATCH FP_DARKSHADE
171syntax keyword	openroadConst	FP_DEFAULT FP_HORIZONTAL FP_LIGHTSHADE FP_SHADE
172syntax keyword	openroadConst	FP_SOLID FP_VERTICAL FT_NOTSETVALUE FT_SETVALUE
173syntax keyword	openroadConst	FT_TABTO FT_TAKEFOCUS GF_BOTTOM GF_DEFAULT
174syntax keyword	openroadConst	GF_LEFT GF_RIGHT GF_TOP HC_DOUBLEQUOTE
175syntax keyword	openroadConst	HC_FORMFEED HC_NEWLINE HC_QUOTE HC_SPACE HC_TAB
176syntax keyword	openroadConst	HV_CONTENTS HV_CONTEXT HV_HELPONHELP HV_KEY
177syntax keyword	openroadConst	HV_QUIT LS_3D LS_DASH LS_DASHDOT LS_DASHDOTDOT
178syntax keyword	openroadConst	LS_DEFAULT LS_DOT LS_SOLID LW_DEFAULT
179syntax keyword	openroadConst	LW_EXTRATHIN LW_MAXIMUM LW_MIDDLE LW_MINIMUM
180syntax keyword	openroadConst	LW_NOLINE LW_THICK LW_THIN LW_VERYTHICK
181syntax keyword	openroadConst	LW_VERYTHIN MB_DISABLED MB_ENABLED MB_INVISIBLE
182syntax keyword	openroadConst	MB_MOVEABLE MT_ERROR MT_INFO MT_NONE MT_WARNING
183syntax keyword	openroadConst	OP_APPEND OP_NONE OS3D OS_DEFAULT OS_SHADOW
184syntax keyword	openroadConst	OS_SOLID PU_CANCEL PU_OK QS_ACTIVE QS_INACTIVE
185syntax keyword	openroadConst	QS_SETCOL QY_ARRAY QY_CACHE QY_CURSOR QY_DIRECT
186syntax keyword	openroadConst	RC_CHILDSELECTED RC_DOWN RC_END RC_FIELDFREED
187syntax keyword	openroadConst	RC_FIELDORPHANED RC_GROUPSELECT RC_HOME RC_LEFT
188syntax keyword	openroadConst	RC_MODECHANGED RC_MOUSECLICK RC_MOUSEDRAG
189syntax keyword	openroadConst	RC_NEXT RC_NOTAPPLICABLE RC_PAGEDOWN RC_PAGEUP
190syntax keyword	openroadConst	RC_PARENTSELECTED RC_PREVIOUS RC_PROGRAM
191syntax keyword	openroadConst	RC_RESUME RC_RETURN RC_RIGHT RC_ROWDELETED
192syntax keyword	openroadConst	RC_ROWINSERTED RC_ROWSALLDELETED RC_SELECT
193syntax keyword	openroadConst	RC_TFSCROLL RC_TOGGLESELECT RC_UP RS_CHANGED
194syntax keyword	openroadConst	RS_DELETED RS_NEW RS_UNCHANGED RS_UNDEFINED
195syntax keyword	openroadConst	SK_CLOSE SK_COPY SK_CUT SK_DELETE SK_DETAILS
196syntax keyword	openroadConst	SK_DUPLICATE SK_FIND SK_GO SK_HELP SK_NEXT
197syntax keyword	openroadConst	SK_NONE SK_PASTE SK_PROPS SK_QUIT SK_REDO
198syntax keyword	openroadConst	SK_SAVE SK_TFDELETEALLROWS SK_TFDELETEROW
199syntax keyword	openroadConst	SK_TFFIND SK_TFINSERTROW SK_UNDO SP_APPSTARTING
200syntax keyword	openroadConst	SP_ARROW SP_CROSS SP_IBEAM SP_ICON SP_NO
201syntax keyword	openroadConst	SP_SIZE SP_SIZENESW SP_SIZENS SP_SIZENWSE
202syntax keyword	openroadConst	SP_SIZEWE SP_UPARROW SP_WAIT SY_NT SY_OS2
203syntax keyword	openroadConst	SY_UNIX SY_VMS SY_WIN95 TF_COURIER TF_HELVETICA
204syntax keyword	openroadConst	TF_LUCIDA TF_MENUDEFAULT TF_NEWCENTURY TF_SYSTEM
205syntax keyword	openroadConst	TF_TIMESROMAN TRUE UE_DATAERROR UE_EXITED
206syntax keyword	openroadConst	UE_NOTACTIVE UE_PURGED UE_RESUMED UE_UNKNOWN
207syntax keyword	openroadConst	WI_MOTIF WI_MSWIN32 WI_MSWINDOWS WI_NONE WI_PM
208syntax keyword	openroadConst	WP_FLOATING WP_INTERACTIVE WP_PARENTCENTERED
209syntax keyword	openroadConst	WP_PARENTRELATIVE WP_SCREENCENTERED
210syntax keyword	openroadConst	WP_SCREENRELATIVE WV_ICON WV_INVISIBLE
211syntax keyword	openroadConst	WV_UNREALIZED WV_VISIBLE
212
213" System Variables
214"
215syntax keyword	openroadVar		CurFrame CurProcedure CurMethod CurObject
216
217" Identifiers
218"
219syntax match	openroadIdent	/[a-zA-Z_][a-zA-Z_]*![a-zA-Z_][a-zA-Z_]*/
220
221" Comments
222"
223if exists("openroad_comment_strings")
224	syntax match openroadCommentSkip	contained "^\s*\*\($\|\s\+\)"
225	syntax region openroadCommentString	contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$"
226	syntax region openroadComment		start="/\*" end="\*/" contains=openroadCommentString,openroadCharacter,openroadNumber
227	syntax match openroadComment		"//.*" contains=openroadComment2String,openroadCharacter,openroadNumber
228else
229	syn region openroadComment			start="/\*" end="\*/"
230	syn match openroadComment			"//.*"
231endif
232
233" Define the default highlighting.
234" Only when an item doesn't have highlighting yet
235"
236
237hi def link openroadKeyword	Statement
238hi def link openroadNumber	Number
239hi def link openroadString	String
240hi def link openroadComment	Comment
241hi def link openroadOperator	Operator
242hi def link openroadType		Type
243hi def link openroadFunc		Special
244hi def link openroadClass	Type
245hi def link openroadEvent	Statement
246hi def link openroadConst	Constant
247hi def link openroadVar		Identifier
248hi def link openroadIdent	Identifier
249hi def link openroadTodo		Todo
250
251
252let b:current_syntax = "openroad"
253