1 Replies - 7639 Views - Last Post: 11 July 2011 - 06:13 AM Rate Topic: -----

#1 realutd7  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 07-June 11

LL(1) parser code links

Posted 11 July 2011 - 05:33 AM

I'm not too familiar with forums, so I'm not sure if I posted this in the right topic.

Ok now, this is a long shot, but I figured I would try asking for help anyhow.
I'm currently studying the topic syntax analyzer, focusing on LL(1) parsers. I understand the theories, how it works, etc. But as before, I am very weak in coding. So i searched Google for coding examples on LL(1) parsers and found these 6 links which I think relate to them:

- http://www.syntax-ex...rser1-1813.aspx

- http://www.syntax-ex...arser-1812.aspx

- http://www.syntax-ex...hm-ll-1803.aspx

- http://www.syntax-ex...hm-ll-1802.aspx

- http://www.syntax-ex...arsing-948.aspx

- http://www.syntax-ex...arser-1798.aspx

Now, what I'm asking is which one of these six sites has the correct codes to run an LL(1) parser? If there are more than one, then the simplest would do. Explaining the code line-by-line would help too, if it's not too much a hassle.

(additional information: just to clarify, my definition of LL(1) parser, or what I was taught, is that the user inputs a grammar/language, then through executions of First and Follow rules a parsing table will be created. Then this table will be used for when the user inputs a string, and the user will find out if that string is valid or invalid for that grammar/parsing table. This process includes the stack/input/output table. Now I'm trying to find an example of a code for this and after searching through several code examples, I've narrowed it down to these 6 codes but I'm not quite sure which one is the right one, and/or the simplest one.
I've actually tried copy-pasting all these codes on Code::Blocks and I can't seem to get it to build and/or run properly, but that's a different topic)

(p.s: I apologize in advance if I am in the wrong topic, or if I'm not allowed to ask questions like this. Cheers)

Is This A Good Question/Topic? 0
  • +

Replies To: LL(1) parser code links

#2 jimblumberg  Icon User is offline

  • member icon


Reputation: 4074
  • View blog
  • Posts: 12,562
  • Joined: 25-December 09

Re: LL(1) parser code links

Posted 11 July 2011 - 06:13 AM

I would suggest that after you read the links and study your text book you start writing the code for the parser. When you have trouble with your code then come back and post your code and ask questions based on your code. Just taking code from the internet, that you do not understand anyway, will not help you learn to code. You say you understand the concepts of your problem, so take that knowledge and get to work.

Jim

This post has been edited by jimblumberg: 11 July 2011 - 06:13 AM

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1