summaryrefslogtreecommitdiffstats
path: root/taccle/examples/simple_grammar.tac
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-02-20 20:17:57 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-02-20 20:17:57 (GMT)
commitf9ed678902dea0db45cd88c6da96da79310dfdfb (patch)
treee9a9785561e658f314c9e1b1ed112e6ca7688da7 /taccle/examples/simple_grammar.tac
parenta0baa564b54177527964fae8f0cc0d64d7db8ac7 (diff)
parenta591c85cba3570d69a809b2099c3f108c7e26eb8 (diff)
downloadblt-f9ed678902dea0db45cd88c6da96da79310dfdfb.zip
blt-f9ed678902dea0db45cd88c6da96da79310dfdfb.tar.gz
blt-f9ed678902dea0db45cd88c6da96da79310dfdfb.tar.bz2
Merge commit 'a591c85cba3570d69a809b2099c3f108c7e26eb8' as 'taccle'
Diffstat (limited to 'taccle/examples/simple_grammar.tac')
-rw-r--r--taccle/examples/simple_grammar.tac27
1 files changed, 27 insertions, 0 deletions
diff --git a/taccle/examples/simple_grammar.tac b/taccle/examples/simple_grammar.tac
new file mode 100644
index 0000000..ea354d9
--- /dev/null
+++ b/taccle/examples/simple_grammar.tac
@@ -0,0 +1,27 @@
+# $Id: simple_grammar.tac,v 1.1 2004/08/18 23:53:43 tang Exp $
+
+%{
+
+source simple_scanner.tcl
+
+%}
+
+%token ID
+
+%%
+
+E: E '+' T
+ | T
+ ;
+
+T: T '*' F
+ | F
+ ;
+
+F: '(' E ')'
+ | ID
+ ;
+
+%%
+
+yyparse