> I think whatever output format that module uses will probably be fine.

well then ... taking output from Re: Parsing Boolean expressions (hack)

$ perl -MO=Terse -e ' $Y = ( $A or ($B^1 or ($C and $D)^1) );' LISTOP (0x8570520) leave [1] OP (0x85a2968) enter COP (0x856fff8) nextstate BINOP (0x8570500) sassign UNOP (0x85704e0) null LOGOP (0x85704c0) or UNOP (0x856ffb8) null [15] PADOP (0x8570050) gvsv GV (0x856a758) *A UNOP (0x85704a0) null LOGOP (0x8659ee0) or BINOP (0x856ff78) bit_xor [4] UNOP (0x856ff58) null [15] PADOP (0x856ff38) gvsv GV (0x856a7bc) + *B SVOP (0x856ff08) const [8] IV (0x856a71c) +1 BINOP (0x8659ec0) bit_xor [7] UNOP (0x8659e80) null LOGOP (0x8659e60) and UNOP (0x8570180) null [15] PADOP (0x85700c8) gvsv GV (0x +856a7a8) *C UNOP (0x8659e40) null [15] PADOP (0x859fd50) gvsv GV (0x +856a7e4) *D SVOP (0x8659ea0) const [9] IV (0x856a7d0) +1 UNOP (0x8570140) null [15] PADOP (0x856edd8) gvsv GV (0x856a730) *Y

et voila! ;-P

And see B::Concise for even more formating options.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!


In reply to Re^3: Parsing Boolean expressions by LanX
in thread Parsing Boolean expressions by Anonymous Monk

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.