slc: correct 'min_args' and 'max_args' processing
commit70ccb84e36ef7e95b92b5e855e8c3012e69b115e
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:57:01 +0000 (27 19:57 -0400)
treea51bbdb272caf6ee047e0c36cc93ce887ceafc2f
parent02ce61d9f04e6d725504c309ac4539021b8d71da
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