[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts |
Date: |
Mon, 23 Nov 2015 13:05:04 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 11/23/2015 10:59 AM, Laszlo Ersek wrote:
> On 11/23/15 18:44, Paolo Bonzini wrote:
>> JSON is LL(1) and our parser indeed needs only 1 token lookahead.
>> Saving the parser context is mostly unnecessary; we can replace it
>> with peeking at the next token, or remove it altogether when the
>> restore only happens on errors. The token list is destroyed anyway
>> on errors.
>>
>> The only interesting thing is that parse_keyword always eats
>> a TOKEN_KEYWORD, even if it is invalid, so it must come last in
>> parse_value (otherwise, NULL is returned, parse_literal is invoked
>> and it tries to peek beyond end of input). This is caught by
>> /errors/unterminated/literal, which actually checks for an unterminated
>> keyword. ಠ_ಠ
>
> Is it accepted practice to put UTF-8 in commit messages? (Or, actually,
> anywhere in patches, except maybe the notes section?)
>
Git handles UTF-8 just fine (and for any other encoding, properly
transmitted in the email, git transcodes to UTF-8 before writing it into
the repository).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v2 for-2.5? 0/4] qjson: save a lot of memory, Paolo Bonzini, 2015/11/23
- [Qemu-devel] [PATCH v2 1/4] qjson: replace QString in JSONLexer with GString, Paolo Bonzini, 2015/11/23
- [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts, Paolo Bonzini, 2015/11/23
- Re: [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts, Gerd Hoffmann, 2015/11/24
- Re: [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts, Laszlo Ersek, 2015/11/24
- Re: [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts, Paolo Bonzini, 2015/11/24
- Re: [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts, Fam Zheng, 2015/11/24
- Re: [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts, Paolo Bonzini, 2015/11/24
- Re: [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts, Markus Armbruster, 2015/11/24
- Re: [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts, Gerd Hoffmann, 2015/11/24
- Re: [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts, Laszlo Ersek, 2015/11/24
Re: [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts, Markus Armbruster, 2015/11/25