note: grammar follows no specification, purely for reference purposes
Key:
[a-z][0] - character 0 of word
[a-z][1] - character 1 of word
[a-z][2] - character 2 of word
[0-9] - number
0x[a-fA-F0-9] - hex number
[a-zA-Z0-9] - character
ident - identifier
param - parameter
subr_header - subroutine header
subroutine - subroutine
statement - statement
statement_call - statement call
char_literal - character literal
hex_literal - hex literal
number_literal - number literal
comment - comment
comment_semi - secondary comment types
# top level
document ::= header*
header ::= subr_header
# ignored by compiler
comment ::= #.*
comment_semi ::= ;.*
whitespace ::=
macro ::= '[' [a-z](identifier) param ']'
# subroutines
subr_header ::= [a-z][0] # subroutines can only have 1
# letter/number
subroutine ::= subr_header statement*
# statements
statement_call ::= ident [param]
statement ::= statement_call
# parameters
param ::= ([0-9] | [a-z])
# types
char_literal ::= [a-zA-Z0-9]
hex_literal ::= 0x [a-fA-F0-9]
number_literal ::= [0-9]
# note: [compat] directive is ignored
# the compat directive only applies to the functionality of the
# instructions, it doesn't affect semantics unless incompatible with
# specified syntax.
Click here to return to the home page