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