|
a/src/query/wasaparse.hpp |
|
b/src/query/wasaparse.hpp |
1 |
// A Bison parser, made by GNU Bison 3.0.2.
|
1 |
// A Bison parser, made by GNU Bison 3.0.4.
|
2 |
|
2 |
|
3 |
// Skeleton interface for Bison LALR(1) parsers in C++
|
3 |
// Skeleton interface for Bison LALR(1) parsers in C++
|
4 |
|
4 |
|
5 |
// Copyright (C) 2002-2013 Free Software Foundation, Inc.
|
5 |
// Copyright (C) 2002-2015 Free Software Foundation, Inc.
|
6 |
|
6 |
|
7 |
// This program is free software: you can redistribute it and/or modify
|
7 |
// This program is free software: you can redistribute it and/or modify
|
8 |
// it under the terms of the GNU General Public License as published by
|
8 |
// it under the terms of the GNU General Public License as published by
|
9 |
// the Free Software Foundation, either version 3 of the License, or
|
9 |
// the Free Software Foundation, either version 3 of the License, or
|
10 |
// (at your option) any later version.
|
10 |
// (at your option) any later version.
|
|
... |
|
... |
39 |
|
39 |
|
40 |
#ifndef YY_YY_Y_TAB_H_INCLUDED
|
40 |
#ifndef YY_YY_Y_TAB_H_INCLUDED
|
41 |
# define YY_YY_Y_TAB_H_INCLUDED
|
41 |
# define YY_YY_Y_TAB_H_INCLUDED
|
42 |
|
42 |
|
43 |
|
43 |
|
44 |
# include <vector>
|
44 |
# include <cstdlib> // std::abort
|
45 |
# include <iostream>
|
45 |
# include <iostream>
|
46 |
# include <stdexcept>
|
46 |
# include <stdexcept>
|
47 |
# include <string>
|
47 |
# include <string>
|
|
|
48 |
# include <vector>
|
48 |
# include "stack.hh"
|
49 |
# include "stack.hh"
|
49 |
# include "location.hh"
|
50 |
# include "location.hh"
|
50 |
|
51 |
|
51 |
|
52 |
|
52 |
#ifndef YY_ATTRIBUTE
|
53 |
#ifndef YY_ATTRIBUTE
|
|
... |
|
... |
107 |
# define YYDEBUG 0
|
108 |
# define YYDEBUG 0
|
108 |
#endif
|
109 |
#endif
|
109 |
|
110 |
|
110 |
|
111 |
|
111 |
namespace yy {
|
112 |
namespace yy {
|
112 |
#line 113 "y.tab.h" // lalr1.cc:372
|
113 |
#line 114 "y.tab.h" // lalr1.cc:377
|
113 |
|
114 |
|
114 |
|
115 |
|
115 |
|
116 |
|
116 |
|
117 |
|
117 |
|
118 |
|
|
... |
|
... |
121 |
public:
|
122 |
public:
|
122 |
#ifndef YYSTYPE
|
123 |
#ifndef YYSTYPE
|
123 |
/// Symbol semantic values.
|
124 |
/// Symbol semantic values.
|
124 |
union semantic_type
|
125 |
union semantic_type
|
125 |
{
|
126 |
{
|
126 |
#line 46 "/y/home/dockes/projets/fulltext/recoll/src/query/wasaparse.ypp" // lalr1.cc:372
|
127 |
#line 46 "/home/dockes/projets/fulltext/recoll/src/query/wasaparse.ypp" // lalr1.cc:377
|
127 |
|
128 |
|
128 |
std::string *str;
|
129 |
std::string *str;
|
|
|
130 |
Rcl::SearchDataClauseRange *rg;
|
129 |
Rcl::SearchDataClauseSimple *cl;
|
131 |
Rcl::SearchDataClauseSimple *cl;
|
130 |
Rcl::SearchData *sd;
|
132 |
Rcl::SearchData *sd;
|
131 |
|
133 |
|
132 |
#line 133 "y.tab.h" // lalr1.cc:372
|
134 |
#line 135 "y.tab.h" // lalr1.cc:377
|
133 |
};
|
135 |
};
|
134 |
#else
|
136 |
#else
|
135 |
typedef YYSTYPE semantic_type;
|
137 |
typedef YYSTYPE semantic_type;
|
136 |
#endif
|
138 |
#endif
|
137 |
/// Symbol locations.
|
139 |
/// Symbol locations.
|
|
... |
|
... |
158 |
EQUALS = 264,
|
160 |
EQUALS = 264,
|
159 |
CONTAINS = 265,
|
161 |
CONTAINS = 265,
|
160 |
SMALLEREQ = 266,
|
162 |
SMALLEREQ = 266,
|
161 |
SMALLER = 267,
|
163 |
SMALLER = 267,
|
162 |
GREATEREQ = 268,
|
164 |
GREATEREQ = 268,
|
163 |
GREATER = 269
|
165 |
GREATER = 269,
|
|
|
166 |
RANGE = 270
|
164 |
};
|
167 |
};
|
165 |
};
|
168 |
};
|
166 |
|
169 |
|
167 |
/// (External) token type, as returned by yylex.
|
170 |
/// (External) token type, as returned by yylex.
|
168 |
typedef token::yytokentype token_type;
|
171 |
typedef token::yytokentype token_type;
|
169 |
|
172 |
|
170 |
/// Internal symbol number.
|
173 |
/// Symbol type: an internal symbol number.
|
171 |
typedef int symbol_number_type;
|
174 |
typedef int symbol_number_type;
|
|
|
175 |
|
|
|
176 |
/// The symbol type number to denote an empty symbol.
|
|
|
177 |
enum { empty_symbol = -2 };
|
172 |
|
178 |
|
173 |
/// Internal symbol number for tokens (subsumed by symbol_number_type).
|
179 |
/// Internal symbol number for tokens (subsumed by symbol_number_type).
|
174 |
typedef unsigned char token_number_type;
|
180 |
typedef unsigned char token_number_type;
|
175 |
|
181 |
|
176 |
/// A complete symbol.
|
182 |
/// A complete symbol.
|
|
... |
|
... |
198 |
/// Constructor for symbols with semantic value.
|
204 |
/// Constructor for symbols with semantic value.
|
199 |
basic_symbol (typename Base::kind_type t,
|
205 |
basic_symbol (typename Base::kind_type t,
|
200 |
const semantic_type& v,
|
206 |
const semantic_type& v,
|
201 |
const location_type& l);
|
207 |
const location_type& l);
|
202 |
|
208 |
|
|
|
209 |
/// Destroy the symbol.
|
203 |
~basic_symbol ();
|
210 |
~basic_symbol ();
|
|
|
211 |
|
|
|
212 |
/// Destroy contents, and record that is empty.
|
|
|
213 |
void clear ();
|
|
|
214 |
|
|
|
215 |
/// Whether empty.
|
|
|
216 |
bool empty () const;
|
204 |
|
217 |
|
205 |
/// Destructive move, \a s is emptied into this.
|
218 |
/// Destructive move, \a s is emptied into this.
|
206 |
void move (basic_symbol& s);
|
219 |
void move (basic_symbol& s);
|
207 |
|
220 |
|
208 |
/// The semantic value.
|
221 |
/// The semantic value.
|
|
... |
|
... |
229 |
typedef token_type kind_type;
|
242 |
typedef token_type kind_type;
|
230 |
|
243 |
|
231 |
/// Constructor from (external) token numbers.
|
244 |
/// Constructor from (external) token numbers.
|
232 |
by_type (kind_type t);
|
245 |
by_type (kind_type t);
|
233 |
|
246 |
|
|
|
247 |
/// Record that this symbol is empty.
|
|
|
248 |
void clear ();
|
|
|
249 |
|
234 |
/// Steal the symbol type from \a that.
|
250 |
/// Steal the symbol type from \a that.
|
235 |
void move (by_type& that);
|
251 |
void move (by_type& that);
|
236 |
|
252 |
|
237 |
/// The (internal) type number (corresponding to \a type).
|
253 |
/// The (internal) type number (corresponding to \a type).
|
238 |
/// -1 when this symbol is empty.
|
254 |
/// \a empty when empty.
|
239 |
symbol_number_type type_get () const;
|
255 |
symbol_number_type type_get () const;
|
240 |
|
256 |
|
241 |
/// The token.
|
257 |
/// The token.
|
242 |
token_type token () const;
|
258 |
token_type token () const;
|
243 |
|
259 |
|
244 |
enum { empty = 0 };
|
|
|
245 |
|
|
|
246 |
/// The symbol type.
|
260 |
/// The symbol type.
|
247 |
/// -1 when this symbol is empty.
|
261 |
/// \a empty_symbol when empty.
|
248 |
token_number_type type;
|
262 |
/// An int, not token_number_type, to be able to store empty_symbol.
|
|
|
263 |
int type;
|
249 |
};
|
264 |
};
|
250 |
|
265 |
|
251 |
/// "External" symbols: returned by the scanner.
|
266 |
/// "External" symbols: returned by the scanner.
|
252 |
typedef basic_symbol<by_type> symbol_type;
|
267 |
typedef basic_symbol<by_type> symbol_type;
|
253 |
|
268 |
|
|
... |
|
... |
290 |
/// State numbers.
|
305 |
/// State numbers.
|
291 |
typedef int state_type;
|
306 |
typedef int state_type;
|
292 |
|
307 |
|
293 |
/// Generate an error message.
|
308 |
/// Generate an error message.
|
294 |
/// \param yystate the state where the error occurred.
|
309 |
/// \param yystate the state where the error occurred.
|
295 |
/// \param yytoken the lookahead token type, or yyempty_.
|
310 |
/// \param yyla the lookahead token.
|
296 |
virtual std::string yysyntax_error_ (state_type yystate,
|
311 |
virtual std::string yysyntax_error_ (state_type yystate,
|
297 |
symbol_number_type yytoken) const;
|
312 |
const symbol_type& yyla) const;
|
298 |
|
313 |
|
299 |
/// Compute post-reduction state.
|
314 |
/// Compute post-reduction state.
|
300 |
/// \param yystate the current state
|
315 |
/// \param yystate the current state
|
301 |
/// \param yysym the nonterminal to push on the stack
|
316 |
/// \param yysym the nonterminal to push on the stack
|
302 |
state_type yy_lr_goto_state_ (state_type yystate, int yysym);
|
317 |
state_type yy_lr_goto_state_ (state_type yystate, int yysym);
|
|
... |
|
... |
355 |
|
370 |
|
356 |
/// For a symbol, its name in clear.
|
371 |
/// For a symbol, its name in clear.
|
357 |
static const char* const yytname_[];
|
372 |
static const char* const yytname_[];
|
358 |
#if YYDEBUG
|
373 |
#if YYDEBUG
|
359 |
// YYRLINE[YYN] -- Source line where rule number YYN was defined.
|
374 |
// YYRLINE[YYN] -- Source line where rule number YYN was defined.
|
360 |
static const unsigned char yyrline_[];
|
375 |
static const unsigned short int yyrline_[];
|
361 |
/// Report on the debug stream that the rule \a r is going to be reduced.
|
376 |
/// Report on the debug stream that the rule \a r is going to be reduced.
|
362 |
virtual void yy_reduce_print_ (int r);
|
377 |
virtual void yy_reduce_print_ (int r);
|
363 |
/// Print the state stack on the debug stream.
|
378 |
/// Print the state stack on the debug stream.
|
364 |
virtual void yystack_print_ ();
|
379 |
virtual void yystack_print_ ();
|
365 |
|
380 |
|
|
... |
|
... |
395 |
by_state (kind_type s);
|
410 |
by_state (kind_type s);
|
396 |
|
411 |
|
397 |
/// Copy constructor.
|
412 |
/// Copy constructor.
|
398 |
by_state (const by_state& other);
|
413 |
by_state (const by_state& other);
|
399 |
|
414 |
|
|
|
415 |
/// Record that this symbol is empty.
|
|
|
416 |
void clear ();
|
|
|
417 |
|
400 |
/// Steal the symbol type from \a that.
|
418 |
/// Steal the symbol type from \a that.
|
401 |
void move (by_state& that);
|
419 |
void move (by_state& that);
|
402 |
|
420 |
|
403 |
/// The (internal) type number (corresponding to \a state).
|
421 |
/// The (internal) type number (corresponding to \a state).
|
404 |
/// "empty" when empty.
|
422 |
/// \a empty_symbol when empty.
|
405 |
symbol_number_type type_get () const;
|
423 |
symbol_number_type type_get () const;
|
406 |
|
424 |
|
|
|
425 |
/// The state number used to denote an empty symbol.
|
407 |
enum { empty = 0 };
|
426 |
enum { empty_state = -1 };
|
408 |
|
427 |
|
409 |
/// The state.
|
428 |
/// The state.
|
|
|
429 |
/// \a empty when empty.
|
410 |
state_type state;
|
430 |
state_type state;
|
411 |
};
|
431 |
};
|
412 |
|
432 |
|
413 |
/// "Internal" symbol: element of the stack.
|
433 |
/// "Internal" symbol: element of the stack.
|
414 |
struct stack_symbol_type : basic_symbol<by_state>
|
434 |
struct stack_symbol_type : basic_symbol<by_state>
|
|
... |
|
... |
445 |
void yypush_ (const char* m, state_type s, symbol_type& sym);
|
465 |
void yypush_ (const char* m, state_type s, symbol_type& sym);
|
446 |
|
466 |
|
447 |
/// Pop \a n symbols the three stacks.
|
467 |
/// Pop \a n symbols the three stacks.
|
448 |
void yypop_ (unsigned int n = 1);
|
468 |
void yypop_ (unsigned int n = 1);
|
449 |
|
469 |
|
450 |
// Constants.
|
470 |
/// Constants.
|
451 |
enum
|
471 |
enum
|
452 |
{
|
472 |
{
|
453 |
yyeof_ = 0,
|
473 |
yyeof_ = 0,
|
454 |
yylast_ = 59, ///< Last index in yytable_.
|
474 |
yylast_ = 60, ///< Last index in yytable_.
|
455 |
yynnts_ = 7, ///< Number of nonterminal symbols.
|
475 |
yynnts_ = 8, ///< Number of nonterminal symbols.
|
456 |
yyempty_ = -2,
|
|
|
457 |
yyfinal_ = 14, ///< Termination state number.
|
476 |
yyfinal_ = 14, ///< Termination state number.
|
458 |
yyterror_ = 1,
|
477 |
yyterror_ = 1,
|
459 |
yyerrcode_ = 256,
|
478 |
yyerrcode_ = 256,
|
460 |
yyntokens_ = 18 ///< Number of tokens.
|
479 |
yyntokens_ = 19 ///< Number of tokens.
|
461 |
};
|
480 |
};
|
462 |
|
481 |
|
463 |
|
482 |
|
464 |
// User arguments.
|
483 |
// User arguments.
|
465 |
WasaParserDriver* d;
|
484 |
WasaParserDriver* d;
|
466 |
};
|
485 |
};
|
467 |
|
486 |
|
468 |
|
487 |
|
469 |
|
488 |
|
470 |
} // yy
|
489 |
} // yy
|
471 |
#line 472 "y.tab.h" // lalr1.cc:372
|
490 |
#line 491 "y.tab.h" // lalr1.cc:377
|
472 |
|
491 |
|
473 |
|
492 |
|
474 |
|
493 |
|
475 |
|
494 |
|
476 |
#endif // !YY_YY_Y_TAB_H_INCLUDED
|
495 |
#endif // !YY_YY_Y_TAB_H_INCLUDED
|