1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-06-08 06:29:32 +00:00
C02/doc/include/syntax.bnf
2021-12-18 19:37:31 -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'