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


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to