Changeset 1eba452 for src/Parser
- Timestamp:
- Sep 15, 2016, 10:29:43 AM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- fc4a0fa, fd782b2
- Parents:
- 96a10cd (diff), 50c5cf3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/Parser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/Parser/parser.h ¶
r96a10cd r1eba452 1 /* A Bison parser, made by GNU Bison 2.5. */1 /* A Bison parser, made by GNU Bison 3.0.2. */ 2 2 3 3 /* Bison interface for Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989-1990, 2000-2011Free Software Foundation, Inc.6 4 5 Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. 6 7 7 This program is free software: you can redistribute it and/or modify 8 8 it under the terms of the GNU General Public License as published by 9 9 the Free Software Foundation, either version 3 of the License, or 10 10 (at your option) any later version. 11 11 12 12 This program is distributed in the hope that it will be useful, 13 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 15 GNU General Public License for more details. 16 16 17 17 You should have received a copy of the GNU General Public License 18 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ … … 27 27 Bison output files to be licensed under the GNU General Public 28 28 License without this special exception. 29 29 30 30 This special exception was added by the Free Software Foundation in 31 31 version 2.2 of Bison. */ 32 32 33 34 /* Tokens. */ 33 #ifndef YY_YY_PARSER_PARSER_H_INCLUDED 34 # define YY_YY_PARSER_PARSER_H_INCLUDED 35 /* Debug traces. */ 36 #ifndef YYDEBUG 37 # define YYDEBUG 1 38 #endif 39 #if YYDEBUG 40 extern int yydebug; 41 #endif 42 43 /* Token type. */ 35 44 #ifndef YYTOKENTYPE 36 45 # 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, 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 }; 46 enum yytokentype 47 { 48 TYPEDEF = 258, 49 AUTO = 259, 50 EXTERN = 260, 51 REGISTER = 261, 52 STATIC = 262, 53 INLINE = 263, 54 FORTRAN = 264, 55 CONST = 265, 56 VOLATILE = 266, 57 RESTRICT = 267, 58 FORALL = 268, 59 LVALUE = 269, 60 VOID = 270, 61 CHAR = 271, 62 SHORT = 272, 63 INT = 273, 64 LONG = 274, 65 FLOAT = 275, 66 DOUBLE = 276, 67 SIGNED = 277, 68 UNSIGNED = 278, 69 VALIST = 279, 70 BOOL = 280, 71 COMPLEX = 281, 72 IMAGINARY = 282, 73 TYPEOF = 283, 74 LABEL = 284, 75 ENUM = 285, 76 STRUCT = 286, 77 UNION = 287, 78 OTYPE = 288, 79 FTYPE = 289, 80 DTYPE = 290, 81 TRAIT = 291, 82 SIZEOF = 292, 83 OFFSETOF = 293, 84 ATTRIBUTE = 294, 85 EXTENSION = 295, 86 IF = 296, 87 ELSE = 297, 88 SWITCH = 298, 89 CASE = 299, 90 DEFAULT = 300, 91 DO = 301, 92 WHILE = 302, 93 FOR = 303, 94 BREAK = 304, 95 CONTINUE = 305, 96 GOTO = 306, 97 RETURN = 307, 98 CHOOSE = 308, 99 DISABLE = 309, 100 ENABLE = 310, 101 FALLTHRU = 311, 102 TRY = 312, 103 CATCH = 313, 104 CATCHRESUME = 314, 105 FINALLY = 315, 106 THROW = 316, 107 THROWRESUME = 317, 108 AT = 318, 109 ASM = 319, 110 ALIGNAS = 320, 111 ALIGNOF = 321, 112 ATOMIC = 322, 113 GENERIC = 323, 114 NORETURN = 324, 115 STATICASSERT = 325, 116 THREADLOCAL = 326, 117 IDENTIFIER = 327, 118 QUOTED_IDENTIFIER = 328, 119 TYPEDEFname = 329, 120 TYPEGENname = 330, 121 ATTR_IDENTIFIER = 331, 122 ATTR_TYPEDEFname = 332, 123 ATTR_TYPEGENname = 333, 124 INTEGERconstant = 334, 125 FLOATINGconstant = 335, 126 CHARACTERconstant = 336, 127 STRINGliteral = 337, 128 ZERO = 338, 129 ONE = 339, 130 ARROW = 340, 131 ICR = 341, 132 DECR = 342, 133 LS = 343, 134 RS = 344, 135 LE = 345, 136 GE = 346, 137 EQ = 347, 138 NE = 348, 139 ANDAND = 349, 140 OROR = 350, 141 ELLIPSIS = 351, 142 MULTassign = 352, 143 DIVassign = 353, 144 MODassign = 354, 145 PLUSassign = 355, 146 MINUSassign = 356, 147 LSassign = 357, 148 RSassign = 358, 149 ANDassign = 359, 150 ERassign = 360, 151 ORassign = 361, 152 ATassign = 362, 153 THEN = 363 154 }; 147 155 #endif 148 156 /* Tokens. */ … … 254 262 #define THEN 363 255 263 256 257 258 264 /* Value type. */ 259 265 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 260 typedef union YYSTYPE 266 typedef union YYSTYPE YYSTYPE; 267 union YYSTYPE 261 268 { 262 263 /* Line 2068 of yacc.c */ 264 #line 115 "parser.yy" 269 #line 115 "parser.yy" /* yacc.c:1909 */ 265 270 266 271 Token tok; … … 279 284 bool flag; 280 285 281 282 283 /* Line 2068 of yacc.c */ 284 #line 285 "Parser/parser.h" 285 } YYSTYPE; 286 #line 287 "Parser/parser.h" /* yacc.c:1909 */ 287 }; 286 288 # define YYSTYPE_IS_TRIVIAL 1 287 # define yystype YYSTYPE /* obsolescent; will be withdrawn */288 289 # define YYSTYPE_IS_DECLARED 1 289 290 #endif 290 291 292 291 293 extern YYSTYPE yylval; 292 294 293 295 int yyparse (void); 296 297 #endif /* !YY_YY_PARSER_PARSER_H_INCLUDED */ -
TabularUnified src/Parser/parser.yy ¶
r96a10cd r1eba452 827 827 { $$ = new StatementNode( build_while( $3, $5 ) ); } 828 828 | DO statement WHILE '(' comma_expression ')' ';' 829 { $$ = new StatementNode( build_while( $5, $2 ) ); }829 { $$ = new StatementNode( build_while( $5, $2, true ) ); } 830 830 | FOR '(' push for_control_expression ')' statement 831 831 { $$ = new StatementNode( build_for( $4, $6 ) ); }
Note: See TracChangeset
for help on using the changeset viewer.