|
From: Mikoláš J. <mik...@gm...> - 2009-08-12 14:14:58
|
On Wed, Aug 12, 2009 at 12:56 PM, Radu Grigore<rad...@gm...> wrote: > On Tue, Aug 11, 2009 at 10:06 PM, Mikoláš > Janota<mik...@gm...> wrote: >> How's this different from >> head -nBAZOOM, ie the arg is there but it's not a digit? > > You get a different error message (unless there's a default value set). > I don't understand. I was saying that both -nBAZOOM and -n"" are bad arguments. We might decide to print something else than "". We could say something like "empty argument is not valid for -n" when we get "" instead of "BAZOOM" In other words, !blankparamallowed can be derived from the fact that the option matched, didn't parse, and the string corresponding to the argument is empty. --m >> As Fint noted, in infinite lookahead this is more trouble. > > The check should be moved out of process(), yes. In general, process() > needs to be deprecated if we want to be able to keep the parsers in > sync. > -- Mikoláš Janota M. Sc. School of Computer Science and Informatics, University College Dublin, Belfield, Dublin 4, Ireland |