1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
|
/* A Bison parser, made by GNU Bison 2.7. */
/* Skeleton interface for Bison GLR parsers in C++
Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* C++ GLR parser skeleton written by Akim Demaille. */
#ifndef YY_YY_DEBIAN_OUT_HIDL_GEN_Y_H_INCLUDED
# define YY_YY_DEBIAN_OUT_HIDL_GEN_Y_H_INCLUDED
# include <string>
# include <iostream>
# include "location.hh"
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
#endif
namespace yy {
/* Line 250 of glr.cc */
#line 53 "debian/out/hidl-gen_y.h"
/// A Bison parser.
class parser
{
public:
/// Symbol semantic values.
# ifndef YYSTYPE
union semantic_type
{
/* Line 257 of glr.cc */
#line 312 "hidl-gen_y.yy"
const char *str;
android::Type* type;
android::Reference<android::Type>* referenceToType;
android::ArrayType *arrayType;
android::TemplatedType *templatedType;
android::FQName *fqName;
android::CompoundType *compoundType;
android::NamedReference<android::Type>* field;
std::vector<android::NamedReference<android::Type>*>* fields;
android::EnumValue *enumValue;
android::ConstantExpression *constantExpression;
std::vector<android::EnumValue *> *enumValues;
android::NamedReference<android::Type>* typedVar;
android::TypedVarVector *typedVars;
android::Method *method;
android::CompoundType::Style compoundStyle;
std::vector<std::string> *stringVec;
std::vector<android::ConstantExpression *> *constExprVec;
android::AnnotationParam *annotationParam;
android::AnnotationParamVector *annotationParams;
android::Annotation *annotation;
std::vector<android::Annotation *> *annotations;
android::DocComment* docComment;
/* Line 257 of glr.cc */
#line 91 "debian/out/hidl-gen_y.h"
};
# else
typedef YYSTYPE semantic_type;
# endif
/// Symbol locations.
typedef location location_type;
/// Tokens.
struct token
{
/* Tokens. */
enum yytokentype {
DOC_COMMENT = 258,
ENUM = 259,
EXTENDS = 260,
FQNAME = 261,
GENERATES = 262,
IDENTIFIER = 263,
IMPORT = 264,
INTEGER = 265,
FLOAT = 266,
INTERFACE = 267,
PACKAGE = 268,
TYPE = 269,
STRUCT = 270,
STRING_LITERAL = 271,
TYPEDEF = 272,
UNION = 273,
SAFE_UNION = 274,
TEMPLATED = 275,
ONEWAY = 276,
UNKNOWN = 277,
LOGICAL_OR = 278,
LOGICAL_AND = 279,
NEQ = 280,
EQUALITY = 281,
GEQ = 282,
LEQ = 283,
RSHIFT = 284,
LSHIFT = 285,
UNARY_PLUS = 286,
UNARY_MINUS = 287
};
};
/// Token type.
typedef token::yytokentype token_type;
/// Build a parser object.
parser (void* scanner_yyarg, android::AST* const ast_yyarg, android::Scope** const scope_yyarg);
virtual ~parser ();
/// Parse.
/// \returns 0 iff parsing succeeded.
virtual int parse ();
/// The current debugging stream.
std::ostream& debug_stream () const;
/// Set the current debugging stream.
void set_debug_stream (std::ostream &);
/// Type for debugging levels.
typedef int debug_level_type;
/// The current debugging level.
debug_level_type debug_level () const;
/// Set the current debugging level.
void set_debug_level (debug_level_type l);
private:
public:
/// Report a syntax error.
/// \param loc where the syntax error is found.
/// \param msg a description of the syntax error.
virtual void error (const location_type& loc, const std::string& msg);
private:
# if YYDEBUG
public:
/// \brief Report a symbol value on the debug stream.
/// \param yytype The token type.
/// \param yyvaluep Its semantic value.
/// \param yylocationp Its location.
virtual void yy_symbol_value_print_ (int yytype,
const semantic_type* yyvaluep,
const location_type* yylocationp);
/// \brief Report a symbol on the debug stream.
/// \param yytype The token type.
/// \param yyvaluep Its semantic value.
/// \param yylocationp Its location.
virtual void yy_symbol_print_ (int yytype,
const semantic_type* yyvaluep,
const location_type* yylocationp);
private:
/* Debugging. */
std::ostream* yycdebug_;
# endif
/* User arguments. */
void* scanner;
android::AST* const ast;
android::Scope** const scope;
};
#ifndef YYSTYPE
# define YYSTYPE yy::parser::semantic_type
#endif
#ifndef YYLTYPE
# define YYLTYPE yy::parser::location_type
#endif
} // yy
/* Line 343 of glr.cc */
#line 208 "debian/out/hidl-gen_y.h"
#endif /* !YY_YY_DEBIAN_OUT_HIDL_GEN_Y_H_INCLUDED */
|