From: Kirk Haines Date: 2005-08-17T06:58:55+09:00 Subject: Re: Generic Parsing Library On Tuesday 16 August 2005 3:46 pm, Adam Sanderson wrote: > I was wondering if anyone would be interested in, or knows of a generic > parsing library. I am continually faced with reading in bizarre text > files and parsing them. They tend to have regular structures though > (at the whim of researcher who made them). I'd like to write up some > sort of declarative code to parse these files. There's a lot of room > for reuse. Once upon a time, in a job far, far away, I wrote an ETL (Extract, Transform, Load) system in Perl. It had a lot of bells and whistles, but the core of it was an XML language that described data sources, transformations, and data destinations. The code was "compiled" to Perl to execute it. It was neat. Every since I started using Ruby, I've thought that it could be done better with Ruby. For starters, the whole notion of an XML language that is parsed and turned into executable code could be replaced by a domain specific language. It'd be a beautiful thing, and I bet it could be done in a LOT fewer lines than when I did it in Perl. Kirk Haines