Presentation is loading. Please wait.

Presentation is loading. Please wait.

| b.

Similar presentations


Presentation on theme: "| b."— Presentation transcript:

1

2

3 | b

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21 Augmented Grammar Kernel items marked with * Rest of the items are added by closure

22

23

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

25

26

27

28

29

30

31

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,Lid S5 S,S11 S,S10 S8 S9 R,RL 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

35

36

37

38

39

40

41

42 Merge Contains reduce-reduce conflict  not LALR(1)


Download ppt "| b."

Similar presentations


Ads by Google