mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-01 16:04:59 +00:00
18 lines
711 B
BNF
18 lines
711 B
BNF
conditional := expression | expression comparator term
|
|
comparator := comparacter | comparacter comparacter
|
|
comparactor := '=' | '<' | '>'
|
|
operator := '+' | '-' | '&' | '|' | '^'
|
|
term := element | value
|
|
element := variable '[' value ']'
|
|
|
|
number := binary | decimal | hexadecimal
|
|
hexadecimal := '$' hexdigit hexdigit
|
|
decimal := digit | decimal digit
|
|
binary := '%' bit bit bit bit bit bit bit bit
|
|
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'
|
|
hexdigit := digit | 'A' | 'B' | 'C' | 'D' | 'E' | 'F'
|
|
digit := bit | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
|
|
bit := '0' | '1'
|