Re: Adding a "plugin" parser to ifile
Dave Marquardt <[email protected]> 06 Mar 2003 15:40:12 -0600
| Newsgroups | gmane.mail.ifile.general |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 06 Mar 2003 15:36:18 -0500, Jason Rennie <[email protected]> said: Jason> [email protected] said: >> - I've been messing about with various ifile options "-h -w -k"[1] and >> I'm coming to the conclusion that it would be quite useful to >> customize the parser for ifile. While you can do this in front of >> ifile, I think as a first pass it would be convient to provide a >> "subprocess parser". Jason> Let me propose something here. How about we break ifile into Jason> two parts: the parsing/lexing part and the classifier. To run Jason> ifile, you'd give the message to the first program and pipe the Jason> output to the second program. The first program could output Jason> one token per line. Then the lexing part of the classifier Jason> would be exceedingly simple. Breaking it apart like this would Jason> make it easier for people to experiment with different parsing/ Jason> lexing styles; it would even make it possible to write Jason> prototype parsers/ lexers in perl or some language that's Jason> easier to write. Jason> Thoughts? Well, at this point, I'm cool with the way things are, so let me be the first to scream for a front-end script that maintains compatibility with current behavior. I.e. ifile would now be a shell script that defaults to ifile-lexer [lexer flags] | ifile-classifier [classifier flags] This would be useful for folks using ifile today who pick up a new version but don't want to rewrite their software to understand this new scheme. Also, if we do this, we should write a document clearly defining what is expected of a lexer and what is expected of a classifier, so BOTH of these programs can be pluggable. So if someone wants to write a different lexer, great. If they want to write a different classifier, also great. -- Dave Marquardt Round Rock, TX