Re: Command line parsing with genparse

2007-12-27 Thread Alfred M. Szmidt
FWIW, GNU tar uses argp for parsing arguments. ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils

Re: Command line parsing with genparse

2007-12-26 Thread Michael Geng
On Tue, Dec 25, 2007 at 05:16:42PM +0100, Jim Meyering wrote: > [EMAIL PROTECTED] (Michael Geng) wrote: > > I added a new patch which shows how to use genparse for generating the > > command > > line parsing code for the tail, ls and wc commands. > > Thanks for persevering. > I've begun taking a

Re: Command line parsing with genparse

2007-12-25 Thread Jim Meyering
[EMAIL PROTECTED] (Michael Geng) wrote: > I added a new patch which shows how to use genparse for generating the command > line parsing code for the tail, ls and wc commands. Thanks for persevering. I've begun taking a look at using genparse again, now that you've addressed many of our concerns.

Re: Command line parsing with genparse

2007-12-25 Thread Michael Geng
On Wed, Dec 19, 2007 at 06:55:56PM +0100, Alfred M. Szmidt wrote: >> Debarshi Ray <[EMAIL PROTECTED]> converted a bunch of tools in >> inetutils (http://www.gnu.org/s/inetutils/, >> http://sv.gnu.org/p/inetutils/) to use argp instead of >> getopt/getopt_long. Some which have quite

Re: Command line parsing with genparse

2007-12-19 Thread Alfred M. Szmidt
> Debarshi Ray <[EMAIL PROTECTED]> converted a bunch of tools in > inetutils (http://www.gnu.org/s/inetutils/, > http://sv.gnu.org/p/inetutils/) to use argp instead of > getopt/getopt_long. Some which have quite hairy parsing > semantics, for example ping which uses children parsers

Re: Command line parsing with genparse

2007-12-19 Thread Michael Geng
On Wed, Dec 19, 2007 at 06:11:25PM +0100, Alfred M. Szmidt wrote: >1. It does a significant part of the work at compile time. So the > generated code can be quite simple and fast. > > I cannot comment which is simpler, since I do not know genparse. But > parsing arguments isn't a speed

Re: Command line parsing with genparse

2007-12-19 Thread Alfred M. Szmidt
Please ignore this message, I sent it a bit early. The correct one is the one with message ID: [EMAIL PROTECTED] ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils

Re: Command line parsing with genparse

2007-12-19 Thread Alfred M. Szmidt
1. It does a significant part of the work at compile time. So the generated code can be quite simple and fast. It is parsing arguments, it doesn't need to be super fast. As for simplicity, having used argp for alot of things, I all I know is that getopt/getopt_long are a pain. 2. It

Re: Command line parsing with genparse

2007-12-19 Thread Alfred M. Szmidt
1. It does a significant part of the work at compile time. So the generated code can be quite simple and fast. I cannot comment which is simpler, since I do not know genparse. But parsing arguments isn't a speed critical task. argp is a wrapper around getopt and getopt_long, and uses th

Re: Command line parsing with genparse

2007-12-18 Thread Michael Geng
On Tue, Dec 18, 2007 at 10:12:41PM +0100, Alfred M. Szmidt wrote: > You might be interested in argp (part of glibc and gnulib) which does > more or less what you wish to achive, without the need for initial > parsing. I see 2 main advantages of genparse: 1. It does a significant part of the work

Re: Command line parsing with genparse

2007-12-18 Thread Alfred M. Szmidt
You might be interested in argp (part of glibc and gnulib) which does more or less what you wish to achive, without the need for initial parsing. ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils

Re: Simplifying command line parsing with Genparse

2007-06-23 Thread Michael Geng
On Sat, Jun 16, 2007 at 07:23:09PM +0200, Michael Geng wrote: > On Thu, Jun 07, 2007 at 02:44:38PM +0200, Jim Meyering wrote: > > However, before I even consider it seriously, it'll need > > some improvements: > > > > - it must detect any and all write failures[*] > > I just added a new release

Re: Simplifying command line parsing with Genparse

2007-06-17 Thread Michael Geng
On Thu, Jun 07, 2007 at 02:44:38PM +0200, Jim Meyering wrote: > However, before I even consider it seriously, it'll need > some improvements: > > - it must detect any and all write failures[*] I just added a new release of genparse (http://sourceforge.net/project/showfiles.php?group_id=4341&pa

Re: Simplifying command line parsing with Genparse

2007-06-08 Thread Bob Proulx
Michael Geng wrote: > I could imagine that especially for the Coreutils speed might be more a > concern than for other tools because some of the Coreutils tools are > called very often. I would expect that the time loading the executable would swamp any possible option processing. This is really

Re: Simplifying command line parsing with Genparse

2007-06-08 Thread Michael Geng
On Thu, Jun 07, 2007 at 03:49:53PM -0600, Bob Proulx wrote: > Michael Geng wrote: > > I would expect Genparse to generate faster code than argp because it does > > part of the work at compile time while argp does everything at run time > > since it's a library function. > > Is the performance of

Re: Simplifying command line parsing with Genparse

2007-06-07 Thread Bob Proulx
Michael Geng wrote: > I would expect Genparse to generate faster code than argp because it does > part of the work at compile time while argp does everything at run time > since it's a library function. Is the performance of parsing program arguments really a concern? I would think that the diff

Re: Simplifying command line parsing with Genparse

2007-06-07 Thread Michael Geng
On Thu, Jun 07, 2007 at 03:04:33PM +0200, Andreas Schwab wrote: > Jim Meyering <[EMAIL PROTECTED]> writes: > > > Genparse looks promising. > > I like the examples. But there are almost 100 programs in the > > coreutils. If genparse can really handle all of those use cases > > without causing any

Re: Simplifying command line parsing with Genparse

2007-06-07 Thread Michael Geng
On Thu, Jun 07, 2007 at 02:44:38PM +0200, Jim Meyering wrote: > [EMAIL PROTECTED] (Michael Geng) wrote: > > 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 s

Re: Simplifying command line parsing with Genparse

2007-06-07 Thread Jim Meyering
Andreas Schwab <[EMAIL PROTECTED]> wrote: > Jim Meyering <[EMAIL PROTECTED]> writes: > >> Genparse looks promising. >> I like the examples. But there are almost 100 programs in the >> coreutils. If genparse can really handle all of those use cases >> without causing any significant degradation in

Re: Simplifying command line parsing with Genparse

2007-06-07 Thread Andreas Schwab
Jim Meyering <[EMAIL PROTECTED]> writes: > Genparse looks promising. > I like the examples. But there are almost 100 programs in the > coreutils. If genparse can really handle all of those use cases > without causing any significant degradation in the tools, then > it will be hard to object. Th

Re: Simplifying command line parsing with Genparse

2007-06-07 Thread Jim Meyering
[EMAIL PROTECTED] (Michael Geng) wrote: > 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 (s

Simplifying command line parsing with Genparse

2007-06-07 Thread Michael Geng
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/example