summaryrefslogtreecommitdiffstats
path: root/taccle/examples/shift_reduce2.tac
blob: c3ad0d32e8cbfa3b1857dd3c13801fcff8abba9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;