Re: Next against the wall when the virtual revolution comes...

[email protected] (Damian Conway) Wed, 12 Apr 2000 19:27:11 +1000 (EST)
Newsgroups perl.sdk
Message-ID <[email protected]>
Stephen Zander writes:

   > >>>>> "Andy" == Andy Wardley <[email protected]> writes:
   >     Andy> Can't say a thing about ParseLex, except that it's
   >     Andy> *probably* covered by Parse-Yapp, guessing from the name.
   > 
   > I agree about the value of having bothe RecDescent & LALR, I've just
   > never used either ::Yapp or ::Lex.
   > 
   > Is Parse::Yapp is the more mature of the two?

[Apologies if this is all common knowledge...]

Parse::Lex predates Parse::RecDescent which predates Parse::Yapp.

The "maturity" issue is complicated by the fact that Parse::Yapp is a
faithful reimplementation of the venerable yacc (which has been around so
long it feels like it predates the Analytical Engine ;-)

Parse::Lex is a tokenizer (takes a string and breaks it into named
chunks called tokens); Parse::Yapp is a parser generator (takes a
grammar and builds a token-driven finite state machine);
Parse::RecDescent is also a parser generator (takes a grammar and builds
a string-driven set of recursive functions).

To build a full parser you therefore need Parse::Lex (or a hand-rolled
tokenizer) plus Parse::Yapp (or a hand-rolled token parser); or just
Parse::RecDescent.

Damian