0

If I am given a CFG by looking at it can I decide whether it is a LL class of grammar or LR class of grammar? When I searched for this question on Google what I got was how the parsers for these grammars work, but, that is not what I want. Any assistance would be greatly appreciated.

  • 1
    read this also: [How to determine whether a language is LL(1) LR(0) SLR(1)](http://stackoverflow.com/questions/475949/how-to-determine-whether-a-language-is-ll1-lr0-slr1) and [How to identify whether a grammar is LL(1), LR(0) or SLR(1)?](http://stackoverflow.com/questions/8496642/how-to-identify-whether-a-grammar-is-ll1-lr0-or-slr1) – Grijesh Chauhan May 20 '13 at 14:01

1 Answers1

1

You can recognize if a grammar is not LL if it has left recursion.
Example:

S -> A | y
A -> Az
Samy Dindane
  • 17,900
  • 3
  • 40
  • 50