Fergus Henderson <[EMAIL PROTECTED]> wrote,

> On 15-Sep-2000, Manuel M. T. Chakravarty <[EMAIL PROTECTED]> wrote:
> > Doug Ransom <[EMAIL PROTECTED]> wrote,
> > 
> > > Are combinator parsers recursive decent?  Do they have any disadvantages
> > > over generated parsers like that yacc would produce?
> > 
> > Yes, they are recursive decent.  As a consequence you have
> > to left-factorise left-recursive productions in the grammar;
> > otherwise, the parser won't terminate.  Other than that,
> > there are two disadvantages that I see: Speed and clarity of
> > error messages during *development* of the parser.
> > 
> > As for speed, Doitase Swierstra et al. came up with a very
> > clever scheme of computing a parse table in a combinator
> > parser on-the-fly during parsing, which makes things a lot
> > faster:
> 
> Doesn't that technique also solve the problem of left-recursion?

The parse table generated is essentially a table for an
SLL(1) parser and those can't handle left recursion.

Manuel

Reply via email to