I think this patch is advisable, or at least not wrong.  Yes/no?

=== compilers/tge/TGE/Compiler.pir
==================================================================
--- compilers/tge/TGE/Compiler.pir      (revision 13181)
+++ compilers/tge/TGE/Compiler.pir      (local)
@@ -380,6 +380,9 @@
     .return (code)
 .end
 
+# NOTE - this code assumes that a type of '' is impossible
+#        (in older versions of Parrot, it was)
+
 .sub 'grammar_string' :method
     .param pmc grammar
     .local string code
@@ -387,9 +390,13 @@
     .local string inherit
     type = grammar["type"]
     inherit = grammar["inherit"]
-    code = "\n.namespace [ '"
+    code = "\n.namespace"
+    if type == '' goto no_type
+    code .= " [ '"
     code .= type
-    code .= "' ]\n\n"
+    code .= "' ]"
+  no_type:
+    code .= "\n\n"
     code .= ".sub '__onload' :load\n"
     code .= "    load_bytecode 'TGE.pbc'\n"
     code .= "    $I0 = find_type '"

-- 
Chip Salzenberg <[EMAIL PROTECTED]>

Reply via email to