summaryrefslogtreecommitdiff
path: root/test/rediv.lm
diff options
context:
space:
mode:
Diffstat (limited to 'test/rediv.lm')
-rw-r--r--test/rediv.lm15
1 files changed, 7 insertions, 8 deletions
diff --git a/test/rediv.lm b/test/rediv.lm
index a4a0b88a..c5ac9553 100644
--- a/test/rediv.lm
+++ b/test/rediv.lm
@@ -52,7 +52,7 @@ lex
token number /[0-9]+/
token string /s_string | d_string/
- literal '+', '-', '*', ';', '/'
+ literal `+ `- `* `; `/
token slash /'/'/
token semi /';'/
@@ -63,25 +63,24 @@ def factor
[ident]
| [number]
| [string]
-| ['/' regex_body regex_close]
+| [`/ regex_body regex_close]
def term
- [term '*' factor]
-| [term '/' factor]
+ [term `* factor]
+| [term `/ factor]
| [factor]
def expr
- [expr '+' term]
-| [expr '-' term]
+ [expr `+ term]
+| [expr `- term]
| [term]
def statement
- [expr ';']
+ [expr `;]
def start
[statement*]
-
parse S: start[ stdin ]
for I:orlit_item in S {