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 ]

kag (4257)

kag
  (email not shown publicly)

Journal of kag (4257)

Thursday March 18, 2004
07:23 PM

Reviving the CLU project

[ #17959 ]

A few months ago I tried to write a CLU compiler for parrot (for no better reason than nostalgia for my undergraduate days). I got bogged down in trying to figure out a not-horribly-complex way to implement parameterized clusters, so on the shelf it went.

Parrot has progressed a lot since then. So it's time to take CLU off the shelf and dust it off a bit. The Parse::RecDescent parser is still mostly good. (I need to wrap my brain around PRD's error reporting. Compilers really should report syntax errors rather than just exiting.) I'll probably port to Perl6::Rules when they're done.

The code generation was definitely in the "build one to throw away" category. So out it goes. This time I'm going to output an AST to feed to the not-yet-existant ast2imc layer of Parrot. I can spit out ASTs for statements in either YAML or s-expressions. (More complex constructs awaiting me deciding how scopes are handled.) The sexprs lose some of the metadata.

Google finds several intentions to write a YAML library for Parrot, but no code. The only firm AST stuff for Parrot is Leo's YAL, which is in C. (Subgoal of mine: avoid C.) But at the rate I'm devoting time to my little toy, that probably isn't a problem.

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.