Re: Regular expressions: recursive patterns and callouts



"Carlos" <carlosjosepita@xxxxxxxxx> wrote in message
news:1137876890.715521.292280@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi!
> I think two extensions to re could be really powerful in aiding to
> match non regular strings -for example those containing parens nested
> up to an arbitrary depth- but without a significative performance loss,
> although I'm not at all sure at this last point. One of these features
> is re nesting; I don't mean nesting some strings and then compiling the
> composed re, but to include -possibly recursive- references to other
> re's. The second feature is the ability to add callout points in a re,
> so external functions would be called when the matcher reaches those
> points to validate the current matched prefix or even to do some
> arbitrary further matching of its own, advancing the pattern position.
> pcre implements similar features with its (?CN) callout and (?N)
> recursive patterns mechanisms.
> Are the above or equivalent features planned for future python
> releases?
> Do you know of some extension package which provide them or at least
> pcre compatible res?
> Thank you in advance,
> Carlos
>

Pyparsing supports both parse-time callouts (called "parse actions") and
recursive grammar definitions.

Download pyparsing at http://pyparsing.sourceforge.net.

-- Paul


.



Relevant Pages

  • Regular expressions: recursive patterns and callouts
    ... I think two extensions to re could be really powerful in aiding to ... match non regular strings -for example those containing parens nested ... pcre implements similar features with its callout and ...
    (comp.lang.python)
  • Re: What 2003 features are compatible with 2002 Server Extensions
    ... it as a "Remote Web site"? ... FP 2003 with their server setup. ... > changes that evolved in the FP 2002 Server Extensions and Windows SharePoint ... > that is running the extensions directly and seeing what features FP ...
    (microsoft.public.frontpage.extensions.windowsnt)
  • Re: Cant use IE due to Pop-ups, even w/SpybotS&D, Ad-AwareSE...
    ... Remember to check out the available extensions--I found many features I ... want the Tabbrowser extension that puts those tabs on steroids. ... also some really neat extensions to help with organizing and maintaining ... "Eliyahu Rooff" wrote in message ...
    (sci.med.transcription)
  • Re: [POSIX & Win32API] Getting the routing informations
    ... use those extensions it no longer ports to any compliant system. ... Replace ISO with GNU and you have an equally true proposition. ... standard. ... GNU C provides several language features not found in ISO ...
    (comp.lang.c)
  • Re: Is it time for another Tcl/Tk book?
    ... (Brent Welch doesn't really get into any of these...) ... Latest features of tcl8.5 ... extensions. ... work planned for Tcl 8.6, so I don't know if anything could be done ...
    (comp.lang.tcl)