Download presentation
Presentation is loading. Please wait.
3
| b
21
Augmented Grammar Kernel items marked with * Rest of the items are added by closure
24
ACTION GOTO #1 S’ E #2 E E + T #3 E T #4 T id #5 T ( E )
$ E T S S0 S,S3 S,S4 S1 S2 S,S7 accept R,#3 S3 R,#4 S4 S5 S,S6 S6 R,#5 S7 S8 R,#2 #1 S’ E #2 E E + T #3 E T #4 T id #5 T ( E ) Follow(S’) { $ } Follow(E) { +, ), $ } Follow(T) { +, ), $ } S – SHIFT R - REDUCE S# - Next State
32
S8 S1 S5 S9 S0 S2 S12 S10 S6 S3 S11 S7 S4
33
ACTION GOTO S – SHIFT R - REDUCE S# - Next State * = id $ S R L S0
accept S,S5 S3 S7 S6 S4 R,Lid S5 S,S11 S,S10 S8 S9 R,RL R,L*R S10 S11 S12 S – SHIFT R - REDUCE S# - Next State
34
$ S * id = id $ $ S0 * S id = id $ $ S0 * S3 id S = id $ $ S0 * S3 L S = id $ $ S0 * S3 R S = id $ $ S0 L S = id $ $ S0 L S2 = S id $ $ S0 L S2 = S5 id S $ $ S0 L S2 = S5 L S $ $ S0 L S2 = S5 R S $ accept
42
Merge Contains reduce-reduce conflict not LALR(1)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.