I can think of few things more tedious than writing the same types of program over and over again. (Apparently, the folks at the CPAN agree with me, judging by the presence of Text::Template, Makemaker, and Class::Struct).

The Jellybean project is currently faced with the task of developing yet another markup language or two to make access to internal objects and methods easier for the average user. As we'd already dealt with installers, state-saving and restoring mechanisms, and configuration file readers, I was not looking forward to writing (and debugging) a parser that could handle the diversity of what we need. (jlp didn't want to do it, either, so it was up to me.)

My initial research lead me to Parse::RecDescent, which held great promise. With a short amount of time spent writing a proper grammar, I could generate a module capable of parsing quite complex code. Unfortunately, the module provided is more complex than we need -- and it introduces another dependency to our little project.

I set about to writing my own parser generator. The result is Parsermaker (available here), a simple parser generator that takes a simple grammar and produces a simple parser module. It's not brilliant, it's not complicated, but it's simple to use and it's flexible. It took not quite two weeks, but it works.

Only Perl is powerful and flexible enough for me to write programs that write programs that I'd actually use.


In reply to Using Perl to Write Perl by chromatic

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.