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