Here's a tutorial for small example of external lexing aka procedural
On Sat, Oct 15, 2016 at 4:12 AM, Harry <simonsha...@gmail.com> wrote:
> 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
> 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
>> 4.) Not sure this answers your question, but L0 rules allow full Marpa
> 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
> 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.
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
For more options, visit https://groups.google.com/d/optout.