Wednesday, December 31, 2008

Kodos for pyparsing

"Kodos for pyparsing"

Perhaps if I say it, with earnest conviction, it will come into existence. Perhaps if I intone it repeatedly; light a candle, maybe.

Or perhaps I will get around to creating the modification to Kodos myself. It might not even be too hard - it just can't be a priority project right now...

Kudos for pyparsing, too, of course.


ptmcg said...

Catherine -

Glad to hear pyparsing is on your "faves" list. Yes, I have had in mind some kind of GUI workbench for pyparsing grammar creation, but this may have to wait until I reach retirement - I'm still paying the bills with the day job.

Please post on the pyparsing wiki if you have comments or questions, or just want to brag on some especially tricky parsing prowess! :)

-- Paul

ptmcg said...

Well done! Even if it is just version 0.1.0, pyparsing_helper is a decent working prototype. I just finished another pyparsing article for Python magazine, and reran my examples using pyparsing_helper. Most ran fine, here are a couple of items to consider for version 0.2.0:
1. You have support for parse(String) and scan(String), but transform(String) would be good too. Don't bother doing search(String), it is just a thin wrapper around scanString (or just relabel 'scan' as 'scan/search').
2. Parse actions are an important feature of pyparsing, but all I could define were lambdas inline with the setParseAction call.

But otherwise, this little utility will definitely help me in responding to pyparsing questions on the various forums.

-- Paul

Unknown said...

Thanks for your suggestions, Paul! I've barely used transformString and setParseAction; can you check 0.1.1 (out now) and verify that they're working correctly?