On Wed, Oct 15, 2008 at 1:03 PM, chromatic via RT
<[EMAIL PROTECTED]> 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.
>
> -- c
>
>
>

With this patch, I get a TGC failure trying to compile tcl :

../../parrot ../../compilers/tge/tgc.pir
--output=src/grammar/expr/pge2past.pir src/grammar/expr/pge2past.tg
Null PMC access in invoke()
current instr.: 'parrot;TGE::Compiler;parse_grammar' pc 28 (TGE/Compiler.pir:34)
called from Sub 'parrot;TGE::Compiler;precompile' pc 653 (TGE/Compiler.pir:293)
called from Sub 'main' pc 101 (../../compilers/tge/tgc.pir:87)
make: *** [src/grammar/expr/pge2past.pir] Error 1



-- 
Will "Coke" Coleda

Reply via email to