diff options
Diffstat (limited to 'taccle/examples/shift_reduce2.tac')
-rw-r--r-- | taccle/examples/shift_reduce2.tac | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/taccle/examples/shift_reduce2.tac b/taccle/examples/shift_reduce2.tac new file mode 100644 index 0000000..c3ad0d3 --- /dev/null +++ b/taccle/examples/shift_reduce2.tac @@ -0,0 +1,20 @@ +# $Id: shift_reduce2.tac,v 1.1 2004/08/18 23:53:43 tang Exp $ + +# Here is one final shift/reduce conflict. taccles resolves the +# problem by giving precedence to a shift. +# +# Reference: +# lex & yacc, pages 226-227 + +%token A R + +%% + +start: x1 + | x2 + | y R; + +x1: A R; +x2: A z; +y: A; +z: R; |