[6081e74e] | 1 | /* A Bison parser, made by GNU Bison 2.5. */
|
---|
| 2 |
|
---|
| 3 | /* Bison interface for Yacc-like parsers in C
|
---|
| 4 |
|
---|
| 5 | Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
---|
| 6 |
|
---|
| 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.
|
---|
| 11 |
|
---|
| 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.
|
---|
| 16 |
|
---|
| 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.
|
---|
| 29 |
|
---|
| 30 | This special exception was added by the Free Software Foundation in
|
---|
| 31 | version 2.2 of Bison. */
|
---|
| 32 |
|
---|
| 33 |
|
---|
| 34 | /* Tokens. */
|
---|
| 35 | #ifndef YYTOKENTYPE
|
---|
| 36 | # define YYTOKENTYPE
|
---|
| 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,
|
---|
[90c3b1c] | 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,
|
---|
[4040425] | 70 | OTYPE = 288,
|
---|
[90c3b1c] | 71 | FTYPE = 289,
|
---|
| 72 | DTYPE = 290,
|
---|
[4040425] | 73 | TRAIT = 291,
|
---|
[90c3b1c] | 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,
|
---|
[e7aed49] | 145 | THEN = 363
|
---|
[6081e74e] | 146 | };
|
---|
| 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 |
|
---|
| 256 |
|
---|
| 257 |
|
---|
| 258 |
|
---|
| 259 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
---|
| 260 | typedef union YYSTYPE
|
---|
| 261 | {
|
---|
| 262 |
|
---|
| 263 | /* Line 2068 of yacc.c */
|
---|
[e7aed49] | 264 | #line 110 "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;
|
---|
| 273 | ConstantNode *constant;
|
---|
[7f5566b] | 274 | LabelNode *label;
|
---|
[6081e74e] | 275 | InitializerNode *in;
|
---|
[7f5566b] | 276 | bool flag;
|
---|
[6081e74e] | 277 |
|
---|
| 278 |
|
---|
| 279 |
|
---|
| 280 | /* Line 2068 of yacc.c */
|
---|
[e7aed49] | 281 | #line 282 "Parser/parser.h"
|
---|
[6081e74e] | 282 | } YYSTYPE;
|
---|
| 283 | # define YYSTYPE_IS_TRIVIAL 1
|
---|
| 284 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
---|
| 285 | # define YYSTYPE_IS_DECLARED 1
|
---|
| 286 | #endif
|
---|
| 287 |
|
---|
| 288 | extern YYSTYPE yylval;
|
---|
| 289 |
|
---|
| 290 |
|
---|