diff options
| author | Peter Maydell | 2018-09-25 13:29:14 +0200 |
|---|---|---|
| committer | Peter Maydell | 2018-09-25 13:29:14 +0200 |
| commit | f69d20fa8badbd6b515cc3d9e0a95b36f0410a46 (patch) | |
| tree | b6e37a862c8603fbf3f4d3b66fac27417a35d7d5 /qobject/json-parser-int.h | |
| parent | Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-09-24' into... (diff) | |
| parent | json: Eliminate lexer state IN_WHITESPACE, pseudo-token JSON_SKIP (diff) | |
| download | qemu-f69d20fa8badbd6b515cc3d9e0a95b36f0410a46.tar.gz qemu-f69d20fa8badbd6b515cc3d9e0a95b36f0410a46.tar.xz qemu-f69d20fa8badbd6b515cc3d9e0a95b36f0410a46.zip | |
Merge remote-tracking branch 'remotes/armbru/tags/pull-qobject-2018-09-24' into staging
QObject patches for 2018-09-24
# gpg: Signature made Mon 24 Sep 2018 17:09:58 BST
# gpg: using RSA key 3870B400EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-qobject-2018-09-24:
json: Eliminate lexer state IN_WHITESPACE, pseudo-token JSON_SKIP
json: Eliminate lexer state IN_ERROR
json: Nicer recovery from lexical errors
json: Make lexer's "character consumed" logic less confusing
json: Clean up how lexer consumes "end of input"
json: Fix lexer for lookahead character beyond '\x7F'
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qobject/json-parser-int.h')
| -rw-r--r-- | qobject/json-parser-int.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/qobject/json-parser-int.h b/qobject/json-parser-int.h index ceaa890ec6..16a25d00bb 100644 --- a/qobject/json-parser-int.h +++ b/qobject/json-parser-int.h @@ -16,10 +16,11 @@ #include "qapi/qmp/json-parser.h" - typedef enum json_token_type { - JSON_MIN = 100, - JSON_LCURLY = JSON_MIN, + JSON_ERROR = 0, /* must be zero, see json_lexer[] */ + /* Gap for lexer states */ + JSON_LCURLY = 100, + JSON_MIN = JSON_LCURLY, JSON_RCURLY, JSON_LSQUARE, JSON_RSQUARE, @@ -30,9 +31,8 @@ typedef enum json_token_type { JSON_KEYWORD, JSON_STRING, JSON_INTERP, - JSON_SKIP, - JSON_ERROR, JSON_END_OF_INPUT, + JSON_MAX = JSON_END_OF_INPUT } JSONTokenType; typedef struct JSONToken JSONToken; |
