An ABNF parser in Perl

This directory contains an ABNF parser written in Perl. ABNF is the BNF-like syntax described in RFC 2234, which is sometimes used for describing IETF text-based protocols.

This parser is a recursive-descent, infinite-lookahead parser (everything the Dragon Book tells you not to do), written in the course of a few hours of inspiration in December 1997.

The parser will give you ONE parse error, and if all parse is successful, it will list the rules it parsed, and make comments about undefined symbols.

The whole thing is available as a tar.gz file.

If you want to look at components, you can see:

Patches and competing products are VERY welcome; requests for added functionality are likely to be met with a deafening silence; this was a "quick hack to prove it could be done".

Another attempt at an ABNF-understanding tool is Chris Newman's parser at http://www.innosoft.com/iii/persons/chris/programs/abnf.c.

Good luck!


Harald Tveit Alvestrand <Harald.Alvestrand@maxware.no>