October 2012 Archives

A Marpa DSL tutorial: Error reporting made easy

[ This is cross-posted from the new home of the Ocean of Awareness blog. ]

Using Marpa's facilities for error reporting, a quickly written domain-specific language can, as of its first draft, have error reporting whose helpfulness and precision exceeds that of carefully hand-crafted production compilers. This post will show how, with an example.

Two techniques will be used. First and most basic, Marpa's knowledge of the po…

Configuring the Ruby Slippers for HTML

[ This is cross-posted from the new home of the Ocean of Awareness blog. ]

This post is part of a series describing Marpa::R2::HTML, a configurable HTML parser. The last two posts described how to change the context and contents of the HTML elements, both new an…

A configurable HTML parser, part 2

[ I have succumbed to the sirens of static blogging. new home of the Ocean of Awareness blog. ]

My last post introduced Marpa::R2::HTML, a configurable HTML parser. By editing a configuration file, the user can change the variant of HTML being parsed. The changes allowed…

A Configurable HTML Parser

[ This is cross-posted from the new home of the Ocean of Awareness blog. ]

This post introduces an HTML parser which is both liberal and configurable. Currently available as a part of a Marpa::R2 developer's release on CPAN, the new Marpa::R2::HTML allows detailed configuration of new tags and respecification of the behavior of existing tags.

To show how a configurable HTML parser works, …

About Jeffrey Kegler

user-pic I blog about Perl, with a focus on parsing and Marpa, my parsing algorithm based on Jay Earley's.