From 59fcc4e8ff37414071cf72b0643fcc483858ac34 Mon Sep 17 00:00:00 2001 From: jnthn Date: Wed, 25 Feb 2009 16:20:34 +0100 Subject: [PATCH] .parse needs to pass along the fully qualified name of the grammar to PGE. (.WHO should make this easier in the future, OTOH maybe PGE needs to change and take the grammar class itself, so it can handle anonymous grammars too). Either way, this resolves RT#63462. --- src/classes/Grammar.pir | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/classes/Grammar.pir b/src/classes/Grammar.pir index 874244ad277..6c5f42e1e89 100644 --- a/src/classes/Grammar.pir +++ b/src/classes/Grammar.pir @@ -42,8 +42,13 @@ Invokes the TOP rule in the grammar on the given topic. push_eh no_TOP TOP = find_method self, "TOP" pop_eh - .local pmc match - $S0 = self.'WHAT'() + .local pmc match, p6meta + p6meta = get_hll_global ['Perl6Object'], '$!P6META' + $P0 = p6meta.'get_parrotclass'(self) + $P0 = inspect $P0, 'namespace' + $P0 = $P0.'get_name'() + $S0 = shift $P0 + $S0 = join '::', $P0 match = TOP(topic, 'grammar' => $S0) $P0 = getinterp $P1 = $P0['lexpad';1]