greetings seekers (& those only pretending to be seekers :-)

i raised the issue, and now that i have been given an answer, it seemed only right to leave it here as part of this thread, in hopes of helping any who follow.

first, i must confess that my poorly constructed sample actually works just fine, but the illustrated problem recurred with a better contrived example.

i visited the p::rd mailing list (mailto:recdescent@perl.org), laid out the problem and, "hey presto!", i was enlightened, thusly:

SHORT ANSWER:
always place a blank line after every usage of the '<<' shift operator, but do it INSIDE the action.
{ $main::Instruction_lower = 0x000000 | (($item[16] & 0x000003) << 10) ;# the next blank line is required. 1; }


the LONG ANSWER (without permission, but with many thanks) is:
"the problem is with Text::Balanced::_match_quotelike where it thinks the '<<' is a hereis operator instead of a shift and tries to process it like a quoting operator.
. . .
The reason for the bug is that it consumes the entire input and the parser fails in a bizarre way that makes it think everything after the '<<' is part of that hereis literal.
So to fake it out, give it what it wants, which is a blank line after every usage of the '<<' shift operator, but you have to do it INSIDE the action. The original code had the blank line after the action and the parser parser looses its mind."

many thanks to all that helped and/or tried.

In reply to Re: RecDescent: binary shift in exe block? by bear_hwn
in thread RecDescent: binary shift in exe block? by bear_hwn

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!
  • 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, details, 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, summary, 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.