[Top][All Lists]

[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: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 5/6] json: Eliminate lexer state IN_ERROR
Date: Tue, 28 Aug 2018 10:04:45 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

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.

Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]