[GRASS-dev] significant change in g.parser behavior for GRASS 7

Michael Barton Michael.Barton at asu.edu
Sat Sep 27 08:16:23 PDT 2014


Thanks Glynn

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity 
Professor of Anthropology, School of Human Evolution & Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University

voice:  480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC),  480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu















On Sep 26, 2014, at 7:29 PM, Glynn Clements <glynn at gclements.plus.com> wrote:

> 
> Michael Barton wrote:
> 
>> At the very least, the error generated needs to be something along
>> the lines of “upper case characters are not allowed for option names
>> in GRASS modules”
> 
> Right.
> 
> The current behaviour is a side-effect of the argument simply not
> being considered as an option if the LHS of the = doesn't comply with
> the requirements for option names.
> 
> Currently, the parser code doesn't perform any validation on the
> options defined by the program. It attempts to detect run-time errors
> arising from the user supplying invalid arguments; it doesn't attempt
> to detect programming errors such as using an invalid name for an
> option.
> 
> This wouldn't be particularly hard to do. Before processing argv[],
> G_parser() already iterates over the defined options to synchronise
> the string and list-of-strings forms of the options, descriptions and
> answers fields.
> 
> I'll add a check for invalid option names to that code.
> 
> -- 
> Glynn Clements <glynn at gclements.plus.com>



More information about the grass-dev mailing list