Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pyparsing - load ABNF?

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)

like image 236
OJW Avatar asked Sep 22 '09 10:09

OJW


2 Answers

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

like image 130
PaulMcG Avatar answered Oct 06 '22 23:10

PaulMcG


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.

like image 45
Ned Batchelder Avatar answered Oct 06 '22 22:10

Ned Batchelder