aboutsummaryrefslogtreecommitdiff
path: root/bnftest
diff options
context:
space:
mode:
Diffstat (limited to 'bnftest')
-rw-r--r--bnftest18
1 files changed, 0 insertions, 18 deletions
diff --git a/bnftest b/bnftest
deleted file mode 100644
index 7e61b1a..0000000
--- a/bnftest
+++ /dev/null
@@ -1,18 +0,0 @@
1tokens = tokPlus tokMinus tokMult tokDivide tokOpenParen tokCloseParen
2 tokEquals tokNumber;
3
4input: input line
5 |
6 ;
7
8line: expr tokEquals {print}
9 ;
10
11expr: expr tokPlus expr {add}
12 | expr tokMinus expr {subtract}
13 | expr tokMult expr {multiply}
14 | expr tokDivide expr {divide}
15 | tokOpenParen expr tokCloseParen
16 | [tokNumber]
17 ;
18