[Edinburgh-pm] Marpa::HTML

Hakim Cassimally hakim.cassimally at gmail.com
Sun May 22 13:31:45 PDT 2011

On 21 May 2011 17:32, Miles Gould <miles at assyrian.org.uk> wrote:
> On Fri, May 20, 2011 at 12:03 PM, Hakim Cassimally
> <hakim.cassimally at gmail.com> wrote:
>> (Only tangentially related, but I finally played with Haskell's Parsec
>> and was amazed by it.  It was about as simple to declare as a
>> Parse::RecDescent parser, BUT it actually worked.)
> Weird, my experience was the opposite. Parsec's nice enough until you
> want to use a non-standard lexer, whereupon it becomes a nightmare;
> P::RD Just Worked.

I think it's mostly to do with the type-system actually.  Each parser combinator
returns a given data-type, so a) it's much clearer what you're doing,
and b) when
it compiles, it just works.

With P::RD, I'd get totally lost in how many layers of array-refs each rule had
wrapped its output in, and without a lightweight way of determining types,
everything ended up in a mess of hashrefs (my fault, I suppose, for
not declaring
OO classes for it).

That plus the whole "declare a DSL in a string" thing totally put me off PRD
(though I still think the *docs* for the module are a truly impressive piece of
technical writing).


More information about the Edinburgh-pm mailing list