On Wed, Oct 15, 2008 at 10:02:39AM -0700, chromatic wrote:
> On Wednesday 15 October 2008 05:54:59 Will Coleda wrote:
> 
> > The namespace of the generated file should be changed, the subclass
> > should probably be updated. (TGE itself should probably be updated to
> > not live a namespace with a '::' in it. The actual transform sub can
> > keep the name it has, but the first parameter to add_rule() should
> > probably be updated as well. This /should/ work with the new automatic
> > translation of :: that PGE is doing.
> 
> Here's a patch for part of TGE to use the keyed form of classnames.  PCT may 
> need some changes as well.  In particular, the parsegrammar and astgrammar 
> methods in src/PCT/HLLCompiler.pir take strings as arguments, as in this 
> example from Pheme:
> 
>     $P0 = get_hll_global ['PCT'], 'HLLCompiler'
>     $P1 = $P0.'new'()
> 
>     $P1.'language'('Pheme')
>     $P1.'parsegrammar'( 'Pheme::Grammar' )
>     $P1.'astgrammar'(   'Pheme::AST::Grammar' )
> 
> They should probably transform these strings into keys internally, as 
> P6MetaObject does.

'parsegrammar' already knows to convert a string into a class --
we just need to update 'astgrammar' to do the same.

Pm

Reply via email to