[plt-scheme] BNF parser generator

From: David Herman (dherman at ccs.neu.edu)
Date: Fri Jan 16 14:06:58 EST 2004

> How does it compare to Mitch's EOPL parser generator. -- Matthias

It should be less efficient than either SLLGEN or Scott's parser tools, 
but more general than either: SLLGEN is LL(1) and Scott's parser 
generator is LALR, whereas this code will accept any BNF grammar. It's 
inefficient because it's recursive descent and uses backtracking to try 
every alternate in order. However, given the amount of time I'd spent 
in undergraduate courses on parsers, I was surprised at how quickly and 
easily I was able to construct a working (sic) parser in a functional 
style, and I also think it came out rather elegant.

I'm not sure how useful it would be in practice. The trade-off of 
efficiency (of LALR) for generality (of full BNF) is probably not worth 
it. However, since LL(1) is rarely powerful enough in my experience, 
SLLGEN wouldn't be my tool of choice. Scott's parser collection comes 
out the winner.

Dave



Posted on the users mailing list.