[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Argument parser
From: |
Marco Gerards |
Subject: |
Re: Argument parser |
Date: |
17 Dec 2003 19:00:49 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
"Yoshinori K. Okuji" <address@hidden> writes:
> On Tuesday 16 December 2003 19:10, Marco Gerards wrote:
> > One thing that will remain is the structure that describes the
> > arguments, this will still look like this example:
> [snipped]
> > I believe the parser will be easy to use this way. It still can be
> > full featured and GNU compatible (which is, as you might have
> > noticed, important to me). Do you like this approach better? If you
> > can find any other problems I can fix it. When we agree about the
> > parser I will implement it.
>
> Yes, it's very nice. One possible problem would be how to deal with
> multiple instances of the same option, like:
>
> diff -x CVS -x '*~' foo bar
>
> Normally, most commands assume that only the last specified option is
> significant, so it might not be necessary to worry about this problem.
Oops. I knew about this problem but I forgot to tell you about this.
The parser I proposed before didn't have this problem. By not adding
support for multiple instances of the same option the parser will be a
lot simpler to use.
However, I can add support for the parser function I proposed before
that can optionally be used to parse the arguments in this situation.
I see no use for supporting this so I won't do this unless you ask for
it.
[...]
> Basically, POSIX mode stops parsing options as soon as encountering a
> non-option argument, while GNU does not stop. If you want more info, I
> can consult my copy of the POSIX document, or you can look at susv2 on
> the web.
Ok. I see no reason in supporting the POSIX way only in PUPA.
I assume what I proposed is ok and I will start implementing this
soon.
Thanks,
Marco
- Re: Argument parser, (continued)
- Re: Argument parser, Yoshinori K. Okuji, 2003/12/13
- Re: Argument parser, Marco Gerards, 2003/12/13
- Re: Argument parser, Yoshinori K. Okuji, 2003/12/15
- Re: Argument parser, Marco Gerards, 2003/12/15
- Re: Argument parser, Yoshinori K. Okuji, 2003/12/15
- Re: Argument parser, Marco Gerards, 2003/12/15
- Re: Argument parser, Yoshinori K. Okuji, 2003/12/15
- Re: Argument parser, Marco Gerards, 2003/12/16
- Re: Argument parser, Yoshinori K. Okuji, 2003/12/17
- Re: Argument parser, Johan Rydberg, 2003/12/17
- Re: Argument parser,
Marco Gerards <=