Eric Blake <ebl...@redhat.com> 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[].