37 #ifndef PARSER_HEADER_H 38 # define PARSER_HEADER_H 51 #line 25 "json_parser.yy" 54 #include "json_scanner.h" 55 #include "qjson_debug.h" 57 #include <QtCore/QByteArray> 58 #include <QtCore/QMap> 59 #include <QtCore/QString> 60 #include <QtCore/QVariant> 70 #define YYERROR_VERBOSE 1 74 #line 75 "json_parser.hh" 84 #ifdef YYERROR_VERBOSE 85 # undef YYERROR_VERBOSE 86 # define YYERROR_VERBOSE 1 88 # define YYERROR_VERBOSE 1 93 # define YYTOKEN_TABLE 0 100 #ifndef YYLLOC_DEFAULT 101 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 105 (Current).begin = (Rhs)[1].begin; \ 106 (Current).end = (Rhs)[N].end; \ 110 (Current).begin = (Current).end = (Rhs)[0].end; \ 136 CURLY_BRACKET_OPEN = 1,
137 CURLY_BRACKET_CLOSE = 2,
138 SQUARE_BRACKET_OPEN = 3,
139 SQUARE_BRACKET_CLOSE = 4,
166 virtual int parse ();
169 std::ostream& debug_stream ()
const;
171 void set_debug_stream (std::ostream &);
176 debug_level_type debug_level ()
const;
178 void set_debug_level (debug_level_type l);
184 virtual void error (
const location_type& loc,
const std::string& msg);
189 virtual std::string yysyntax_error_ (
int yystate,
int tok);
192 virtual void yy_symbol_value_print_ (
int yytype,
197 const semantic_type* yyvaluep,
198 const location_type* yylocationp);
203 virtual void yy_symbol_print_ (
int yytype,
204 const semantic_type* yyvaluep,
205 const location_type* yylocationp);
210 typedef int state_type;
212 typedef stack<state_type> state_stack_type;
214 typedef stack<semantic_type> semantic_stack_type;
216 typedef stack<location_type> location_stack_type;
219 state_stack_type yystate_stack_;
221 semantic_stack_type yysemantic_stack_;
223 location_stack_type yylocation_stack_;
226 typedef unsigned char token_number_type;
229 static const signed char yypact_[];
230 static const signed char yypact_ninf_;
235 static const unsigned char yydefact_[];
237 static const signed char yypgoto_[];
238 static const signed char yydefgoto_[];
245 static const unsigned char yytable_[];
246 static const signed char yytable_ninf_;
248 static const signed char yycheck_[];
251 static const unsigned char yystos_[];
254 static const unsigned char yyr1_[];
256 static const unsigned char yyr2_[];
258 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 259 static const char*
const yytname_[];
264 virtual std::string yytnamerr_ (
const char *n);
269 typedef signed char rhs_number_type;
272 static const rhs_number_type yyrhs_[];
274 static const unsigned char yyprhs_[];
276 static const unsigned char yyrline_[];
278 static const unsigned short int yytoken_number_[];
280 virtual void yy_reduce_print_ (
int r);
282 virtual void yystack_print_ ();
286 token_number_type yytranslate_ (
int t);
293 inline void yydestruct_ (
const char* yymsg,
295 semantic_type* yyvaluep,
296 location_type* yylocationp);
299 inline void yypop_ (
unsigned int n = 1);
302 static const int yyeof_;
304 static const int yylast_;
305 static const int yynnts_;
306 static const int yyempty_;
307 static const int yyfinal_;
308 static const int yyterror_;
309 static const int yyerrcode_;
310 static const int yyntokens_;
311 static const unsigned int yyuser_token_number_max_;
312 static const token_number_type yyundef_token_;
316 std::ostream* yycdebug_;
320 QJson::ParserPrivate* driver;
token::yytokentype token_type
Token type.
Main class used to convert JSON data to QVariant objects.
int debug_level_type
Type for debugging levels.
YYSTYPE semantic_type
Symbol semantic values.