1 ; ---------------------------------------------------------------------------
 2 ; | File: grammar4.dat             Sean O'Connor                    5-30-89 |
 3 ; ---------------------------------------------------------------------------
 4 ;
 5 ;  This is the grammar,
 6 ;
 7 ;     S -> A S | b
 8 ;     A -> S A | a
 9 ;
10 ;  which is neither LR(1) nor LALR(1).
11 ;
12 ;  Exercise 4.33, page 272 of
13 ;
14 ;      COMPILERS: PRINCIPLES, TECHNIQUES, AND TOOLS,
15 ;      Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman,
16 ;      Addison-Wesley, 1986
17 ;
18 ; ---------------------------------------------------------------------------
19 
20 
21 ;  Productions.
22 
23 (
24    (S -> A S / |b|)
25    (A -> S A / |a|)
26 )
27 
28 
29 ;  Terminal symbols.
30 
31 ( |a| |b| )