tags:

views:

154

answers:

2

can pyparsing read ABNF from a file instead of having to define it in terms of python objects?

If not, is there something which can do similar (load an ABNF file into a parser object)

+1  A: 

There are lots of Python parsing packages: Python Parsing Tools. ANTLR in particular is very well-respected, and reads a grammar from a dedicated file.

Ned Batchelder
+4  A: 

See this example submitted by Seo Sanghyeon, which reads EBNF and parses it (using pyparsing) to create a pyparsing parser.

-- Paul

Paul McGuire