diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-03-25 20:00:08 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-03-25 20:00:08 +0000 |
commit | 469bbcf0701e1eb8a6670c23145b0da87357e178 (patch) | |
tree | b5b062a16e46a6c5d3410b4e574cd0cc09057211 /tests/bnftest | |
parent | ee1b79396076edc4e30aefb285fada03bb45e80d (diff) | |
download | libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.gz libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.bz2 libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.xz libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.zip |
Code is all reorganized. We're about ready to release. I should write up a
little explenation of the arrangement.
Diffstat (limited to 'tests/bnftest')
-rw-r--r-- | tests/bnftest | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/bnftest b/tests/bnftest new file mode 100644 index 0000000..7e61b1a --- /dev/null +++ b/tests/bnftest | |||
@@ -0,0 +1,18 @@ | |||
1 | tokens = tokPlus tokMinus tokMult tokDivide tokOpenParen tokCloseParen | ||
2 | tokEquals tokNumber; | ||
3 | |||
4 | input: input line | ||
5 | | | ||
6 | ; | ||
7 | |||
8 | line: expr tokEquals {print} | ||
9 | ; | ||
10 | |||
11 | expr: 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 | |||