Re: [Qemu-devel] [PATCH 5/6] json: Eliminate lexer state IN_ERROR

2018-08-31 Thread Markus Armbruster
Eric Blake writes: > On 08/28/2018 10:01 AM, Eric Blake wrote: >> The question remains, then, if a fixed-size gap (by making JSON_MIN >> be exactly 100) is any smarter than a contiguous layout (by making >> JSON_MIN be IN_START_INTERP + 1).  I can't see any strong reason for >> preferring one for

Re: [Qemu-devel] [PATCH 5/6] json: Eliminate lexer state IN_ERROR

2018-08-31 Thread Markus Armbruster
Eric Blake writes: > On 08/27/2018 11:40 PM, Markus Armbruster wrote: > typedef enum json_token_type { -JSON_MIN = 100, -JSON_LCURLY = JSON_MIN, +JSON_ERROR = 0, /* must be zero, see json_lexer[] */ +/* Gap for lexer states */ +JSON

Re: [Qemu-devel] [PATCH 5/6] json: Eliminate lexer state IN_ERROR

2018-08-28 Thread Eric Blake
On 08/27/2018 11:40 PM, Markus Armbruster wrote: typedef enum json_token_type { -JSON_MIN = 100, -JSON_LCURLY = JSON_MIN, +JSON_ERROR = 0, /* must be zero, see json_lexer[] */ +/* Gap for lexer states */ +JSON_LCURLY = 100, +JSON_MIN = JSON_LCURLY, In an

Re: [Qemu-devel] [PATCH 5/6] json: Eliminate lexer state IN_ERROR

2018-08-28 Thread Eric Blake
On 08/28/2018 10:01 AM, Eric Blake wrote: The question remains, then, if a fixed-size gap (by making JSON_MIN be exactly 100) is any smarter than a contiguous layout (by making JSON_MIN be IN_START_INTERP + 1).  I can't see any strong reason for preferring one form over the other, so keeping th

Re: [Qemu-devel] [PATCH 5/6] json: Eliminate lexer state IN_ERROR

2018-08-27 Thread Markus Armbruster
Eric Blake writes: > On 08/27/2018 02:00 AM, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> --- >> qobject/json-lexer.c | 9 + >> qobject/json-parser-int.h | 8 >> 2 files changed, 9 insertions(+), 8 deletions(-) > >> - >> typedef enum json_token_type

Re: [Qemu-devel] [PATCH 5/6] json: Eliminate lexer state IN_ERROR

2018-08-27 Thread Eric Blake
On 08/27/2018 02:00 AM, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- qobject/json-lexer.c | 9 + qobject/json-parser-int.h | 8 2 files changed, 9 insertions(+), 8 deletions(-) - typedef enum json_token_type { -JSON_MIN = 100, -JSON_LCURLY

Re: [Qemu-devel] [PATCH 5/6] json: Eliminate lexer state IN_ERROR

2018-08-27 Thread Eric Blake
On 08/27/2018 02:00 AM, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- qobject/json-lexer.c | 9 + qobject/json-parser-int.h | 8 2 files changed, 9 insertions(+), 8 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red H

[Qemu-devel] [PATCH 5/6] json: Eliminate lexer state IN_ERROR

2018-08-27 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qobject/json-lexer.c | 9 + qobject/json-parser-int.h | 8 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/qobject/json-lexer.c b/qobject/json-lexer.c index 39c7ce7adc..2a5561c917 100644 --- a/qobject/json-lexer.c +++ b/qob