On Mon, Nov 27, 2006 at 10:52:13AM -0800, Allison Randal wrote:
> Patrick R. Michaud wrote:
> >
> >Also, out of curiosity, which high-level constructs in punie aren't
> >working?
> 
> What I've found so far are:
> 
> - The top-level AST structure is off: my temporary hack to replace 
> PAST::Stmt and PAST::Exp with PAST::Stmts is producing extra temporary 
> variables in the PIR output. I need to refactor the top few tiers of 
> transformation rules, and maybe refactor the Punie parser grammar.

I'll gladly add PAST::Stmt and PAST::Exp nodes if that's at all
useful.  Just because they're there doesn't mean a compiler has to
use them.  :-)

> - Comma lists are also handled completely differently.

PAST itself doesn't know anything about comma lists -- it just
thinks of comma as being an operator like any other operator.
In perl6 the infix:, operator has 'list' associativity, so that
it ends up with a variable arity.  However, I recognize that some 
languages might need to keep the notion that commas are left-associative
with arity 2, so perhaps we need some form of 'list' pasttype
that would combine the operands together somehow?

> So, it's not a matter of missing features (aside from PAST::Label), it's 
> just a matter of adapting the code to a different way of thinking. I'll 
> work through these in the next few days and let you know what I find as 
> I go.

That'd be great.  I'm working on some refactors of HLLCompiler and
PAST right now, I don't think any of these will break existing code.

Pm

Reply via email to