[Pyparsing] boot-strapping grammars?
Brought to you by:
ptmcg
From: Duncan M. <dun...@gm...> - 2012-06-14 02:41:47
|
Hello Paul and all :-) Has anyone done any work with bootstrapping one grammar with another using PyParsing? Here's a concrete example of what I'm hoping to accomplish: * I've copied the OpenBSD pf (packet filter) grammar (from its man page) * I've adapted Paul's python BNF parser example to parse it (only partially working so far) * Once it's done, I'd like to use it to create a PyParsing grammar that can parse any legal (according to the BNF) pf commands Is this even possible? Or would it be better just to create a PyParsing grammar from scratch for the 81 identities in the pf BNF...? Thanks! d |