From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1iCO-000439-Oi for qemu-devel@nongnu.org; Wed, 25 Nov 2015 17:06:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1iCL-0004Rn-I7 for qemu-devel@nongnu.org; Wed, 25 Nov 2015 17:06:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1iCL-0004Rh-Ci for qemu-devel@nongnu.org; Wed, 25 Nov 2015 17:05:57 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id ECA3768E03 for ; Wed, 25 Nov 2015 22:05:56 +0000 (UTC) References: <1448486613-17634-1-git-send-email-armbru@redhat.com> <1448486613-17634-6-git-send-email-armbru@redhat.com> From: Eric Blake Message-ID: <565630C3.3040106@redhat.com> Date: Wed, 25 Nov 2015 15:05:55 -0700 MIME-Version: 1.0 In-Reply-To: <1448486613-17634-6-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4UjibJKDCcbqxha9CT35pd4ff04SGhcs7" Subject: Re: [Qemu-devel] [PATCH v3 for-2.5 05/12] qjson: Give each of the six structural chars its own token type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: pbonzini@redhat.com, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4UjibJKDCcbqxha9CT35pd4ff04SGhcs7 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/25/2015 02:23 PM, Markus Armbruster wrote: > Simplifies things, because we always check for a specific one. >=20 > Signed-off-by: Markus Armbruster > --- > include/qapi/qmp/json-lexer.h | 7 ++++++- > qobject/json-lexer.c | 19 ++++++++++++------- > qobject/json-parser.c | 31 +++++++++---------------------- > qobject/json-streamer.c | 32 +++++++++++++++----------------- > 4 files changed, 42 insertions(+), 47 deletions(-) Diffstat shows that it is already a win, even if slight; the real win is that later patches are easier :) >=20 > diff --git a/include/qapi/qmp/json-lexer.h b/include/qapi/qmp/json-lexe= r.h > index 61a143f..f3e8dc7 100644 > --- a/include/qapi/qmp/json-lexer.h > +++ b/include/qapi/qmp/json-lexer.h > @@ -19,7 +19,12 @@ > =20 > typedef enum json_token_type { > JSON_MIN =3D 100, > - JSON_OPERATOR =3D JSON_MIN, > + JSON_LCURLY =3D JSON_MIN, > + JSON_RCURLY, > + JSON_LSQUARE, > + JSON_RSQUARE, I might have used LBRACE and LBRACKET - but I also acknowledge that UK spellers think of '()' for 'bracket'. Your naming is fine (unless you really want that bikeshed to be chartreuse). Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --4UjibJKDCcbqxha9CT35pd4ff04SGhcs7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWVjDDAAoJEKeha0olJ0NqJpUIAIXs9feKgf7OPRT0Npt4d+hP +VDJqzvHuzzFn+6qX8Sx1AAc2T6V/s3qNfD5KNb75z+BDIf93vJ1OvpHcaavz9+8 5ea3iTXsEhZjuasNkhJe1o2pUzWCvXbRu9LCxTvhOlO1TDlrQrjXnyh2r2W/FiwX A6U81ZWsUC+h59CVZ8U+98uNqgoyVPHS095xpx6SATtfQWHRdEgXKzWuiwPAPHjq bU0Uibu9gJeZpZYwGlyr7bN++/PbZmofNuwurEdago2cq48h6ywvFdn8siQgGnjC kwXAcVuP4xEgv1ZfkOh2UMyOP92/Yl/2oEST3BuL5oOuDvCn1QSmGc24zP6w38E= =g/k2 -----END PGP SIGNATURE----- --4UjibJKDCcbqxha9CT35pd4ff04SGhcs7--