[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Simplifying command line parsing with Genparse
From: |
Michael Geng |
Subject: |
Simplifying command line parsing with Genparse |
Date: |
Thu, 7 Jun 2007 11:57:50 +0200 |
User-agent: |
Mutt/1.5.9i |
Hi,
would it be an option to use Genparse (http://genparse.sourceforge.net/)
for command line parsing in the GNU Coreutils?
I'm one of the developers of Genparse and I recently used some of the
well known Coreutils as an exercise for testing Genparse (see
http://genparse.sourceforge.net/examples.html). Using Genparse for
generating the command line parsing code could reduce the amount of
coreutils source code because the input to Genparse is a short config
file only. The overhead of writing the parser code would be delegated
to the tool then.
The Genparse generated parsers call getopt() (or getopt_long()) exactly
the same way the Coreutils's command line parsers do it today. This
wouldn't be changed. So the code Genparse generates will be very similar
to the existing hand written parsers of the individual Coreutils tools.
But calling getopt() is only part of the work, preparing and evaluating
the results of getopt() also causes coding work which could be delegated
to Genparse. Genparse also automatically generates a help screen which
would no longer have to be done manually.
Michael
- Simplifying command line parsing with Genparse,
Michael Geng <=
- Re: Simplifying command line parsing with Genparse, Jim Meyering, 2007/06/07
- Re: Simplifying command line parsing with Genparse, Andreas Schwab, 2007/06/07
- Re: Simplifying command line parsing with Genparse, Jim Meyering, 2007/06/07
- Re: Simplifying command line parsing with Genparse, Michael Geng, 2007/06/07
- Re: Simplifying command line parsing with Genparse, Bob Proulx, 2007/06/07
- Re: Simplifying command line parsing with Genparse, Michael Geng, 2007/06/08
- Re: Simplifying command line parsing with Genparse, Bob Proulx, 2007/06/08
Re: Simplifying command line parsing with Genparse, Michael Geng, 2007/06/07
Re: Simplifying command line parsing with Genparse, Michael Geng, 2007/06/17