1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-11-22 01:31:33 +00:00
C02/doc/syntax.bnf
2018-01-28 14:00:23 -05:00

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'