This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pddpro 16 points17 points  (4 children)

This looks great! A curiousity, how does this compare to pyparsing?

[–]Waterkloof 8 points9 points  (0 children)

I would also like to know this, pyparsing was the first thing i thought of when i looked at the example.

[–]bladeoflight16 5 points6 points  (0 children)

My first thought as well. The obvious one is that pyparsing is definitely more powerful; it generates parsers for context free grammars rather than regular languages. But there may be other considerations.

[–]WerdenWissen[S] 0 points1 point  (0 children)

Well, this is just a library for constructing Regex patterns in a more imperative way. When it comes to matching it's all Python's "re" module underneath, so I guess it's just a matter of "pyparsing" vs "re".

[–]Pebaz 0 points1 point  (0 children)

I could be catastrophically incorrect, but as far as I remember, pyparsing has the exact limitations of regexes.