Ignore:
Timestamp:
Sep 5, 2017, 3:41:04 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
416cc86
Parents:
800d275 (diff), 3f8dd01 (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r800d275 r235b41f  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Aug 28 13:24:10 2017
    13 // Update Count     : 2720
     12// Last Modified On : Sun Sep  3 20:43:19 2017
     13// Update Count     : 2742
    1414//
    1515
     
    4848#include <cstdio>
    4949#include <stack>
     50using namespace std;
     51
    5052#include "ParseNode.h"
    5153#include "TypedefTable.h"
    5254#include "TypeData.h"
    5355#include "LinkageSpec.h"
    54 using namespace std;
     56#include "Common/SemanticError.h"                                               // error_str
    5557
    5658extern DeclarationNode * parseTree;
     
    98100        StatementNode * sn;
    99101        WaitForStmt * wfs;
    100         ConstantExpr * constant;
     102        Expression * constant;
    101103        IfCtl * ifctl;
    102104        ForCtl * fctl;
     
    534536                                $$ = new ExpressionNode( build_unary_val( $1, $2 ) );
    535537                                break;
     538                          case OperKinds::And:
     539                                $$ = new ExpressionNode( new AddressExpr( build_addressOf( $2 ) ) );
     540                                break;
    536541                          default:
    537542                                assert( false );
     
    560565        | ATTR_IDENTIFIER '(' type ')'
    561566                { $$ = 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 ) ); }
    564567        ;
    565568
     
    31333136// ----end of grammar----
    31343137
    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 
    31443138// Local Variables: //
    31453139// mode: c++ //
Note: See TracChangeset for help on using the changeset viewer.