Simon Cozens wrote:
> To be perfectly honest, my preferred solution would be to have the tokenizer,
> lexer and parser as a single, hand-crafted LR(k) monstrosity.

Those are hard to understand because so much extra work has to be done to
compensate for lack of top-down state when doing a bottom-up match. I've
played around with a yacc grammar for C++ and it's very difficult to introduce
new constructs without breaking existing ones. Since Perl is much more
difficult than C++ to parse, I suspect that your LR(k) monstrosity will be
limited to only a few gurus to play with.

The other down-side is that we'd be doing a whole lot of custom work designed
just for parsing Perl instead of creating something more general and powerful
that can be used for other problems as well. For example, I'd imagine the PDL
folks would much rather extend a recursive-descent parser with back-tracking
than an LR(k) monstrosity.

Maybe I'm just lazier than you... ;)

- Ken

Reply via email to