I have written an LR(1) compiler compiler and to me table generation is pretty straight forward. However today I found myself wondering if there is a general algorithm for generating a recursive decent parser. I know there are tools such as javacc that do this but I'm more interested in the general steps of this generation. Thanks in advance.
Asked
Active
Viewed 49 times
1
-
You're missing the point. I have no desire to use a generator, hence why I asked about generator algorithms. A decent parser is not too much of an undertaking, just time consuming. Yes I am not a "crafts person" I am a computer science student rewriting my own language and wanted to go a different way this time. Yeah I can write one by hand but was just interested in the algorithms employed by such tools such a JavaCC, etc because i wrote an LR(1) CC and I was just curious. – Devin Wall Jun 19 '15 at 09:16
-
If you know about existing generators for recursive descent parsers (which conceivably use some algorithm), you might (have) mention(ed) this in the question, including whether or not information about their approach was what you are looking for, how you searched and how your thirst for knowledge is not quenched, yet. (Decency in a piece of software (as in almost anything) is a matter of definition; think about error recovery/messages, for one (decidedly easier in RD parsers than in about any other approach …)) – greybeard Jun 19 '15 at 09:55