[ 
https://issues.apache.org/jira/browse/CLI-147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601491#action_12601491
 ] 

ebourg edited comment on CLI-147 at 6/1/08 12:47 PM:
-------------------------------------------------------------

Regarding the GnuParser, it processes every token as a potential option. That 
means it will split a token if it recognizes an option even if it's actually 
the mandatory argument of the previous option.

For example with the option 1 and N both having a mandatory argument, the 
following command line:

{code}-N -123{code}

will be interpreted as the option N with no argument, and the option 1 with 23 
as argument. But the right interpretation is N=-123. The token -123 has been 
processed as a potential option first before being considered as the argument 
of the previous option.

      was (Author: ebourg):
    Regarding the GnuParser, it processes every token as a potential option. 
That means it will split a token if it recognizes an option even if it's 
actually the mandatory argument of the previous option.

For example with the option 1 and N both having a mandatory argument, the 
following command line:

{code}-N -123{code}

will be interpreted as the option N with no argument, and the option 1 with 23 
as argument. But the right interpretation is N=-123. The token -123 has be 
processed as a potential option first before being considered as the argument 
of the previous option.
  
> Create page explaining which parser to use when
> -----------------------------------------------
>
>                 Key: CLI-147
>                 URL: https://issues.apache.org/jira/browse/CLI-147
>             Project: Commons CLI
>          Issue Type: Task
>          Components: Documentation
>    Affects Versions: 1.1
>            Reporter: Henri Yandell
>            Assignee: Henri Yandell
>             Fix For: 1.2
>
>
> Basically a short summary of what each parser does.
> Also put each relevant bit in the javadoc.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to