0

I am doing some homework, and was asked to show that the grammar A -> aAa | ε is not LL(1). From everything that I have seen, the answer I have so far is that since the First and the Follow sets of A contain a. Is this correct or am I thinking about something the wrong way?

user29451
  • 25
  • 5
  • You might be better served by asking on [cs.se] –  Feb 25 '20 at 20:19
  • 1
    Why do you think that you are wrong? Have you looked at the formal definition, which was undoubtedly presented in class? Or attempted to build an LL(1) parser? – rici Feb 25 '20 at 20:33
  • @amy: questions of the form "please check my homework for me" are strongly discouraged on [cs.se]. – rici Feb 25 '20 at 20:35
  • I'm trying to find a way to understand this conceptually, and I'm not sure I thought it through correctly. It makes sense with the formal definition(s) that I've seen, but I'm not 100 percent convinced. – user29451 Feb 25 '20 at 20:36
  • That doesn't tell me anything about what is confusing you. If you can find a specific question to ask, that would be helpful. Otherwise, all I can say is "yes" or "no" and neither of those responses can improve your understanding. (The answer is "yes", for what its worth. But why should you believe some random person on the internet?) – rici Feb 25 '20 at 20:49
  • If you want to understand it conceptually, build a parser. (On a sheet of paper.) Because that's the concept: a grammar is LL(1) if you can build an LL(1) parser from it. – rici Feb 25 '20 at 20:51

0 Answers0