From patchwork Fri May 21 10:10:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 53144 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2B0C5B7D1F for ; Fri, 21 May 2010 20:49:41 +1000 (EST) Received: from localhost ([127.0.0.1]:49428 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFPTg-0005ef-4K for incoming@patchwork.ozlabs.org; Fri, 21 May 2010 06:29:16 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=VC+B3gQHl7McahCUvjMIuNWo8E3as00BpCTiCIhubKo=; b=jKSDRgUSHcRTX5HzDX25ReD+nBPOEuVWtCR6h6rALynK0LitZpDqYTkcUgjA0HrSfM 3V16zZil+f5bNJVzid81cAdYwsH1ANZCXk+UPmtKLWbJAlY+DpNZENG0pswacRGV9u0k RK9TUZ3Ay9rmKZpopeTO9TT8Qx8RdMUnbotaY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=a+qbHz1F4LnrbHKpmJrhC24n5iO+LXA+BjWHGuFSzLibGQt5P/CpfF6TV97a9Fq5/O DJH3GOSBxDBwfW6PtTWS6W8weQoQ79Wq0Pp6xSpnwRWuORwqf7iJuPa8Lw9uQnGMUyAM 60EijZIiIVpi/FO5WrG0xnFCFORCUDEkVDRS4= Received: by 10.227.136.195 with SMTP id s3mr1184885wbt.1.1274436620004; Fri, 21 May 2010 03:10:20 -0700 (PDT) Received: from localhost.localdomain (nat-pool-brq-t.redhat.com [209.132.186.34]) by mx.google.com with ESMTPS id m5sm1795664gve.10.2010.05.21.03.10.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 21 May 2010 03:10:19 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Fri, 21 May 2010 12:10:09 +0200 Message-Id: <1274436609-29066-1-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.6.6.1 In-Reply-To: <1274432933-15542-1-git-send-email-pbonzini@redhat.com> References: <1274432933-15542-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH] do not require lookahead for escapes too X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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