[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/6] json: Eliminate lexer state IN_ERROR
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 5/6] json: Eliminate lexer state IN_ERROR |
Date: |
Fri, 31 Aug 2018 09:08:12 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Eric Blake <address@hidden> 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 form over the other, so keeping the gap doesn't hurt.
>
> And having said that, this patch series also introduced a second gap
> for LOOKAHEAD defined at 0x80, along with assertions that it doesn't
> collide with either IN_* or JSON_*. It may be just as easy to make
> JSON_MIN start at LOOKAHEAD+1 than to assert that all of JSON_* fits
> in the space between 100 and 0x80 - 1. Although in the long run, I
> seriously doubt we'll be adding many new enum values to either the
> lexer or the parser.
LOOKAHEAD is semantically independent from the lexer state. Evidence:
we use both IN_START and IN_START | LOOKAHEAD in json_lexer[].
- Re: [Qemu-devel] [PATCH 3/6] json: Make lexer's "character consumed" logic less confusing, (continued)
[Qemu-devel] [PATCH 6/6] json: Eliminate lexer state IN_WHITESPACE, pseudo-token JSON_SKIP, Markus Armbruster, 2018/08/27