3 ms·
Never used ply, but why not regex? Regex cannot easily match recursive structures, and can't be easily composed. Pyparsing gives you more structure and ready bu
by viraptor 10y ago
Never used ply, but why not regex? Regex cannot easily match recursive structures, and can't be easily composed. Pyparsing gives you more structure and ready building blocks. It actually can use regex as one of the term objects.
Ply tries to implement lex/yacc only, so it's far from a nice interface really...
Or specifically: it's trivial to match `specific_func(any_expression, {capture, these, values})`, but it's practically impossible with regex and painful to post-process with ply.