Thanks, Jeffrey, for your responses.

I've gone through the documentation of Marpa::R2::Scanless::R 
<https://metacpan.org/pod/distribution/Marpa-R2/pod/Scanless/R.pod> but 
it's not becoming fully clear how to 'connect' the external lexing routine 
of mine to Marpa's built-in G1 parser. I've looked at some random Marpa 
code on the Net but that code is looking way too complicated as far as 
illustrating just the "external lexing" part goes.

My expectation was (and, is) that of a bison/flex type of interface where 
yyparse() calls yylex() to get the next token following which things 
automatically work. With Marpa, it seems, you have to do (much?) more than 
that (sorry, if I'm being inaccurate here). 

What I already understand: When doing external lexing, I assume I'll have 
to create the equivalent of yylex() myself - in my case this function will, 
e.g., be making heavy use of Perl Regex's. 

However, how would I pass the string value returned by my yylex() to Marpa 
parser?

Could someone please share a simple, "hello world" type of example, or if 
not that, at least some pseudocode?


On Thursday, October 13, 2016 at 10:03:41 PM UTC+5:30, Jeffrey Kegler wrote:
>
> 4.) Not sure this answers your question, but L0 rules allow full Marpa 
> syntax.
>
 
May I ask, why the full Perl Regex syntax is not supported in L0 rules? If 
it were supported, I could've read a Java multi-line comment simply with 
just this one-liner:
MultilineComment ~ ('/*' .*? '*/')   # parentheses being optional


Regards,
/Harry


-- 
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 marpa-parser+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to