0

I am confused on several areas of this. First, this is so obvious I am finding it hard to prove. Second, what are some definitions, axioms, or lemmas of an ll(k) grammar that I can use to build up a contropositive argument that for any ambiguous grammar it cannot be an LL(k) for any k? I've found this to be my best approach. Feel free to answer as opening or as theoretically as felt necessary, this was poorly explained in lecture and quite frankly any addition theory or hints is appreciated.

Raphael
  • 72,336
  • 29
  • 179
  • 389
bmc
  • 119
  • 5
  • 1
  • 1
    Are you asking: given a specific LL(k) grammar, how do I prove that it is unambiguous? Or are you asking: how do I prove that every LL(k) grammar is unambiguous? I recommend that you avoid the word "any", because it is often ambiguous whether that means "there exists" or "for all". Can you edit the question to clarify? Also, where have you looked? Have you looked in a standard automata theory textbook? – D.W. Oct 07 '16 at 18:40
  • Of course, I am reading Peter Linz, Introduction to formal language automata, however there is not much of a section on compiler theory and this seems to be a prevalent topic in that area. I had 1 page of text to read from and quite frankly, all it explained was that it is more strict than an s-grammar. http://cs.stackexchange.com/questions/2320/how-to-prove-that-a-grammar-is-unambiguous?rq=1, http://cs.stackexchange.com/questions/7518/how-to-show-that-given-language-is-unambiguous?rq=1, and many more that I don't have room to reference here in the comment box because of character limits. – bmc Oct 07 '16 at 19:37
  • A definition of the syntactic constraints that make grammars LL(k) is conspicuously missing from the Wikipedia article :-( – reinierpost Oct 07 '16 at 22:11

0 Answers0