Add LL(k)or predictive backtracking to recursive descent

Dan Feriozi <>
9 Mar 2002 03:12:31 -0500

          From comp.compilers

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

From: Dan Feriozi <>
Newsgroups: comp.compilers
Date: 9 Mar 2002 03:12:31 -0500
Organization: Prodigy Internet
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

Post a followup to this message

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