Changes in src/Parser/parser.yy [e612146c:b128d3e]
- File:
-
- 1 edited
-
src/Parser/parser.yy (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
re612146c rb128d3e 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Sep 3 20:43:19201713 // Update Count : 27 4212 // Last Modified On : Mon Aug 28 13:24:10 2017 13 // Update Count : 2720 14 14 // 15 15 … … 48 48 #include <cstdio> 49 49 #include <stack> 50 using namespace std;51 52 50 #include "ParseNode.h" 53 51 #include "TypedefTable.h" 54 52 #include "TypeData.h" 55 53 #include "LinkageSpec.h" 56 #include "Common/SemanticError.h" // error_str 54 using namespace std; 57 55 58 56 extern DeclarationNode * parseTree; … … 100 98 StatementNode * sn; 101 99 WaitForStmt * wfs; 102 Expression* constant;100 ConstantExpr * constant; 103 101 IfCtl * ifctl; 104 102 ForCtl * fctl; … … 536 534 $$ = new ExpressionNode( build_unary_val( $1, $2 ) ); 537 535 break; 538 case OperKinds::And:539 $$ = new ExpressionNode( new AddressExpr( build_addressOf( $2 ) ) );540 break;541 536 default: 542 537 assert( false ); … … 565 560 | ATTR_IDENTIFIER '(' type ')' 566 561 { $$ = new ExpressionNode( build_attrtype( build_varref( $1 ), $3 ) ); } 562 // | ANDAND IDENTIFIER // GCC, address of label 563 // { $$ = new ExpressionNode( new OperatorNode( OperKinds::LabelAddress ), new ExpressionNode( build_varref( $2 ) ); } 567 564 ; 568 565 … … 3136 3133 // ----end of grammar---- 3137 3134 3135 extern char *yytext; 3136 3137 void yyerror( const char * ) { 3138 if ( yyfilename ) { 3139 cout << yyfilename << ":"; 3140 } // if 3141 cout << yylineno << ":1 syntax error at token \"" << (yytext[0] == '\0' ? "EOF" : yytext) << "\"" << endl; 3142 } 3143 3138 3144 // Local Variables: // 3139 3145 // mode: c++ //
Note:
See TracChangeset
for help on using the changeset viewer.