Patchwork do not require lookahead for escapes too

login
register
mail settings
Submitter Paolo Bonzini
Date May 21, 2010, 10:10 a.m.
Message ID <1274436609-29066-1-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/53144/
State New
Headers show

Comments

Paolo Bonzini - May 21, 2010, 10:10 a.m.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 json-lexer.c |   21 ++++++++-------------
 roms/seabios |    2 +-
 2 files changed, 9 insertions(+), 14 deletions(-)
Paolo Bonzini - May 23, 2010, 7:50 a.m.
On 05/21/2010 12:10 PM, Paolo Bonzini wrote:
> 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

This was obviously not intended.

I'll send a new version tomorrow.

Paolo

Patch

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