Arithmetic.ebnf 268 Bytes
Newer Older
1
2
3
4
5
6
7
expression = term  { ("+" | "-") term}
term       = factor  { ("*"|"/") factor}
factor     = constant | variable | "("  expression  ")"
variable   = "x" | "y" | "z"
constant   = digit {digit}
digit      = "0" | "1" | "..." | "9"
test       = digit constant variable
Eckhart Arnold's avatar
Eckhart Arnold committed
8

eckhart's avatar
eckhart committed
9