Syntax (obsolete)
identifier	::=	letter { letter | digit | "_" | "." }
letter		::=	"A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" |
			"a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"
integer		::=	( digit { digit } ) | ( "$" hdigit { hdigit } )
digit		::=	"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
hdigit		::=	digit | "A" | "a" | "B" | "b" | "C" | "c" | "D" | "d" | "E" | "e" | "F" | "f"

string		::=	quote { any-character } quote
stringchar	::=	"'" any-character "'"

constant		::=	[ "-" | "!" ] ( identifier | integer | "true" | "false" | "null" | ( "sizeof" "(" identifier ")" ) )
variable		::=	[ "-" | "!" | "@" | "^" ] identifier [ "[" expression "]" ]

boolop		::=	"&" | "|" | "~"
relop		::=	"=" | "!=" | "<>" | "<" | ">" | "<=" | "=<" | ">=" | "=>" | "==" | "~="
mulop		::=	"*" | "/" | "%" | "<<" | ">>"
addop		::=	"+" | "-"

expression	::=	boolean { boolop boolean }
relation		::=	expr { ( relop expr ) | ( "?" "[" expr ".." expr "]" ) }
expr		::=	term { mulop term }
term		::=	factor { addop factor }
call		::=	identifier "(" [ expression { "," expression } ] ")"
factor		::=	constant | variable | string | "(" expression ")" | call | stringchar | "[" constant { ( addop | boolop ) constant } "]"

target		::=	( ( "byte" | "word" | "dword" | "int" ) "[" expression "]" ) | variable
assignment	::=	( target ":=" expression ) | target "++" | target "--" | target "#" expression { "#" expression }

codeblock		::=	{ ( assignment | call ) ";" | for | if | while | loop | jump | label | binary }
localcode		::=	{ ( assignment | call | return ) ";" | for | if | while | loop }
localdata		::=	{ type identifier ";" }
directive		::=	{ ( "alias" identifier [ ( "for" string ) | "ascii" | "unicode" ] "in" string [ "paramcount" "=" integer ] [ "restorestack" ] ";" ) | ( "const" identifier "=" integer ";" ) |
			( "type" identifier "{" type identifier [ "=" ( number | identifier ) ] ";" { type identifier [ "=" ( number | identifier ) ] ";" } "}" ) |
			( "frame" identifier "(" [ type identifier { "," type identifier } ] ");" localdata "begin" localcode "end" ";" ) |
			( "include" string ";" ) | "library" identifier ";" | binary }
globaldata	::=	{ directive | ( type identifier [ "=" ( integer | identifier | text | list ) ] ";" ) | ( "enum" "{" identifier { "," identifier } "}" ) }
type		::=	"byte" | ( "char" [ "[" integer "]" ] ) | "word" | "dword" | "int" | "ptr" | user-defined
list		::=	"{" integer { "," integer } "}"

return		::=	"return" "(" expression ")"
for		::=	"for" "(" assignment ";" expression ";" assignment ")" "{" codeblock "}"
if		::=	"if" "(" expression ")" "{" codeblock "}" { "elseif" "(" expression ")" "{" codeblock "}" } [ "else" "{" codeblock "}" ]
while		::=	"while" "(" expression ")" "{" codeblock "}"
loop		::=	"loop" "(" expression ")" "{" codeblock "}"
jump		::=	"goto" identifier ";"
label		::=	"label" identifier ";"
binary		::=	"binary" identifier "," text ";"

program		::=	"application" [ text "," ] [ "(" integer "." integer ")" "," ] ( "GUI" | "CUI" | "Console" ) ";"
			[ "resources" ( "true" | "false" ) ";" ]
			globaldata
			"begin"
			codeblock
			"end."