Recently I got an assignment to parse a few files in a format called BAI (Bank Administration Institute), convert them to spreadsheets, and construct elaborate formulas against them.

CPAN to the rescue, of course! Spreadsheet::WriteExcel, Parse::RecDescent, Data::Dumper, and a myriad of other modules made this job a 12-hour job rather than a 100-hour job.

The first task was to learn the BAI format, then write a grammar for it. This is where I spent most of my time. Now that the grammar is good and only needs to be maintained when certain transaction codes change, I want to give this grammar to CPAN so that nobody else will need to go through what I went through.

The problem is that I don't think this needs to be a module, not even a script. All it needs is two text files (one for the grammar and one for the transaction codes), and some perldoc.

Do I need to go through writing a module? I don't mind doing it, it just seems unnecessary. It seems to me that it code that wraps this grammar will be the same code that wraps just about any other grammar that fits into this category (e.g. something that's been around for years, doesn't look like it will change soon, etc.).

A possible solution? How about if we were to create one module in CPAN that houses separate grammars for the various industry-standard file formats for, well, whatever industry you need?

The grammars should themselves follow some kind of standard (e.g. within one grammar, there can be any number of text files, each of which contributes to either a) rules definitions, or b) support data, thorough documentation should be supplied, etc.)

I've got plenty more ideas on this, but I wanted to throw it out there just so I can work on a Grammars::Standard module instead of a BAI::Format module.

Thoughts?

MM


In reply to Repository of Parse::RecDescent grammars? by Maestro_007

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.