DFA for shift /reduce decisions The states of the dfa are used to determine Grammar if a handle is on top of the stack S→C C→AB Stack Input Action $0 aas start in state 0 A SO aas shift(and goto state 3) B→a 0a3 as reduce A→a(goto2) $0A2 as shift(goto 5) State 1o: todos a $0A2a5 s reduce B→a(goto4) $0A2B4 s reduce C→AB(otol) →● -aState $0C1 C→·ABA→a s| accept(s→C A→·a
DFA for shift /reduce decisions The states of the dfa are used to determine Grammar if a handle is on top of the stack S→C C→AB Stack Input Action $0 aas start in state 0 AB $0 aas shift(and goto state 3) $0a3 as reduce A→a(goto2) $0A2 as shift(goto 5) $0A2a5 s reduce B→a(goto4) State gotO(o A $0A2B4 s reduce C→AB(otol) State l $0C1 s| accept(s→C C→AB|C→AB A→·a B →
DFA for shift /reduce decisions The states of the dfa are used to determine Grammar if a handle is on top of the stack S→C C→AB Stack Input Action $0 aas start in state 0 A aas shift(and goto state 3) B 0a3 as reduce A→a(goto2) $0A2 a$ shift(goto 5) $0A2a5 s| reduce B→a(go04) $0A2B4 s reduce C→AB(otol) goto(l, a) $0C1 s| accept(s→C State l C→AB State l B→·a B→a
DFA for shift /reduce decisions The states of the dfa are used to determine Grammar if a handle is on top of the stack S→C C→AB Stack Input Action $0 aas start in state 0 A aas shift(and goto state 3) B 0a3 as reduce A→a(goto2) $0A2 as shift(goto 5) $0A2a5 s reduce B→a(goto4) $0A2B4 s reduce C→AB(otol) goto(l,, B) $0C1 s| accept(s→C State l C→ ABL State I,4 B→·a C→AB
DFA for shift /reduce decisions The states of the dfa are used to determine Grammar if a handle is on top of the stack S→C C→AB Stack Input actio $0 aas start in state 0 A aas shift(and goto state 3) B 0a3 as reduce A→a(goto2) $0A2 as shift(goto 5) $0A2a5 s reduce B→a(goto4) s0a2B4 s reduce C→AB(otol) State lo: sotol. O) SoC1 s| accept(s→C State l C→ABS→C A→°a