Parsing Archives

Binary parsing with Marpa: .class files

A Marpa/Moops powered M4 implementation



The M4 language is a powerful macro processor, turing complete as well as a practical programming language. It is the core tool behind GNU Autoconf, in particular.


A tour on perl-5.18.1 with c2ast, Marpa-powered C parser

The section on reserved names in GCC documentation gives several recommendations that probably the vast majority of C programs in the world do not follow.

Nevertheless, these are all good practices, and an interesting exercice was to check how the latest stable perl source code behaves v.s. these recommendations. As of the day writing this blog entry, this is perl-5.18.1.

The analysis has been done using tool, from /users/jean-damien_durand/parsing/index.html

Marpa version of Perl6 Advent Calendar, Day 18

The Perl 6 Advent Calendar, Day 18, in addition to show perl6's builtin grammar facility, was adressing a fundamental aspect of text processing, i.e. native unicode support in a grammar.

Indeed, if we say text processing, we say also characters-oriented framework. The perl6 example was the occasion to test Marpa::R2, and produce a tiny tutorial with it.

A card is a face followed immediately by a suit.

Perl6's def…

Transpiling JavaScript with Marpa

In order to transpile JavaScript to (any language but first) perl(5), I wanted to have a generic methodology, independent of the target language. The proof of concept being the default transpiling of JavaScript to JavaScript.

Marpa::R2, came again to the rescue: Marpa allows the programmer to have introspection on the grammar. This mean that one can:

(my) Marpa Best Practices

Marpa is a great, really great, piece of software that deserve to be used by everybody wanting to do serious (let's say frankly: professional) and innovative parsing. I feel that Perl language is very lucky to to have been choosen by its author, Jeffrey Kegler, as the main frontend. But seriously, this is the only module that is a true BNF parser. All others modules on CPAN that contain the BNF keyword are not. Marpa brings innovative and on-the-edge ways of…

About Jean-Damien Durand

user-pic About::Me::And::Perl