From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40252 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFPBT-0007y5-JC for qemu-devel@nongnu.org; Fri, 21 May 2010 06:10:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OFPBR-0002YX-Vt for qemu-devel@nongnu.org; Fri, 21 May 2010 06:10:27 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:63956) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFPBR-0002YM-Pp for qemu-devel@nongnu.org; Fri, 21 May 2010 06:10:25 -0400 Received: by wye20 with SMTP id 20so555255wye.4 for ; Fri, 21 May 2010 03:10:20 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 21 May 2010 12:10:09 +0200 Message-Id: <1274436609-29066-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1274432933-15542-1-git-send-email-pbonzini@redhat.com> References: <1274432933-15542-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH] do not require lookahead for escapes too List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lcapitulino@redhat.com Signed-off-by: Paolo Bonzini --- json-lexer.c | 21 ++++++++------------- roms/seabios | 2 +- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/json-lexer.c b/json-lexer.c index b9250c1..bc9dfae 100644 --- a/json-lexer.c +++ b/json-lexer.c @@ -56,7 +56,6 @@ enum json_lexer_state { IN_ESCAPE_I, IN_ESCAPE_I6, IN_ESCAPE_I64, - IN_ESCAPE_DONE, IN_WHITESPACE, IN_START, }; @@ -208,21 +207,17 @@ static const uint8_t json_lexer[][256] = { }, /* escape */ - [IN_ESCAPE_DONE] = { - TERMINAL(JSON_ESCAPE), - }, - [IN_ESCAPE_LL] = { - ['d'] = IN_ESCAPE_DONE, + ['d'] = JSON_ESCAPE, }, [IN_ESCAPE_L] = { - ['d'] = IN_ESCAPE_DONE, + ['d'] = JSON_ESCAPE, ['l'] = IN_ESCAPE_LL, }, [IN_ESCAPE_I64] = { - ['d'] = IN_ESCAPE_DONE, + ['d'] = JSON_ESCAPE, }, [IN_ESCAPE_I6] = { @@ -234,11 +229,11 @@ static const uint8_t json_lexer[][256] = { }, [IN_ESCAPE] = { - ['d'] = IN_ESCAPE_DONE, - ['i'] = IN_ESCAPE_DONE, - ['p'] = IN_ESCAPE_DONE, - ['s'] = IN_ESCAPE_DONE, - ['f'] = IN_ESCAPE_DONE, + ['d'] = JSON_ESCAPE, + ['i'] = JSON_ESCAPE, + ['p'] = JSON_ESCAPE, + ['s'] = JSON_ESCAPE, + ['f'] = JSON_ESCAPE, ['l'] = IN_ESCAPE_L, ['I'] = IN_ESCAPE_I, }, diff --git a/roms/seabios b/roms/seabios index 7d09d0e..8f469b9 160000 --- a/roms/seabios +++ b/roms/seabios @@ -1 +1 @@ -Subproject commit 7d09d0e3ba11310e973d4302c7fcc3fc2184e04c +Subproject commit 8f469b9676127ba6bb52609d89ec774e61db0ee1 -- 1.6.6.1