| [ab57786] | 1 | /* A Bison parser, made by GNU Bison 2.5. */
|
|---|
| [6081e74e] | 2 |
|
|---|
| 3 | /* Bison interface for Yacc-like parsers in C
|
|---|
| [ab57786] | 4 |
|
|---|
| 5 | Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
|---|
| 6 |
|
|---|
| [6081e74e] | 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
|
|---|
| 9 | the Free Software Foundation, either version 3 of the License, or
|
|---|
| 10 | (at your option) any later version.
|
|---|
| [ab57786] | 11 |
|
|---|
| [6081e74e] | 12 | This program is distributed in the hope that it will be useful,
|
|---|
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 15 | GNU General Public License for more details.
|
|---|
| [ab57786] | 16 |
|
|---|
| [6081e74e] | 17 | You should have received a copy of the GNU General Public License
|
|---|
| 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|---|
| 19 |
|
|---|
| 20 | /* As a special exception, you may create a larger work that contains
|
|---|
| 21 | part or all of the Bison parser skeleton and distribute that work
|
|---|
| 22 | under terms of your choice, so long as that work isn't itself a
|
|---|
| 23 | parser generator using the skeleton or a modified version thereof
|
|---|
| 24 | as a parser skeleton. Alternatively, if you modify or redistribute
|
|---|
| 25 | the parser skeleton itself, you may (at your option) remove this
|
|---|
| 26 | special exception, which will cause the skeleton and the resulting
|
|---|
| 27 | Bison output files to be licensed under the GNU General Public
|
|---|
| 28 | License without this special exception.
|
|---|
| [ab57786] | 29 |
|
|---|
| [6081e74e] | 30 | This special exception was added by the Free Software Foundation in
|
|---|
| 31 | version 2.2 of Bison. */
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| [ab57786] | 34 | /* Tokens. */
|
|---|
| [6081e74e] | 35 | #ifndef YYTOKENTYPE
|
|---|
| 36 | # define YYTOKENTYPE
|
|---|
| [ab57786] | 37 | /* Put the tokens into the symbol table, so that GDB and other debuggers
|
|---|
| 38 | know about them. */
|
|---|
| 39 | enum yytokentype {
|
|---|
| 40 | TYPEDEF = 258,
|
|---|
| 41 | AUTO = 259,
|
|---|
| 42 | EXTERN = 260,
|
|---|
| 43 | REGISTER = 261,
|
|---|
| 44 | STATIC = 262,
|
|---|
| 45 | INLINE = 263,
|
|---|
| 46 | FORTRAN = 264,
|
|---|
| 47 | CONST = 265,
|
|---|
| 48 | VOLATILE = 266,
|
|---|
| 49 | RESTRICT = 267,
|
|---|
| 50 | FORALL = 268,
|
|---|
| 51 | LVALUE = 269,
|
|---|
| 52 | VOID = 270,
|
|---|
| 53 | CHAR = 271,
|
|---|
| 54 | SHORT = 272,
|
|---|
| 55 | INT = 273,
|
|---|
| 56 | LONG = 274,
|
|---|
| 57 | FLOAT = 275,
|
|---|
| 58 | DOUBLE = 276,
|
|---|
| 59 | SIGNED = 277,
|
|---|
| 60 | UNSIGNED = 278,
|
|---|
| 61 | VALIST = 279,
|
|---|
| 62 | BOOL = 280,
|
|---|
| 63 | COMPLEX = 281,
|
|---|
| 64 | IMAGINARY = 282,
|
|---|
| 65 | TYPEOF = 283,
|
|---|
| 66 | LABEL = 284,
|
|---|
| 67 | ENUM = 285,
|
|---|
| 68 | STRUCT = 286,
|
|---|
| 69 | UNION = 287,
|
|---|
| 70 | OTYPE = 288,
|
|---|
| 71 | FTYPE = 289,
|
|---|
| 72 | DTYPE = 290,
|
|---|
| 73 | TRAIT = 291,
|
|---|
| 74 | SIZEOF = 292,
|
|---|
| 75 | OFFSETOF = 293,
|
|---|
| 76 | ATTRIBUTE = 294,
|
|---|
| 77 | EXTENSION = 295,
|
|---|
| 78 | IF = 296,
|
|---|
| 79 | ELSE = 297,
|
|---|
| 80 | SWITCH = 298,
|
|---|
| 81 | CASE = 299,
|
|---|
| 82 | DEFAULT = 300,
|
|---|
| 83 | DO = 301,
|
|---|
| 84 | WHILE = 302,
|
|---|
| 85 | FOR = 303,
|
|---|
| 86 | BREAK = 304,
|
|---|
| 87 | CONTINUE = 305,
|
|---|
| 88 | GOTO = 306,
|
|---|
| 89 | RETURN = 307,
|
|---|
| 90 | CHOOSE = 308,
|
|---|
| 91 | DISABLE = 309,
|
|---|
| 92 | ENABLE = 310,
|
|---|
| 93 | FALLTHRU = 311,
|
|---|
| 94 | TRY = 312,
|
|---|
| 95 | CATCH = 313,
|
|---|
| 96 | CATCHRESUME = 314,
|
|---|
| 97 | FINALLY = 315,
|
|---|
| 98 | THROW = 316,
|
|---|
| 99 | THROWRESUME = 317,
|
|---|
| 100 | AT = 318,
|
|---|
| 101 | ASM = 319,
|
|---|
| 102 | ALIGNAS = 320,
|
|---|
| 103 | ALIGNOF = 321,
|
|---|
| 104 | ATOMIC = 322,
|
|---|
| 105 | GENERIC = 323,
|
|---|
| 106 | NORETURN = 324,
|
|---|
| 107 | STATICASSERT = 325,
|
|---|
| 108 | THREADLOCAL = 326,
|
|---|
| 109 | IDENTIFIER = 327,
|
|---|
| 110 | QUOTED_IDENTIFIER = 328,
|
|---|
| 111 | TYPEDEFname = 329,
|
|---|
| 112 | TYPEGENname = 330,
|
|---|
| 113 | ATTR_IDENTIFIER = 331,
|
|---|
| 114 | ATTR_TYPEDEFname = 332,
|
|---|
| 115 | ATTR_TYPEGENname = 333,
|
|---|
| 116 | INTEGERconstant = 334,
|
|---|
| 117 | FLOATINGconstant = 335,
|
|---|
| 118 | CHARACTERconstant = 336,
|
|---|
| 119 | STRINGliteral = 337,
|
|---|
| 120 | ZERO = 338,
|
|---|
| 121 | ONE = 339,
|
|---|
| 122 | ARROW = 340,
|
|---|
| 123 | ICR = 341,
|
|---|
| 124 | DECR = 342,
|
|---|
| 125 | LS = 343,
|
|---|
| 126 | RS = 344,
|
|---|
| 127 | LE = 345,
|
|---|
| 128 | GE = 346,
|
|---|
| 129 | EQ = 347,
|
|---|
| 130 | NE = 348,
|
|---|
| 131 | ANDAND = 349,
|
|---|
| 132 | OROR = 350,
|
|---|
| 133 | ELLIPSIS = 351,
|
|---|
| 134 | MULTassign = 352,
|
|---|
| 135 | DIVassign = 353,
|
|---|
| 136 | MODassign = 354,
|
|---|
| 137 | PLUSassign = 355,
|
|---|
| 138 | MINUSassign = 356,
|
|---|
| 139 | LSassign = 357,
|
|---|
| 140 | RSassign = 358,
|
|---|
| 141 | ANDassign = 359,
|
|---|
| 142 | ERassign = 360,
|
|---|
| 143 | ORassign = 361,
|
|---|
| 144 | ATassign = 362,
|
|---|
| 145 | THEN = 363
|
|---|
| 146 | };
|
|---|
| [6081e74e] | 147 | #endif
|
|---|
| 148 | /* Tokens. */
|
|---|
| 149 | #define TYPEDEF 258
|
|---|
| 150 | #define AUTO 259
|
|---|
| 151 | #define EXTERN 260
|
|---|
| 152 | #define REGISTER 261
|
|---|
| 153 | #define STATIC 262
|
|---|
| 154 | #define INLINE 263
|
|---|
| 155 | #define FORTRAN 264
|
|---|
| 156 | #define CONST 265
|
|---|
| 157 | #define VOLATILE 266
|
|---|
| 158 | #define RESTRICT 267
|
|---|
| 159 | #define FORALL 268
|
|---|
| 160 | #define LVALUE 269
|
|---|
| 161 | #define VOID 270
|
|---|
| 162 | #define CHAR 271
|
|---|
| 163 | #define SHORT 272
|
|---|
| 164 | #define INT 273
|
|---|
| 165 | #define LONG 274
|
|---|
| 166 | #define FLOAT 275
|
|---|
| 167 | #define DOUBLE 276
|
|---|
| 168 | #define SIGNED 277
|
|---|
| 169 | #define UNSIGNED 278
|
|---|
| [90c3b1c] | 170 | #define VALIST 279
|
|---|
| 171 | #define BOOL 280
|
|---|
| 172 | #define COMPLEX 281
|
|---|
| 173 | #define IMAGINARY 282
|
|---|
| 174 | #define TYPEOF 283
|
|---|
| 175 | #define LABEL 284
|
|---|
| 176 | #define ENUM 285
|
|---|
| 177 | #define STRUCT 286
|
|---|
| 178 | #define UNION 287
|
|---|
| [4040425] | 179 | #define OTYPE 288
|
|---|
| [90c3b1c] | 180 | #define FTYPE 289
|
|---|
| 181 | #define DTYPE 290
|
|---|
| [4040425] | 182 | #define TRAIT 291
|
|---|
| [90c3b1c] | 183 | #define SIZEOF 292
|
|---|
| 184 | #define OFFSETOF 293
|
|---|
| 185 | #define ATTRIBUTE 294
|
|---|
| 186 | #define EXTENSION 295
|
|---|
| 187 | #define IF 296
|
|---|
| 188 | #define ELSE 297
|
|---|
| 189 | #define SWITCH 298
|
|---|
| 190 | #define CASE 299
|
|---|
| 191 | #define DEFAULT 300
|
|---|
| 192 | #define DO 301
|
|---|
| 193 | #define WHILE 302
|
|---|
| 194 | #define FOR 303
|
|---|
| 195 | #define BREAK 304
|
|---|
| 196 | #define CONTINUE 305
|
|---|
| 197 | #define GOTO 306
|
|---|
| 198 | #define RETURN 307
|
|---|
| 199 | #define CHOOSE 308
|
|---|
| 200 | #define DISABLE 309
|
|---|
| 201 | #define ENABLE 310
|
|---|
| 202 | #define FALLTHRU 311
|
|---|
| 203 | #define TRY 312
|
|---|
| 204 | #define CATCH 313
|
|---|
| 205 | #define CATCHRESUME 314
|
|---|
| 206 | #define FINALLY 315
|
|---|
| 207 | #define THROW 316
|
|---|
| 208 | #define THROWRESUME 317
|
|---|
| 209 | #define AT 318
|
|---|
| 210 | #define ASM 319
|
|---|
| 211 | #define ALIGNAS 320
|
|---|
| 212 | #define ALIGNOF 321
|
|---|
| 213 | #define ATOMIC 322
|
|---|
| 214 | #define GENERIC 323
|
|---|
| 215 | #define NORETURN 324
|
|---|
| 216 | #define STATICASSERT 325
|
|---|
| 217 | #define THREADLOCAL 326
|
|---|
| 218 | #define IDENTIFIER 327
|
|---|
| 219 | #define QUOTED_IDENTIFIER 328
|
|---|
| 220 | #define TYPEDEFname 329
|
|---|
| 221 | #define TYPEGENname 330
|
|---|
| 222 | #define ATTR_IDENTIFIER 331
|
|---|
| 223 | #define ATTR_TYPEDEFname 332
|
|---|
| 224 | #define ATTR_TYPEGENname 333
|
|---|
| 225 | #define INTEGERconstant 334
|
|---|
| 226 | #define FLOATINGconstant 335
|
|---|
| 227 | #define CHARACTERconstant 336
|
|---|
| 228 | #define STRINGliteral 337
|
|---|
| 229 | #define ZERO 338
|
|---|
| 230 | #define ONE 339
|
|---|
| 231 | #define ARROW 340
|
|---|
| 232 | #define ICR 341
|
|---|
| 233 | #define DECR 342
|
|---|
| 234 | #define LS 343
|
|---|
| 235 | #define RS 344
|
|---|
| 236 | #define LE 345
|
|---|
| 237 | #define GE 346
|
|---|
| 238 | #define EQ 347
|
|---|
| 239 | #define NE 348
|
|---|
| 240 | #define ANDAND 349
|
|---|
| 241 | #define OROR 350
|
|---|
| 242 | #define ELLIPSIS 351
|
|---|
| 243 | #define MULTassign 352
|
|---|
| 244 | #define DIVassign 353
|
|---|
| 245 | #define MODassign 354
|
|---|
| 246 | #define PLUSassign 355
|
|---|
| 247 | #define MINUSassign 356
|
|---|
| 248 | #define LSassign 357
|
|---|
| 249 | #define RSassign 358
|
|---|
| 250 | #define ANDassign 359
|
|---|
| 251 | #define ERassign 360
|
|---|
| 252 | #define ORassign 361
|
|---|
| 253 | #define ATassign 362
|
|---|
| [e7aed49] | 254 | #define THEN 363
|
|---|
| [6081e74e] | 255 |
|
|---|
| [ab57786] | 256 |
|
|---|
| 257 |
|
|---|
| 258 |
|
|---|
| [6081e74e] | 259 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
|---|
| [ab57786] | 260 | typedef union YYSTYPE
|
|---|
| [6081e74e] | 261 | {
|
|---|
| [ab57786] | 262 |
|
|---|
| 263 | /* Line 2068 of yacc.c */
|
|---|
| [c1c1112] | 264 | #line 115 "parser.yy"
|
|---|
| [6081e74e] | 265 |
|
|---|
| 266 | Token tok;
|
|---|
| 267 | ParseNode *pn;
|
|---|
| 268 | ExpressionNode *en;
|
|---|
| 269 | DeclarationNode *decl;
|
|---|
| [68cd1ce] | 270 | DeclarationNode::Aggregate aggKey;
|
|---|
| [6081e74e] | 271 | DeclarationNode::TypeClass tclass;
|
|---|
| 272 | StatementNode *sn;
|
|---|
| [d1625f8] | 273 | ConstantExpr *constant;
|
|---|
| [2f22cc4] | 274 | ForCtl *fctl;
|
|---|
| [7f5566b] | 275 | LabelNode *label;
|
|---|
| [6081e74e] | 276 | InitializerNode *in;
|
|---|
| [d9e2280] | 277 | OperKinds op;
|
|---|
| [ab57786] | 278 | std::string *str;
|
|---|
| [7f5566b] | 279 | bool flag;
|
|---|
| [6081e74e] | 280 |
|
|---|
| [ab57786] | 281 |
|
|---|
| 282 |
|
|---|
| 283 | /* Line 2068 of yacc.c */
|
|---|
| 284 | #line 285 "Parser/parser.h"
|
|---|
| 285 | } YYSTYPE;
|
|---|
| [6081e74e] | 286 | # define YYSTYPE_IS_TRIVIAL 1
|
|---|
| [ab57786] | 287 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
|---|
| [6081e74e] | 288 | # define YYSTYPE_IS_DECLARED 1
|
|---|
| 289 | #endif
|
|---|
| 290 |
|
|---|
| 291 | extern YYSTYPE yylval;
|
|---|
| 292 |
|
|---|
| 293 |
|
|---|