preproc = "bgidriver|bgifont|check_determ|code|config|diagnostics|error|errorlevel|heap|gstacksize|nobreak|nowarnings|printermenu|project"

comment start "%"

include "number.lang"

string delim "\"" "\"" escape "\\"
string delim "'" "'"  escape "\\"

keyword = "abstract|align|as|and|class|clauses|constants|database|determ",
	"domains|elsedef|endclass|enddef|erroneous|facts|failure|global",
	"goal|if|ifdef|ifndef|implement|include|language|multi|nocopy",
	"nondeterm|object|or|procedure|protected|predicates|reference",
	"single|static|struct|this",
	"ABSTRACT|ALIGN|AS|AND|CLASS|CLAUSES|CONSTANTS|DATABASE|DETERM",
	"DOMAINS|ELSEDEF|ENDCLASS|ENDDEF|ERRONEOUS|FACTS|FAILURE|GLOBAL",
	"GOAL|IF|IFDEF|IFNDEF|IMPLEMENT|INCLUDE|LANGUAGE|MULTI|NOCOPY",
	"NONDETERM|OBJECT|OR|PROCEDURE|PROTECTED|PREDICATES|REFERENCE",
	"SINGLE|STATIC|STRUCT|THIS",
	"assert|asserta|assertz|bound|chain_inserta|chain_insertafter",
	"chain_insertz|chain_terms|consult|db_btrees|db_chains|fail",
	"findall|format|free|msgrecv|msgsend|nl|not|readterm|ref_term|retract",
	"retractall|save|term_bin|term_replace|term_str|trap|write|writef",
	"mod|div|abs|exp|ln|log|sqrt|round|trunc|val|cos|sin|tan|arctan",
	"random|randominit"

comment delim "/*" "*/" multiline nested 

type = "char|real|string|symbol|byte|sbyte|short|ushort|word|integer|unsigned|dword|long|ulong|binary|ref"

include "symbols.lang"

cbracket = "{|}"

include "function.lang"

variable = '[[:upper:]][[:word:]]*|_'