40p: use OR gate to wire up raven PCI interrupts
[qemu.git] / qobject / json-parser-int.h
blobceaa890ec6ab4e490feb9783439dbeeaee2bb5be
1 /*
2 * JSON Parser
4 * Copyright IBM, Corp. 2009
6 * Authors:
7 * Anthony Liguori <aliguori@us.ibm.com>
9 * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
10 * See the COPYING.LIB file in the top-level directory.
14 #ifndef JSON_PARSER_INT_H
15 #define JSON_PARSER_INT_H
17 #include "qapi/qmp/json-parser.h"
20 typedef enum json_token_type {
21 JSON_MIN = 100,
22 JSON_LCURLY = JSON_MIN,
23 JSON_RCURLY,
24 JSON_LSQUARE,
25 JSON_RSQUARE,
26 JSON_COLON,
27 JSON_COMMA,
28 JSON_INTEGER,
29 JSON_FLOAT,
30 JSON_KEYWORD,
31 JSON_STRING,
32 JSON_INTERP,
33 JSON_SKIP,
34 JSON_ERROR,
35 JSON_END_OF_INPUT,
36 } JSONTokenType;
38 typedef struct JSONToken JSONToken;
40 /* json-lexer.c */
41 void json_lexer_init(JSONLexer *lexer, bool enable_interpolation);
42 void json_lexer_feed(JSONLexer *lexer, const char *buffer, size_t size);
43 void json_lexer_flush(JSONLexer *lexer);
44 void json_lexer_destroy(JSONLexer *lexer);
46 /* json-streamer.c */
47 void json_message_process_token(JSONLexer *lexer, GString *input,
48 JSONTokenType type, int x, int y);
50 /* json-parser.c */
51 JSONToken *json_token(JSONTokenType type, int x, int y, GString *tokstr);
52 QObject *json_parser_parse(GQueue *tokens, va_list *ap, Error **errp);
54 #endif