0

This grammar in particular, how can I be sure that it is LR(0), SLR(1), LALR(1), LR(1)?

Grammar:

S --> X Y

X -> a X

X -> ε

Y -> c X Z

Y -> b

Z -> a Z

Z -> a

I know each has different properties, so I built out First sets:

S -> a,c,b

X -> a, ε

Y -> c, b

Z -> a

and follow sets

S -> 

X -> c,b,a

Y ->

Z ->

but I am not sure how exactly I can apply this information to know if it is matching any of these parser properties

billybob2
  • 681
  • 1
  • 8
  • 17
  • I'm voting to close this question as off-topic because it is about language grammar theory, not computer programming. Try https://cs.stackexchange.com/ – Raymond Chen Dec 11 '18 at 20:09
  • @RaymondChen But don't try [cs.se] until you've reviewed their question guidelines. – rici Dec 11 '18 at 22:54

0 Answers0