MarpaX::Languages::M4

18 views
Skip to first unread message

Durand Jean-Damien

unread,
Feb 22, 2015, 11:44:59 AM2/22/15
to marpa-...@googlegroups.com
FYI

There a new module coming into CPAN, the M4 pre-processor. The current version is 0.001-TRIAL, time to check current status and fix latest gotchas.


What is interesting in this module is:
  • Moops oriented
  • Marpa is used to drive the context and to get parse tree values only. I mean: the SLIF interface is used only the describe the grammar and get pauses on every lexemes. That is, it has this very special recognizer instanciation:

        #
        # The stream itself is of no importance.
        # We use Marpa to drive the context, nothing more.
        # But is it NOT a hasard that I use the constant '(':
        # when doing a recursive call using
        # the macroByarguments grammar, Marpa will expect this
        # character at the first read, EVEN
        # if we paused before it.
        #
        $r->read( \'(' );


I'll blog on it also / JD.

Durand Jean-Damien

unread,
Feb 22, 2015, 11:48:47 AM2/22/15
to marpa-...@googlegroups.com

Zakariyya Mughal

unread,
Feb 22, 2015, 11:50:22 AM2/22/15
to marpa-...@googlegroups.com
On 2015-02-22 at 08:44:59 -0800, Durand Jean-Damien wrote:
> FYI
>
> There a new module coming into CPAN, the M4 pre-processor. The current
> version is 0.001-TRIAL, time to check current status and fix latest gotchas.

Wow, that's awesome!

>
> More on my G+
> page: https://plus.google.com/105243759955561553019/posts/9mxZnV1Vwws
>
> What is interesting in this module is:
>
> - Moops oriented
> - Marpa is used to drive the context and to get parse tree values only.
> I mean: the SLIF interface is used only the describe the grammar and get
> pauses on every lexemes. That is, it has this very special recognizer
> instanciation:
>
>
> #
> # The stream itself is of no importance.
> # We use Marpa to drive the context, nothing more.
> # But is it NOT a hasard that I use the constant '(':
> # when doing a recursive call using
> # the macroByarguments grammar, Marpa will expect this
> # character at the first read, EVEN
> # if we paused before it.
> #
> $r->read( \'(' );
>
>
> I'll blog on it also / JD.

Oh, this technique looks interesting. I'll have to read the code and
blog later.

Cheers,
- Zaki Mughal

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

Reply all
Reply to author
Forward
0 new messages