On Wed, Sep 08, 2004 at 09:56:12AM -0700, Larry Wall wrote:
> On Wed, Sep 08, 2004 at 07:33:45AM -0600, Patrick R. Michaud wrote:
> : We're in the beginning stages of building a basic perl 6 grammar engine 
> : (i.e., probably without p6 closures) that compiles to parrot and handles
> : basic optimizations.
> 
> I wonder whether, in the absence of closures, we'll have to have some
> similar way to embed syntax-tree building code (PIR?) as actions in
> the grammar.  

We may indeed need this.  I think the easiest way would be to
build some sort of "special-purpose" assertions or rules that
fire off some PIR code.  

Or, perhaps we can just find a way to do a funky sort of replacement
whereby p6 source code gets replaced by its equivalent PIR code as
soon as the compiler think it has a rule matched.  Naaah, scratch that.

> Perhaps most of the grammar can rely on the built-up
> tree of $0 nodes, but we'll at least have to have an escape down into
> the operator precedence parser.  [...]    But I'm just a little 
> scared that operator precedence will be one of those optimizations 
> that's always the project after this one... [...]

No, I'm expecting that we'll go ahead and build something to deal with
operator precedence early on, at least for bootstrapping purposes.
This is part of the reason why I was eager to see the precedence tables
get nailed down a bit more.

Pm

Reply via email to