Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Allison (3003)

Allison
  (email not shown publicly)

Human (I think).

Journal of Allison (3003)

Thursday February 16, 2006
01:50 AM

Punie operators

[ #28698 ]
Yesterday and today I finished plugging in the operator precedence parser. (Three cheers to Patrick for his work that made it possible!) Punie can now handle statements like:

print 1 + 2 + 3;

and

print 1 - 2, "\n", 7 - 1, "\n";

and

if (42 + 11) {
  print "ok 1\n";
}

I first implemented it with most of the work happening in the POST->PIR transformation, but that turned out to be pretty hacky. So, I redid the bottom half with most of the work in the PAST->POST transformation. This is much cleaner, and produces POST structures that are quite close to the final PIR syntax. While I was at it, I refactored the code for printing lists, so it also splits out the opcodes during the PAST->POST transformation. Both the operator implementation and the print statement refactor rely heavily on the new POST::Ops node, so it is turning out to be quite useful.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.