Add LL(k)or predictive backtracking to recursive descent

Dan Feriozi <dr_feriozi@prodigy.net>
9 Mar 2002 03:12:31 -0500

          From comp.compilers

Related articles
Add LL(k)or predictive backtracking to recursive descent dr_feriozi@prodigy.net (Dan Feriozi) (2002-03-09)
| List of all articles for this month |

From: Dan Feriozi <dr_feriozi@prodigy.net>
Newsgroups: comp.compilers
Date: 9 Mar 2002 03:12:31 -0500
Organization: Prodigy Internet http://www.prodigy.com
Keywords: parse, tools
Posted-Date: 09 Mar 2002 03:12:31 EST

SLK now has an option that enables adding nondeterministic or
deterministic extra lookahead to any recursive descent parser. A
function call returns the production number to use or zero on error. So
where it is needed just switch on the production number instead of the
lookahead token. Nonterminals that do not need it are coded as usual.


short SlkGetProduction ( SlkToken &tokens,
                                                  short nonterminal,
                                                  short token );


short SlkGetPredictedProduction ( int display,
                                                                    SlkToken &tokens,
                                                                    short nonterminal,
                                                                    short token );


void SlkPrintProduction ( char *buffer,
                                                    int production_number );


More details are at www.parsers.org/slk


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.