There's a use by RNS here:
https://github.com/rns/MarpaX-Languages-Lua-AST/blob/e5cce31936d32dc4944b1b9274564a24621015bb/lib/MarpaX/Languages/Lua/AST.pm#L542
-- I haven't studied this app, but it looks fairly standard.

Jean-Damien uses it in his C compiler here:
https://github.com/jddurand/MarpaX-Languages-C-AST/blob/5b3dc048ce177ed7d16318dbb98b3132f9be8998/lib/MarpaX/Languages/C/AST.pm

The RNS use may be the easier one to study.  It's a more standard use than
Jean-Damien, and it's for a parser for Lua, which has a much simpler
grammar.



On Mon, Jul 20, 2015 at 8:26 AM, Thomas Weigert <[email protected]>
wrote:

> I am trying to figure out how I can create, from within an external
> scanner, an ambiguous parse. What I want to achieve is this: I get fed an
> event from marpa, and now in the code handling this event I will need to
> recognize the matched symbol as two different lexemes, each causing a
> different parse to result.
>
> From the documentation it seems that I could call lexeme_alternative()
> twice, once for each lexeme I want to create. But, alas....
>
> Could you please point me to an example where somebody has successfully
> done something like this?
>
> In summary, I hope to, in a pause look at the expected symbols. If I find
> that certain symbols are expected, create a parse for each of them,
> resulting in a parse forest. (In fact, I know already that one of the
> alternatives will die later, but at this point, I do not yet know which.)
>
> Thanks, Th.
>
> --
> 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.
>

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