slc: correct 'min_args' and 'max_args' processing
commitc3f6a65da29adfa4e2b6e8cb59d9a479207488f7
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 27 Jul 2011 21:33:51 +0000 (27 17:33 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 27 Jul 2011 23:55:28 +0000 (27 19:55 -0400)
treeb8bae630a83042cb578ccb28b678cda24790cfb6
parent5fc3d6fffabe1b48626d73cae23ceb8a2a8d2e6e
slc: correct 'min_args' and 'max_args' processing

The 'min_args' and 'max_args' values were ignored whenever
an 'argument' value was not present as a child of the 'command'.
'argument' values are often specified as children of the 'option'
value when more than one 'option' is an argument.

This patchset counts the number of 'argument' values specified
under a 'command' regardless of the level at which it appears.
If there are any 'argument' values, the 'min_args' and 'max_args'
are used to generate validation code for the 'command'.

Change-Id: Idc6129b4ff29914ac990f693b4dba51a30bdc971
lib/sl/slc-gram.y