From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55172 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OF7WX-0007to-DT for qemu-devel@nongnu.org; Thu, 20 May 2010 11:19:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OF7W5-0003Pr-U2 for qemu-devel@nongnu.org; Thu, 20 May 2010 11:18:42 -0400 Received: from mail-ww0-f45.google.com ([74.125.82.45]:61068) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OF7Vz-0003P1-Od for qemu-devel@nongnu.org; Thu, 20 May 2010 11:18:31 -0400 Received: by wwd20 with SMTP id 20so294013wwd.4 for ; Thu, 20 May 2010 08:18:27 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4BF552BF.6020601@redhat.com> Date: Thu, 20 May 2010 17:18:23 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1274303733-3700-1-git-send-email-lcapitulino@redhat.com> <4BF45B6C.8000908@codemonkey.ws> In-Reply-To: <4BF45B6C.8000908@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 0/6]: QMP: Fix issues in parser/lexer List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, Luiz Capitulino On 05/19/2010 11:43 PM, Anthony Liguori wrote: > >> 4. Lexer expects a 'terminal' char to process a token >> >> Which means clients must send a sort of end of line char, so that we >> process their input. >> >> Maybe I'm missing something here, but I thought that the whole >> point of writing our own parser was to avoid this. > > If the lexer gets: > > "abc" > > It has no way of knowing if that's a token or if we're going to get: > > "abcd" Only } and ] are valid characters at the end of a JSON object, and neither requires lookahead. Paolo