On Thu, Mar 12, 2009 at 01:42:47AM -0700, Matthew Walton wrote: > Run this: > > grammar G { > regex TOP { 'a' {*} } > } > class GA { > method TOP($m) { make GA.new } > } > > G.parse('a', :action(GA.new)); > > > And this happens: > > rakudo ea3283: OUTPUT«Method 'result_object' not found for > invocant of class 'Failure'current instr.: 'make' pc 19258 > (src/builtins/match.pir:39)»
You probably want method TOP($/) { make GA.new } The 'make' builtin works on its caller's $/ variable, and in the version of TOP given above there's no $/ variable set. More precisely, the $/ for TOP is undef, and that's why you're getting the "result_object" not found message. As mentioned on irc/#perl6, a more helpful error message might be useful here, so we'll leave this ticket open for that (and change the topic appropriately). Thanks for reporting! Pm