From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=45499 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OF7dw-0003MC-Am for qemu-devel@nongnu.org; Thu, 20 May 2010 11:26:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OF7di-0004gz-Is for qemu-devel@nongnu.org; Thu, 20 May 2010 11:26:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23609) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OF7di-0004gp-A3 for qemu-devel@nongnu.org; Thu, 20 May 2010 11:26:26 -0400 Date: Thu, 20 May 2010 12:26:19 -0300 From: Luiz Capitulino Message-ID: <20100520122619.245f501b@redhat.com> In-Reply-To: <4BF552BF.6020601@redhat.com> References: <1274303733-3700-1-git-send-email-lcapitulino@redhat.com> <4BF45B6C.8000908@codemonkey.ws> <4BF552BF.6020601@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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: Paolo Bonzini Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org On Thu, 20 May 2010 17:18:23 +0200 Paolo Bonzini wrote: > 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. Good point.