Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

:) But if I do that I'll have to update my program, and I'm lazy and its hard to juggle :)

Ok, if you're willing to accept this is a roundabout way to report an issue, a work in progress that stalled few months ago, that started organically as a single subroutine walking the PPIx::Regexp tree and grew from there, slowly as I am learning my way around, into its current state, still in need of refactoring ...

I'll post the full code in two followups but here is an excerpt from ppixregexplain.pl from what I thought were bugs that received a "TODO.*BUG" note. If there are any inaccuracies thinkos typos you have been warned :)

ppixregexplain.pl:150:#~ #~ TODO REPORTBUG PPIx::Regexp::Token::Greed +iness NEEDS TO DIE / THERE NEEDS TO BE A SINGLE PPIx::Regexp::Token:: +Quantifier ppixregexplain.pl:325:#~ TODO REPORTBUG perlre/perlretut/re DO NOT LI +NK perldebguts which explains use re 'debug'; output ppixregexplain.pl:1165: "TODO warn REPORT BUG \\g10 UNRECOG +NIZED AS A PPIx::Regexp::Token::Backreference misparsed as PPIx::Reg +exp::Token::Literal (\\g10 is not \\10, can't be treated as octal)", ppixregexplain.pl:1172: push @{$$ret{start}}, 'ERROR warn T +ODO REPORTBUG octals NOT PARSED AS PPIx::Regexp::Node::Range'; ppixregexplain.pl:1470: push @{$$ret{start}}, "ERROR warn +TODO REPORT BUG THIS IS LITERAL ^ NOT NEGATION"; ppixregexplain.pl:1476: push @{$$ret{start}}, "ERROR warn +TODO REPORT BUG A LONE ^ IN A CHARCLASS IS A IS LITERAL ^ NOT NEGATIO +N"; _desc.pl:159:#~ THIS IS A LIE :) TODO REPORT BUG C<PPIx::Regexp::Struc +ture::Unknown> has no descendants. _desc.pl:176:#~ TODO REPORT BUG \g10 UNRECOGNIZED AS A REFERENCE mispa +rsed as PPIx::Regexp::Token::Literal _desc.pl:761:#~ TODO REPORT BUG? SHOULD BE RECOGNIZED AS Token::Modif +ier/GroupType::Modifier _desc.pl:931:'\P' => ['L<perlrecharclass/Unicode Properties>','TODO + warn REPORT BUG for PPIx::Regexp; \PP is \P{Prop} ; for example \PN +is \P{Number}; ' ], _desc.pl:932:'\p' => ['L<perlrecharclass/Unicode Properties>','TODO + warn REPORT BUG for PPIx::Regexp; \pP is \p{Prop} ; for example \pN +is \p{Number}; ' ],

In in furtherance of blind copying, the corresponding entries from my "test suite" (it tests my eyeball interface)

'qr/(?[ ( ( [c^] - [d^] ) | ( [^c] & ( [a] + [2] ) ) ) ])/', ## TODO R +EPORT misparsed as [^c] and [^d] "qr{ \\pP\\p{P}\\PP\\P{P} }x", ## TODO report bug misparsed single let +ter Unicode properties q{qr{[\200-\377\x00-\x1f]}}, ## TODO REPORTBUG NOT PARSED AS RANGE q{qr{[\0-\377]}}, ## TODO REPORTBUG NOT PARSED AS RANGE 'qr{ (?#legals) (?^) (?aa) (?a) (?d) (?l) (?u) (?p) (?i) (?m) (?s) (?x) (?-i) (?-m) (? +-s) (?-x) (?x) (?#NOTlegals) (?aad) (?ad) (?al) (?au) (?uu) (?ll) (?dd) (?-a) (?-d) (?-l) (?-u) (?- +p) (?-^) (?gcer) (?-gcer) }x',,, "m{(?i)a(?-i)B(?i)(?-i:B\\w(?i:q\\w))q}xi",# a case insensitive B case + sensitive
And one more
#~ a is case INsensitive #~ B is case SEnsitive my $re = PPIx::Regexp->new( <<'__GROAN__' ); m{ a (?i: (?-i)B (?i)a (?-i)B (?i)a (?-i)B (?i: a (?-i)B (?i)a (?-i)B (?i)a (?: (?-i)B B ) a [a-a] ) ) a $a_terpolats (?-i:$B_TERPOLATES) }xi __GROAN__

In the code below the modifiers propagation code is in the following definitions (you can copy/paste each line to find the sub definition)

sub xplain_modifiers sub PPIx::Regexp::Token::Modifier::xmods_explode sub PPIx::Regexp::xmods_propagate sub PPIx::Regexp::Element::xmerge_mods sub PPIx::Regexp::Node::xmods_susceptible sub PPIx::Regexp::Node::xmods

In reply to Re^3: Parsing and translating Perl Regexes ( PPIx::Regexp::xplain Regexp::Debugger ) by Anonymous Monk
in thread Parsing and translating Perl Regexes by LanX

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (14)
    As of 2014-09-18 14:00 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (116 votes), past polls