On Fri, May 24, 2013 at 8:58 AM, Malte Forkel <malte.for...@berlin.de> wrote: > As a first step, I am looking for a parser for Python regular > expressions, or a Python regex grammar to create a parser from.
the sre_parse module is undocumented, but very usable. > But may be my idea is flawed? Or a similar (or better) tools already > exists? Any advice will be highly appreciated! I think your task is made problematic by the possibility that no single part of the regexp causes a match failure. What causes failure depends on what branches are chosen with the |, *, +, ?, etc. operators -- it might be a different character/subexpression for each branch. And then there's exponentially many possible branches. -- Devin -- http://mail.python.org/mailman/listinfo/python-list