Example 5.2.4. (continued)
while {(_,Z), (a,B), (b,A)} push _; /* Z _ _, B _ a, A _ b */
while {(a,Z)} push AZ; /* Z _ aAZ */
while {(a,A)} push AA; /* A _ aAA */
while {(b,Z)} push BZ; /* Z _ bBZ */
while {(b,B)} push BB /* B _ bBB */
So the complete grammar is
Z _ _ | aAZ | bBZ,
A _ b | aAA,
B _ a | bBB.
Previous slide | Next slide | Back to first slide | View graphic version |