diff options
Diffstat (limited to 'vendor/pest_derive/examples/calc.pest')
-rw-r--r-- | vendor/pest_derive/examples/calc.pest | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/vendor/pest_derive/examples/calc.pest b/vendor/pest_derive/examples/calc.pest index 9f2cc3b74..383497391 100644 --- a/vendor/pest_derive/examples/calc.pest +++ b/vendor/pest_derive/examples/calc.pest @@ -1,5 +1,3 @@ -WHITESPACE = _{ " " | "\t" | NEWLINE } - program = { SOI ~ expr ~ EOI } expr = { prefix* ~ primary ~ postfix* ~ (infix ~ prefix* ~ primary ~ postfix* )* } infix = _{ add | sub | mul | div | pow } @@ -12,5 +10,4 @@ WHITESPACE = _{ " " | "\t" | NEWLINE } neg = { "-" } // Negation postfix = _{ fac } fac = { "!" } // Factorial - primary = _{ int | "(" ~ expr ~ ")" } - int = @{ (ASCII_NONZERO_DIGIT ~ ASCII_DIGIT+ | ASCII_DIGIT) }
\ No newline at end of file + primary = _{ int | "(" ~ expr ~ ")" }
\ No newline at end of file |