|Problems? Is your data what you think it is?|
Repository of Parse::RecDescent grammars?by Maestro_007 (Hermit)
|on Aug 07, 2002 at 14:50 UTC||Need Help??|
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.