40 #ifndef YY_YY_JSON_PARSER_HH_INCLUDED
41 # define YY_YY_JSON_PARSER_HH_INCLUDED
45 #line 26 "json_parser.yy"
48 #include "json_scanner.h"
49 #include "qjson_debug.h"
51 #include <QtCore/QByteArray>
52 #include <QtCore/QMap>
53 #include <QtCore/QString>
54 #include <QtCore/QVariant>
64 #define YYERROR_VERBOSE 1
66 Q_DECLARE_METATYPE(QVector<QVariant>*)
67 Q_DECLARE_METATYPE(QVariantMap*)
71 #line 72 "json_parser.hh"
87 #line 88 "json_parser.hh"
107 CURLY_BRACKET_OPEN = 1,
108 CURLY_BRACKET_CLOSE = 2,
109 SQUARE_BRACKET_OPEN = 3,
110 SQUARE_BRACKET_CLOSE = 4,
131 virtual int parse ();
151 virtual void error (
const location_type& loc,
const std::string& msg);
156 virtual std::string yysyntax_error_ (
int yystate,
int tok);
159 virtual void yy_symbol_value_print_ (
int yytype,
170 virtual void yy_symbol_print_ (
int yytype,
177 typedef int state_type;
179 typedef stack<state_type> state_stack_type;
181 typedef stack<semantic_type> semantic_stack_type;
183 typedef stack<location_type> location_stack_type;
186 state_stack_type yystate_stack_;
188 semantic_stack_type yysemantic_stack_;
190 location_stack_type yylocation_stack_;
194 static bool yy_pact_value_is_default_ (
int yyvalue);
198 static bool yy_table_value_is_error_ (
int yyvalue);
201 typedef unsigned char token_number_type;
204 static const signed char yypact_[];
205 static const signed char yypact_ninf_;
210 static const unsigned char yydefact_[];
212 static const signed char yypgoto_[];
213 static const signed char yydefgoto_[];
220 static const unsigned char yytable_[];
221 static const signed char yytable_ninf_;
223 static const signed char yycheck_[];
226 static const unsigned char yystos_[];
229 static const unsigned char yyr1_[];
231 static const unsigned char yyr2_[];
234 static std::string yytnamerr_ (
const char *n);
238 static const char*
const yytname_[];
240 typedef signed char rhs_number_type;
243 static const rhs_number_type yyrhs_[];
245 static const unsigned char yyprhs_[];
247 static const unsigned char yyrline_[];
249 static const unsigned short int yytoken_number_[];
251 virtual void yy_reduce_print_ (
int r);
253 virtual void yystack_print_ ();
257 std::ostream* yycdebug_;
261 token_number_type yytranslate_ (
int t);
269 inline void yydestruct_ (
const char* yymsg,
275 inline void yypop_ (
unsigned int n = 1);
278 static const int yyeof_;
280 static const int yylast_;
281 static const int yynnts_;
282 static const int yyempty_;
283 static const int yyfinal_;
284 static const int yyterror_;
285 static const int yyerrcode_;
286 static const int yyntokens_;
287 static const unsigned int yyuser_token_number_max_;
288 static const token_number_type yyundef_token_;
291 QJson::ParserPrivate* driver;
296 #line 297 "json_parser.hh"