Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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 from what I thought were bugs that received a "TODO.*BUG" note. If there are any inaccuracies thinkos typos you have been warned :) #~ TODO REPORTBUG PPIx::Regexp::Token::Greed +iness NEEDS TO DIE / THERE NEEDS TO BE A SINGLE PPIx::Regexp::Token:: +Quantifier TODO REPORTBUG perlre/perlretut/re DO NOT LI +NK perldebguts which explains use re 'debug'; output "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)", push @{$$ret{start}}, 'ERROR warn T +ODO REPORTBUG octals NOT PARSED AS PPIx::Regexp::Node::Range'; push @{$$ret{start}}, "ERROR warn +TODO REPORT BUG THIS IS LITERAL ^ NOT NEGATION"; push @{$$ret{start}}, "ERROR warn +TODO REPORT BUG A LONE ^ IN A CHARCLASS IS A IS LITERAL ^ NOT NEGATIO +N"; THIS IS A LIE :) TODO REPORT BUG C<PPIx::Regexp::Struc +ture::Unknown> has no descendants. TODO REPORT BUG \g10 UNRECOGNIZED AS A REFERENCE mispa +rsed as PPIx::Regexp::Token::Literal TODO REPORT BUG? SHOULD BE RECOGNIZED AS Token::Modif +ier/GroupType::Modifier'\P' => ['L<perlrecharclass/Unicode Properties>','TODO + warn REPORT BUG for PPIx::Regexp; \PP is \P{Prop} ; for example \PN +is \P{Number}; ' ],'\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

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (6)
    As of 2018-07-19 17:34 GMT
    Find Nodes?
      Voting Booth?
      It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

      Results (412 votes). Check out past polls.