You might find the few util methods in this link 
<https://github.com/jddurand/MarpaX-Languages-ECMAScript-AST/blob/master/lib/MarpaX/Languages/ECMAScript/AST/Util.pm>
 
useful -;

Le jeudi 26 juin 2014 14:50:12 UTC+2, Ion Toloaca a écrit :
>
> One last question and I suppose the problem will be solved.
>
> Can I also access the location where the rule got matched within the 
> action? 
> When using events I used something along the lines:
> /////////////////////////////////////////////////////////////////////////
> my $pos = $recce->read( \"$input", $start, $length - $start );
> ......................
> my ($start_rule, $length_rule) = $recce->last_completed($name);
> my $last_expression = $recce->substring($start_rule, $length_rule);
> push @$actual_events, [$pos - length($last_expression) +1,$pos+1, $_]; 
> #Marpa counted unicode symbol length incorrectly - so that's a work 
> around....
> .......................
> eval {$pos = $recce->resume(); };
> /////////////////////////////////////////////////////////////////////////
> This way I found the positions where the notations/arguments matched  - 
> can I rewrite this using actions?
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to