Searched hist:"1 e960b46024d468e76d2f42ddcfa5a9d521db492" (Results 1 – 2 of 2) sorted by relevance
/openbmc/qemu/qobject/ |
H A D | json-parser-int.h | diff 1e960b46024d468e76d2f42ddcfa5a9d521db492 Fri Aug 31 02:58:41 CDT 2018 Markus Armbruster <armbru@redhat.com> json: Eliminate lexer state IN_WHITESPACE, pseudo-token JSON_SKIP
The lexer ignores whitespace like this:
on whitespace on non-ws spontaneously IN_START --> IN_WHITESPACE --> JSON_SKIP --> IN_START ^ | \__/ on whitespace
This accumulates a whitespace token in state IN_WHITESPACE, only to throw it away on the transition via JSON_SKIP to the start state. Wasteful. Go from IN_START to IN_START on whitespace directly, dropping the whitespace character.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180831075841.13363-7-armbru@redhat.com>
|
H A D | json-lexer.c | diff 1e960b46024d468e76d2f42ddcfa5a9d521db492 Fri Aug 31 02:58:41 CDT 2018 Markus Armbruster <armbru@redhat.com> json: Eliminate lexer state IN_WHITESPACE, pseudo-token JSON_SKIP
The lexer ignores whitespace like this:
on whitespace on non-ws spontaneously IN_START --> IN_WHITESPACE --> JSON_SKIP --> IN_START ^ | \__/ on whitespace
This accumulates a whitespace token in state IN_WHITESPACE, only to throw it away on the transition via JSON_SKIP to the start state. Wasteful. Go from IN_START to IN_START on whitespace directly, dropping the whitespace character.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180831075841.13363-7-armbru@redhat.com>
|