Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    re612146c rb128d3e  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Sep  3 20:43:19 2017
    13 // Update Count     : 2742
     12// Last Modified On : Mon Aug 28 13:24:10 2017
     13// Update Count     : 2720
    1414//
    1515
     
    4848#include <cstdio>
    4949#include <stack>
    50 using namespace std;
    51 
    5250#include "ParseNode.h"
    5351#include "TypedefTable.h"
    5452#include "TypeData.h"
    5553#include "LinkageSpec.h"
    56 #include "Common/SemanticError.h"                                               // error_str
     54using namespace std;
    5755
    5856extern DeclarationNode * parseTree;
     
    10098        StatementNode * sn;
    10199        WaitForStmt * wfs;
    102         Expression * constant;
     100        ConstantExpr * constant;
    103101        IfCtl * ifctl;
    104102        ForCtl * fctl;
     
    536534                                $$ = new ExpressionNode( build_unary_val( $1, $2 ) );
    537535                                break;
    538                           case OperKinds::And:
    539                                 $$ = new ExpressionNode( new AddressExpr( build_addressOf( $2 ) ) );
    540                                 break;
    541536                          default:
    542537                                assert( false );
     
    565560        | ATTR_IDENTIFIER '(' type ')'
    566561                { $$ = 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 ) ); }
    567564        ;
    568565
     
    31363133// ----end of grammar----
    31373134
     3135extern char *yytext;
     3136
     3137void 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
    31383144// Local Variables: //
    31393145// mode: c++ //
Note: See TracChangeset for help on using the changeset viewer.