You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The augmented grammar is
1)S'->S
2)S->SS+
3)S->SS*
4)S->a
and the closure collection is
i0:
S'->.S
S->.SS+
S->.SS*
S->.a
i1:
S'->S.
S->S.S+
S->S.S*
S->.a
S->.SS+ THIS 'S' IS THE SECOND 'S' FOLLOWING '.' OF S->S.S+ PRODUCTION
S->.SS* DITTO
i2:
S->a.
i3:
S->SS.+
S->SS.*
S->.a
S->S.S+ THIS 'S' IS S->.SS+ PRODUCTION FROM i1
S->S.S* DITTO
S->.SS+ THIS 'S' IS THE SECOND 'S' FOLLOWING '.' OF S->S.S+ PRODUCTION
S->.SS* DITTO
i4:
S->SS+.
i5:
S->SS*.
FIRST(S) = {a}
FOLLOW(S) = {a,+,*,$}
Sum up,the Fig is
| a | + | * | $ | S |
0 | s2 | | | | 1 |
1 | s2 | | | acc| 3 |
2 | r4 | r4 | r4 | r4 | |
3 | s2 | s4 | s5 | | 3 |
4 | r2 | r2 | r2 | r2 | |
5 | r3 | r3 | r3 | r3 | |
The text was updated successfully, but these errors were encountered:
OneirdyniaYi
changed the title
The solution of uneliminated left-recursion 4.4.1
The solution of 4.6.2 that uneliminated left-recursion 4.4.1
Mar 14, 2020
The augmented grammar is
1)S'->S
2)S->SS+
3)S->SS*
4)S->a
and the closure collection is
i0:
S'->.S
S->.SS+
S->.SS*
S->.a
i1:
S'->S.
S->S.S+
S->S.S*
S->.a
S->.SS+ THIS 'S' IS THE SECOND 'S' FOLLOWING '.' OF S->S.S+ PRODUCTION
S->.SS* DITTO
i2:
S->a.
i3:
S->SS.+
S->SS.*
S->.a
S->S.S+ THIS 'S' IS S->.SS+ PRODUCTION FROM i1
S->S.S* DITTO
S->.SS+ THIS 'S' IS THE SECOND 'S' FOLLOWING '.' OF S->S.S+ PRODUCTION
S->.SS* DITTO
i4:
S->SS+.
i5:
S->SS*.
FIRST(S) = {a}
FOLLOW(S) = {a,+,*,$}
Sum up,the Fig is
| a | + | * | $ | S |
0 | s2 | | | | 1 |
1 | s2 | | | acc| 3 |
2 | r4 | r4 | r4 | r4 | |
3 | s2 | s4 | s5 | | 3 |
4 | r2 | r2 | r2 | r2 | |
5 | r3 | r3 | r3 | r3 | |
The text was updated successfully, but these errors were encountered: