parsing based on BNF?

Jan Dries jdries at
Wed Feb 28 11:46:58 EST 2001

John Aycock wrote:
> Uche Ogbuji <uche at> wrote:
> > I'm quite familiar with all the various scanners and parsers, which is
> > why I asked my question.  I do not know of one that implements plain BNF
> > (or EBNF to provide some lexical specifications).  This would have been
> > useful in implementing the many little languages I have: XPath, OQL,
> > ODL, etc. which are specified in BNF.
> Well, I guess I'll add my shameless plug.  SPARK's parser can handle
> arbitrary BNF grammars, even ambiguous ones.  It was originally
> intended for little languages.  

I've been using the SPARK parser, and I like it a lot because of the
flexibility is has in dealing with grammars. In fact, I used it to
implement XPath, something the previous poster was refering too. 
However, there's one disadvantage in SPARK: it's slow. Parsing a few not
even very complex XPath expression takes something in the order of a


More information about the Python-list mailing list