perl.cvs.parrot
[Top] [All Lists]

[svn:parrot] r31693 - branches/hllmagic/runtime/parrot/library/PGE

Subject: [svn:parrot] r31693 - branches/hllmagic/runtime/parrot/library/PGE
From:
Date: Mon, 6 Oct 2008 01:04:26 -0700 PDT
Newsgroups: perl.cvs.parrot

Author: tene
Date: Mon Oct  6 01:04:25 2008
New Revision: 31693

Modified:
   branches/hllmagic/runtime/parrot/library/PGE/Perl6Grammar.pir

Log:
[Perl6Grammar]
* NS updates


Modified: branches/hllmagic/runtime/parrot/library/PGE/Perl6Grammar.pir
==============================================================================
--- branches/hllmagic/runtime/parrot/library/PGE/Perl6Grammar.pir       
(original)
+++ branches/hllmagic/runtime/parrot/library/PGE/Perl6Grammar.pir       Mon Oct 
 6 01:04:25 2008
@@ -56,7 +56,7 @@
 
 =cut
 
-.namespace [ 'PGE::Perl6Grammar::Compiler' ]
+.namespace [ 'PGE';'Perl6Grammar';'Compiler' ]
 
 .sub 'main' :main
     .param pmc args
@@ -119,14 +119,15 @@
     $P0 = p6regex($S0, 'grammar'=>'PGE::Perl6Grammar', 'name'=>'statement', 
'w'=>1)
 
     ##  Add the PGE::Perl6Regex's regex method to PGE::Perl6Grammar
-    $P0 = get_hll_global ['PGE::Perl6Regex'], 'regex'
-    $P1 = get_class ['PGE::Perl6Grammar']
+    $P0 = get_hll_global ['PGE';'Perl6Regex'], 'regex'
+    $P1 = get_class ['PGE';'Perl6Grammar']
     $P1.'add_method'('regex', $P0)
 
     ##   create the PGE::Perl6Grammar compiler object
-    .local pmc pgc
-    $P99 = subclass 'PCT::HLLCompiler', 'PGE::Perl6Grammar::Compiler'
-    pgc = new [ 'PGE::Perl6Grammar::Compiler' ]
+    .local pmc pgc, p6meta
+    p6meta = new 'P6metaclass'
+    p6meta.'new_class'('PGE::Perl6Grammar::Compiler', 
'parent'=>'PCT::HLLCompiler')
+    pgc = new [ 'PGE';'Perl6Grammar';'Compiler' ]
     pgc.'language'('PGE::Perl6Grammar')
 .end
 
@@ -151,7 +152,7 @@
     match = $P0.'new'(source, 'grammar'=>'PGE::Perl6Grammar')
 
     .local pmc stmtrule
-    stmtrule = get_hll_global ['PGE::Perl6Grammar'], 'statement'
+    stmtrule = get_hll_global ['PGE';'Perl6Grammar'], 'statement'
 
   stmt_loop:
     match = stmtrule(match)
@@ -192,8 +193,10 @@
   ns_optable:
     $P0 = ns['optable']
     if $P0 == '' goto iter_loop
-    initpir.emit("          optable = new 'PGE::OPTable'")
-    initpir.emit("          set_hll_global ['%0'], '$optable', optable", 
namespace)
+    initpir.emit("          optable = new ['PGE';'OPTable']")
+    $P1 = split '::', namespace
+    $S1 = join "';'", $P1
+    initpir.emit("          set_hll_global ['%0'], '$optable', optable", $S1)
     initpir .= $P0
     goto iter_loop
   iter_end:

<Prev in Thread] Current Thread [Next in Thread>
  • [svn:parrot] r31693 - branches/hllmagic/runtime/parrot/library/PGE, tene <=