# New Ticket Created by Bernhard Schmalhofer # Please include the string: [perl #52498] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=52498 >
Pheme should be converted to using PCT/PAST.pbc, so that PAST-pm can be retired, I have started on that road, but ended up with one remaining test failure. The failing test case is test 4 of 'quote.t'. Could somebody with PAST knowledge take a look at the attached patch and possible find out what is wrong or missing? Regards, Bernhard
Index: languages/pheme/lib/pge2past.tg =================================================================== --- languages/pheme/lib/pge2past.tg (Revision 26781) +++ languages/pheme/lib/pge2past.tg (Arbeitskopie) @@ -267,7 +267,7 @@ name = "'" . name name .= "'" result.'name'( name ) - result.'vtype'( '.Undef' ) + result.'returns'( 'Undef' ) .local pmc children children = node.'get_array'() @@ -493,8 +493,9 @@ quoted_value .= value quoted_value .= "'" + result.'value'( quoted_value ) result.'name'( quoted_value ) - result.'vtype'( '.Undef' ) + result.'returns'( 'Undef' ) .return( result ) } @@ -507,7 +508,8 @@ value = node result.'name'( value ) - result.'vtype'( '.Undef' ) + result.'value'( value ) + result.'returns'( 'Undef' ) .return( result ) } Index: languages/pheme/pheme.pir =================================================================== --- languages/pheme/pheme.pir (Revision 26781) +++ languages/pheme/pheme.pir (Arbeitskopie) @@ -1,3 +1,5 @@ +# $Id$ + =head1 TITLE pheme.pir - A Pheme compiler. @@ -7,7 +9,7 @@ This is the base file for the Pheme compiler. This file includes the parsing and grammar rules from -the src/ directory, loads the relevant PGE libraries, +the lib/ directory, loads the relevant PGE libraries, and registers the compiler under the name 'Pheme'. =head2 Functions @@ -25,21 +27,19 @@ .namespace [ 'Pheme::Compiler' ] .sub '__onload' :load :init - load_bytecode 'PGE.pbc' + load_bytecode 'PCT.pbc' load_bytecode 'PGE/Text.pbc' - load_bytecode 'PGE/Util.pbc' - load_bytecode 'Parrot/HLLCompiler.pbc' - load_bytecode 'PAST-pm.pbc' $P0 = subclass 'PGE::Match', 'Match' $P0 = subclass 'Match', 'Grammar' $P0 = subclass 'Grammar', 'Pheme::PGE::Grammar' - $P0 = new [ 'HLLCompiler' ] + $P0 = get_hll_global ['PCT'], 'HLLCompiler' + $P1 = $P0.'new'() - $P0.'language'('Pheme') - $P0.'parsegrammar'( 'Pheme::Grammar' ) - $P0.'astgrammar'( 'Pheme::AST::Grammar' ) + $P1.'language'('Pheme') + $P1.'parsegrammar'( 'Pheme::Grammar' ) + $P1.'astgrammar'( 'Pheme::AST::Grammar' ) .end =item main(args :slurpy) :main