Re: [Qemu-devel] [PATCH v5 21/28] qapi: Require valid names

2015-03-29 Thread Markus Armbruster
Markus Armbruster writes: [...] > I had a second look. I think the generator accepting '**' in exactly > the right places relies on: > > (1) check_name() accepts only proper names, not '**'. > > (2) All names get checked with check_name(). > > (3) Except check_type() accepts special type name '*

Re: [Qemu-devel] [PATCH v5 21/28] qapi: Require valid names

2015-03-29 Thread Markus Armbruster
Eric Blake writes: > On 03/27/2015 02:48 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Previous commits demonstrated that the generator overlooked various >>> bad naming situations: >>> - types, commands, and events need a valid name >>> - union and alternate branches cannot be mark

Re: [Qemu-devel] [PATCH v5 21/28] qapi: Require valid names

2015-03-29 Thread Markus Armbruster
Eric Blake writes: [...] > +valid_characters = set(string.ascii_letters + string.digits + '.' + '-' + > '_') > +def check_name(expr_info, source, name, allow_optional = False): > +membername = name > + > +if not isinstance(name, str): > +raise QAPIExprError(expr_info, > +

Re: [Qemu-devel] [PATCH v5 21/28] qapi: Require valid names

2015-03-27 Thread Eric Blake
On 03/27/2015 11:14 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Previous commits demonstrated that the generator overlooked various >> bad naming situations: >> - types, commands, and events need a valid name >> - union and alternate branches cannot be marked optional >> >> The set of

Re: [Qemu-devel] [PATCH v5 21/28] qapi: Require valid names

2015-03-27 Thread Eric Blake
On 03/27/2015 02:48 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Previous commits demonstrated that the generator overlooked various >> bad naming situations: >> - types, commands, and events need a valid name >> - union and alternate branches cannot be marked optional >> >> The set of

Re: [Qemu-devel] [PATCH v5 21/28] qapi: Require valid names

2015-03-27 Thread Markus Armbruster
Eric Blake writes: > Previous commits demonstrated that the generator overlooked various > bad naming situations: > - types, commands, and events need a valid name > - union and alternate branches cannot be marked optional > > The set of valid names includes [a-zA-Z0-9._-] (where '.' is > useful

Re: [Qemu-devel] [PATCH v5 21/28] qapi: Require valid names

2015-03-27 Thread Markus Armbruster
Eric Blake writes: > Previous commits demonstrated that the generator overlooked various > bad naming situations: > - types, commands, and events need a valid name > - union and alternate branches cannot be marked optional > > The set of valid names includes [a-zA-Z0-9._-] (where '.' is > useful

[Qemu-devel] [PATCH v5 21/28] qapi: Require valid names

2015-03-24 Thread Eric Blake
Previous commits demonstrated that the generator overlooked various bad naming situations: - types, commands, and events need a valid name - union and alternate branches cannot be marked optional The set of valid names includes [a-zA-Z0-9._-] (where '.' is useful only in downstream extensions). S