1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-11-24 15:31:17 +00:00
C02/doc/syntax.bnf

18 lines
711 B
BNF
Raw Normal View History

2018-01-28 19:00:23 +00:00
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'