summaryrefslogtreecommitdiffstats
path: root/taccle/examples/simple_grammar.tac
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-06-21 20:21:59 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-06-21 20:21:59 (GMT)
commit0813099a1937d0e06681609f2ef9a020ea60b451 (patch)
tree843d60b0e86bfae1be7a7ba66c4f1498c5ca07a7 /taccle/examples/simple_grammar.tac
parentfd4d09aafba1eb096cf9be4e93250087d9af465e (diff)
parentfe273e056b3a237a2d571501d97a8d222d618047 (diff)
downloadblt-0813099a1937d0e06681609f2ef9a020ea60b451.zip
blt-0813099a1937d0e06681609f2ef9a020ea60b451.tar.gz
blt-0813099a1937d0e06681609f2ef9a020ea60b451.tar.bz2
Merge commit 'fe273e056b3a237a2d571501d97a8d222d618047' 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