You can create a set of events, one for each of the rules you are looking for, to trigger when that rule is completed. Let me know if that doesn't do the trick -- there are other ways. I mention events because they can be precisely targeted for a particular problem. -- jeffrey

On 04/17/2014 04:10 PM, Deyan Ginev wrote:
Dear all,

The documentation explains how I can get the positional information about a rule that was successfully completed via "last_completed" (https://metacpan.org/pod/Marpa::R2::Scanless::R#last_completed).

I have an application where I have a number of notational rules R1, ... Rn, each of which in turn "subtyping" a generic Notation rule:

 Notation ::= R1
                 | R2
                 # ... and so on

So, when I ask for:
|||my| |( ||$g1_start||, ||$g1_length| |) = ||$recce||->last_completed(||'Notation'||);|

is there / could there be more information provided? For example passing the current result of the semantics, or the list of derived rules underneath?
I am trying to recover precisely which of R1 ... Rn was matched.

Thanks for the help in advance!

Greetings,
Deyan
--
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] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--
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