Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Stack contents while parsing string *id$ by CLR (Reduced number of stack content means reduce move, increased number of stack content means shift move)
- ================================================
- [0]
- [0,*,4] (shift * and transit to state 4)
- [0,*,4,id,5] (shift id and transit to state 5)
- (5,$)= no shift/reduce move ---> reject string
- Stack contents while parsing string *id$ by SLR
- ================================================
- [0]
- [0,*,4]
- [0,*,4,id,5] (shift id and transit to state 5)
- [0,*,4,L]
- [0,*,4,L,8]
- [0,*,4,R] (Reduce L to R)
- [0,*,4,R,7]
- [0,L] (Reduce *R to L)
- [0,L,2] (Transit to state 2)
- [0,R]
- [0,R,3]
- [0,S]
- Accept
- S
- |
- R
- |
- L
- /
- | R
- | |
- | L
- | |
- * id
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement