From 469bbcf0701e1eb8a6670c23145b0da87357e178 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 25 Mar 2012 20:00:08 +0000 Subject: Code is all reorganized. We're about ready to release. I should write up a little explenation of the arrangement. --- tests/bnftest | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/bnftest (limited to 'tests/bnftest') diff --git a/tests/bnftest b/tests/bnftest new file mode 100644 index 0000000..7e61b1a --- /dev/null +++ b/tests/bnftest @@ -0,0 +1,18 @@ +tokens = tokPlus tokMinus tokMult tokDivide tokOpenParen tokCloseParen + tokEquals tokNumber; + +input: input line + | + ; + +line: expr tokEquals {print} + ; + +expr: expr tokPlus expr {add} + | expr tokMinus expr {subtract} + | expr tokMult expr {multiply} + | expr tokDivide expr {divide} + | tokOpenParen expr tokCloseParen + | [tokNumber] + ; + -- cgit v1.2.3