Page 1 of 1

Recursive Descent Parser [need help]

Posted: Sun Mar 04, 2012 8:16 pm
by codefreak
Dear all,

Hello, i'm a newbie programmer. I want to implement the concept about recursive descent parser for natural language (english). The concept was found in http://nltk.sourceforge.net/doc/en/ch07.html#rdparser. But my problem is, how to implementation the concept/theory to PHP code ? Anyone would to help me to give the advice or tutorial or maybe anyone has to make script before?
Thank you very much in advance.

Re: Recursive Descent Parser [need help]

Posted: Sun Mar 04, 2012 8:22 pm
by requinix
I prefer predictive myself, but meh.

Are you a newbie to PHP or to programming as a whole?

Re: Recursive Descent Parser [need help]

Posted: Sun Mar 04, 2012 9:10 pm
by codefreak
tasairis wrote:I prefer predictive myself, but meh.

Are you a newbie to PHP or to programming as a whole?
Yes. I'm newbie. I have search before for example for the Recursive Descent Parser (natural language) for php script but nothing result. I don't know what I must do to implement the algorithm to PHP script.
Would you help me to solve my problem?

Re: Recursive Descent Parser [need help]

Posted: Sun Mar 04, 2012 10:54 pm
by requinix
No offense but you need to learn programming first before you tackle things in the realm of compiler design. Parsers aren't a Comp Sci 101 subject. You learn them along with things like state machines and regular languages.

But if you want to plow ahead then fine. Can you explain to me how a recursive-descent parser works? How would you use it to deal with a mathematical expression like

Code: Select all

2 + 6 * 6 + 4
Once you understand the subject, then we can try writing code for it.