Changeset 8135d4c for src/Parser


Ignore:
Timestamp:
Aug 22, 2017, 7:31:52 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
9aaac6e9
Parents:
fc56cdbf (diff), b3d413b (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' into references

Location:
src/Parser
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    rfc56cdbf r8135d4c  
    1414//
    1515
    16 #include <string>
    17 #include <list>
    18 #include <iterator>
    19 #include <algorithm>
    20 #include <cassert>
    21 
    22 #include "TypeData.h"
    23 
    24 #include "SynTree/Attribute.h"
    25 #include "SynTree/Declaration.h"
    26 #include "SynTree/Expression.h"
    27 
    28 #include "TypedefTable.h"
     16#include <cassert>                 // for assert, assertf, safe_dynamic_cast
     17#include <iterator>                // for back_insert_iterator
     18#include <list>                    // for list
     19#include <memory>                  // for unique_ptr
     20#include <ostream>                 // for operator<<, ostream, basic_ostream
     21#include <string>                  // for string, operator+, allocator, char...
     22
     23#include "Common/SemanticError.h"  // for SemanticError
     24#include "Common/UniqueName.h"     // for UniqueName
     25#include "Common/utility.h"        // for maybeClone, maybeBuild, CodeLocation
     26#include "Parser/LinkageSpec.h"    // for Spec, linkageName, Cforall
     27#include "Parser/ParseNode.h"      // for DeclarationNode, ExpressionNode
     28#include "SynTree/Attribute.h"     // for Attribute
     29#include "SynTree/Declaration.h"   // for TypeDecl, ObjectDecl, Declaration
     30#include "SynTree/Expression.h"    // for Expression, ConstantExpr
     31#include "SynTree/Statement.h"     // for AsmStmt
     32#include "SynTree/Type.h"          // for Type, Type::StorageClasses, Type::...
     33#include "TypeData.h"              // for TypeData, TypeData::Aggregate_t
     34#include "TypedefTable.h"          // for TypedefTable, TypedefTable::kind_t...
     35
     36class Initializer;
     37
    2938extern TypedefTable typedefTable;
    3039
  • src/Parser/ExpressionNode.cc

    rfc56cdbf r8135d4c  
    1414//
    1515
    16 #include <climits>                                                                              // access INT_MAX, UINT_MAX, LONG_MAX, ULONG_MAX, LLONG_MAX
    17 #include <sstream>
    18 
    19 #include "ParseNode.h"
    20 #include "TypeData.h"
    21 #include "SynTree/Constant.h"
    22 #include "SynTree/Expression.h"
    23 #include "SynTree/Declaration.h"
    24 #include "parserutility.h"
     16#include <cassert>                 // for assert
     17#include <stdio.h>                 // for sscanf, size_t
     18#include <climits>                 // for LLONG_MAX, LONG_MAX, INT_MAX, UINT...
     19#include <list>                    // for list
     20#include <sstream>                 // for basic_istream::operator>>, basic_i...
     21#include <string>                  // for string, operator+, operator==
     22
     23#include "Common/SemanticError.h"  // for SemanticError
     24#include "Common/utility.h"        // for maybeMoveBuild, maybeBuild, CodeLo...
     25#include "ParseNode.h"             // for ExpressionNode, maybeMoveBuildType
     26#include "SynTree/Constant.h"      // for Constant
     27#include "SynTree/Declaration.h"   // for EnumDecl, StructDecl, UnionDecl
     28#include "SynTree/Expression.h"    // for Expression, ConstantExpr, NameExpr
     29#include "SynTree/Statement.h"     // for CompoundStmt, Statement
     30#include "SynTree/Type.h"          // for BasicType, Type, Type::Qualifiers
     31#include "parserutility.h"         // for notZeroExpr
     32
     33class Initializer;
    2534
    2635using namespace std;
     
    6978                goto CLEANUP;
    7079        } // if
    71        
     80
    7281        if ( str[0] == '0' ) {                                                          // octal/hex constant ?
    7382                dec = false;
  • src/Parser/InitializerNode.cc

    rfc56cdbf r8135d4c  
    1414//
    1515
    16 #include <cassert>
    17 #include <iostream>
     16#include <iostream>                // for operator<<, ostream, basic_ostream
     17#include <list>                    // for list
     18#include <string>                  // for operator<<, string
     19
    1820using namespace std;
    1921
    20 #include "ParseNode.h"
    21 #include "SynTree/Expression.h"
    22 #include "SynTree/Initializer.h"
     22#include "Common/SemanticError.h"  // for SemanticError
     23#include "Common/utility.h"        // for maybeBuild
     24#include "ParseNode.h"             // for InitializerNode, ExpressionNode
     25#include "SynTree/Expression.h"    // for Expression
     26#include "SynTree/Initializer.h"   // for Initializer, ListInit, SingleInit
    2327
    2428InitializerNode::InitializerNode( ExpressionNode * _expr, bool aggrp, ExpressionNode * des )
  • src/Parser/ParseNode.h

    rfc56cdbf r8135d4c  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thu Aug 10 16:54:00 2017
    13 // Update Count     : 789
     12// Last Modified On : Thr Aug 17 13:46:00 2017
     13// Update Count     : 795
    1414//
    1515
    1616#pragma once
    1717
    18 #include <string>
    19 #include <list>
    20 #include <iterator>
    21 #include <memory>
    22 
    23 #include "Parser/LinkageSpec.h"
    24 #include "SynTree/Type.h"
    25 #include "SynTree/Expression.h"
    26 #include "SynTree/Statement.h"
    27 #include "SynTree/Label.h"
    28 #include "Common/utility.h"
    29 #include "Common/UniqueName.h"
    30 
     18#include <algorithm>               // for move
     19#include <cassert>                 // for assert, assertf
     20#include <iosfwd>                  // for ostream
     21#include <iterator>                // for back_insert_iterator
     22#include <list>                    // for list
     23#include <memory>                  // for unique_ptr, pointer_traits
     24#include <string>                  // for string
     25
     26#include "Common/CodeLocation.h"   // for CodeLocation
     27#include "Common/SemanticError.h"  // for SemanticError
     28#include "Common/UniqueName.h"     // for UniqueName
     29#include "Common/utility.h"        // for maybeClone, maybeBuild
     30#include "Parser/LinkageSpec.h"    // for Spec
     31#include "SynTree/Expression.h"    // for Expression, ConstantExpr (ptr only)
     32#include "SynTree/Label.h"         // for Label
     33#include "SynTree/Statement.h"     // for Statement, BranchStmt, BranchStmt:...
     34#include "SynTree/Type.h"          // for Type, Type::FuncSpecifiers, Type::...
     35
     36class Attribute;
     37class Declaration;
     38class DeclarationNode;
     39class DeclarationWithType;
     40class ExpressionNode;
     41class Initializer;
    3142class StatementNode;
    32 class CompoundStmtNode;
    33 class DeclarationNode;
    34 class ExpressionNode;
    35 class InitializerNode;
    36 class Attribute;
    3743
    3844//##############################################################################
     
    371377Statement * build_expr( ExpressionNode * ctl );
    372378
     379struct IfCtl {
     380        IfCtl( DeclarationNode * decl, ExpressionNode * condition ) :
     381                init( decl ? new StatementNode( decl ) : nullptr ), condition( condition ) {}
     382
     383        StatementNode * init;
     384        ExpressionNode * condition;
     385};
     386
    373387struct ForCtl {
    374388        ForCtl( ExpressionNode * expr, ExpressionNode * condition, ExpressionNode * change ) :
     
    382396};
    383397
    384 Statement * build_if( ExpressionNode * ctl, StatementNode * then_stmt, StatementNode * else_stmt );
     398Statement * build_if( IfCtl * ctl, StatementNode * then_stmt, StatementNode * else_stmt );
    385399Statement * build_switch( ExpressionNode * ctl, StatementNode * stmt );
    386400Statement * build_case( ExpressionNode * ctl );
  • src/Parser/StatementNode.cc

    rfc56cdbf r8135d4c  
    1010// Created On       : Sat May 16 14:59:41 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul 11 21:23:15 2017
    13 // Update Count     : 331
    14 //
    15 
    16 #include <list>
    17 #include <algorithm>
    18 #include <cassert>
    19 
    20 #include "ParseNode.h"
    21 #include "SynTree/Statement.h"
    22 #include "SynTree/Expression.h"
    23 #include "parserutility.h"
    24 #include "Common/utility.h"
     12// Last Modified On : Thu Aug 17 16:01:31 2017
     13// Update Count     : 345
     14//
     15
     16#include <cassert>                 // for assert, safe_dynamic_cast, assertf
     17#include <list>                    // for list
     18#include <memory>                  // for unique_ptr
     19#include <string>                  // for string
     20
     21#include "Common/SemanticError.h"  // for SemanticError
     22#include "Common/utility.h"        // for maybeMoveBuild, maybeBuild
     23#include "ParseNode.h"             // for StatementNode, ExpressionNode, bui...
     24#include "SynTree/Expression.h"    // for Expression, ConstantExpr
     25#include "SynTree/Label.h"         // for Label, noLabels
     26#include "SynTree/Declaration.h"
     27#include "SynTree/Statement.h"     // for Statement, BranchStmt, CaseStmt
     28#include "parserutility.h"         // for notZeroExpr
     29
     30class Declaration;
    2531
    2632using namespace std;
     
    7480}
    7581
    76 Statement *build_if( ExpressionNode *ctl, StatementNode *then_stmt, StatementNode *else_stmt ) {
     82Statement *build_if( IfCtl * ctl, StatementNode *then_stmt, StatementNode *else_stmt ) {
    7783        Statement *thenb, *elseb = 0;
    7884        std::list< Statement * > branches;
     
    8793                elseb = branches.front();
    8894        } // if
    89         return new IfStmt( noLabels, notZeroExpr( maybeMoveBuild< Expression >(ctl) ), thenb, elseb );
     95       
     96        std::list< Statement * > init;
     97        if ( ctl->init != 0 ) {
     98                buildMoveList( ctl->init, init );
     99        } // if
     100
     101        Expression * cond = ctl->condition ? maybeMoveBuild< Expression >(ctl->condition) : new VariableExpr( dynamic_cast<DeclarationWithType *>( dynamic_cast<DeclStmt *>( init.back() )->decl ) );
     102        delete ctl;
     103        return new IfStmt( noLabels, notZeroExpr( cond ), thenb, elseb, init );
    90104}
    91105
  • src/Parser/TypeData.cc

    rfc56cdbf r8135d4c  
    1414//
    1515
    16 #include <cassert>
    17 #include <algorithm>
    18 #include <iterator>
    19 #include "Common/utility.h"
     16#include <cassert>                 // for assert
     17#include <ostream>                 // for operator<<, ostream, basic_ostream
     18
     19#include "Common/SemanticError.h"  // for SemanticError
     20#include "Common/utility.h"        // for maybeClone, maybeBuild, maybeMoveB...
     21#include "Parser/ParseNode.h"      // for DeclarationNode, ExpressionNode
     22#include "SynTree/Declaration.h"   // for TypeDecl, ObjectDecl, FunctionDecl
     23#include "SynTree/Expression.h"    // for Expression, ConstantExpr (ptr only)
     24#include "SynTree/Initializer.h"   // for SingleInit, Initializer (ptr only)
     25#include "SynTree/Statement.h"     // for CompoundStmt, Statement
     26#include "SynTree/Type.h"          // for BasicType, Type, Type::ForallList
    2027#include "TypeData.h"
    21 #include "SynTree/Type.h"
    22 #include "SynTree/Declaration.h"
    23 #include "SynTree/Expression.h"
    24 #include "SynTree/Statement.h"
    25 #include "SynTree/Initializer.h"
     28
     29class Attribute;
     30
    2631using namespace std;
    2732
  • src/Parser/TypeData.h

    rfc56cdbf r8135d4c  
    1616#pragma once
    1717
    18 #include "ParseNode.h"
    19 #include "SynTree/Type.h"
     18#include <iosfwd>                // for ostream
     19#include <list>                  // for list
     20#include <string>                // for string
     21
     22#include "ParseNode.h"           // for DeclarationNode, DeclarationNode::Ag...
     23#include "Parser/LinkageSpec.h"  // for Spec
     24#include "SynTree/Type.h"        // for Type, ReferenceToType (ptr only)
     25#include "SynTree/SynTree.h"     // for Visitor Nodes
    2026
    2127struct TypeData {
  • src/Parser/TypedefTable.cc

    rfc56cdbf r8135d4c  
    1414//
    1515
    16 #include <map>
    17 #include <list>
    18 #include <cassert>
     16#include <ext/alloc_traits.h>    // for __alloc_traits<>::value_type
     17#include <cassert>               // for assert
     18#include <list>                  // for list, _List_iterator, list<>::iterator
     19#include <map>                   // for _Rb_tree_iterator, _Rb_tree_const_it...
     20#include <memory>                // for allocator_traits<>::value_type
     21#include <utility>               // for pair
     22
     23#include "Parser/ParserTypes.h"  // for typedefTable
     24#include "Parser/parser.hh"      // for IDENTIFIER
    1925#include "TypedefTable.h"
     26
    2027using namespace std;
    2128
    2229#if 0
    2330#include <iostream>
     31
    2432#define debugPrint( x ) cerr << x
    2533#else
  • src/Parser/TypedefTable.h

    rfc56cdbf r8135d4c  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // TypedefTable.h -- 
     7// TypedefTable.h --
    88//
    99// Author           : Rodolfo G. Esteves
     
    1616#pragma once
    1717
    18 #include <map>
    19 #include <list>
    20 #include <string>
    21 #include <stack>
     18#include <list>       // for list
     19#include <map>        // for map, map<>::value_compare
     20#include <stack>      // for stack
     21#include <string>     // for string
    2222
    2323#include "ParserTypes.h"
    24 #include "parser.hh"
     24#include "parser.hh"  // for IDENTIFIER, TYPEDEFname, TYPEGENname
    2525
    2626class TypedefTable {
     
    3232                kind_t kind;
    3333        };
    34        
     34
    3535        struct DeferredEntry {
    3636                std::string identifier;
     
    4444        std::string currentTrait;
    4545        int contextScope;
    46        
     46
    4747        typedef std::list< DeferredEntry > deferListType;
    4848        std::stack< deferListType > deferListStack;
    4949        std::map< std::string, deferListType > contexts;
    50        
     50
    5151        std::stack< std::string > nextIdentifiers;
    5252
     
    7070        void addToEnclosingScope( const std::string &identifier, kind_t kind );
    7171        void addToEnclosingScope( kind_t kind );                // use nextIdentifiers.top()
    72        
     72
    7373        // "addToEnclosingScope2" adds the identifier/type pair to the scope that encloses the scope enclosing the the
    7474        // current one.  This is the right way to handle assertion names
    7575        void addToEnclosingScope2( const std::string &identifier, kind_t kind );
    7676        void addToEnclosingScope2( kind_t kind );               // use nextIdentifiers.top()
    77        
     77
    7878        // set the next identifier to be used by an "add" operation without an identifier parameter within the current scope
    7979        void setNextIdentifier( const std::string &identifier );
    80        
     80
    8181        // dump the definitions from a pre-defined context into the current scope
    8282        void openTrait( const std::string &contextName );
    83        
     83
    8484        void enterScope();
    8585        void leaveScope();
  • src/Parser/parser.yy

    rfc56cdbf r8135d4c  
    99// Author           : Peter A. Buhr
    1010// Created On       : Sat Sep  1 20:22:55 2001
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Aug  4 13:33:00 2017
    13 // Update Count     : 2475
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sun Aug 20 09:21:54 2017
     13// Update Count     : 2573
    1414//
    1515
     
    9898        StatementNode * sn;
    9999        ConstantExpr * constant;
     100        IfCtl * ifctl;
    100101        ForCtl * fctl;
    101102        LabelNode * label;
     
    130131%token ATTRIBUTE EXTENSION                                                              // GCC
    131132%token IF ELSE SWITCH CASE DEFAULT DO WHILE FOR BREAK CONTINUE GOTO RETURN
    132 %token CHOOSE DISABLE ENABLE FALLTHRU TRY CATCH CATCHRESUME FINALLY THROW THROWRESUME AT WITH   // CFA
     133%token CHOOSE DISABLE ENABLE FALLTHRU TRY CATCH CATCHRESUME FINALLY THROW THROWRESUME AT WITH // CFA
    133134%token ASM                                                                                              // C99, extension ISO/IEC 9899:1999 Section J.5.10(1)
    134135%token ALIGNAS ALIGNOF GENERIC STATICASSERT                             // C11
     
    175176%type<en> comma_expression                              comma_expression_opt
    176177%type<en> argument_expression_list              argument_expression                     default_initialize_opt
     178%type<ifctl> if_control_expression
    177179%type<fctl> for_control_expression
    178180%type<en> subrange
     
    794796
    795797selection_statement:
    796         IF '(' comma_expression ')' statement                           %prec THEN
     798        IF '(' push if_control_expression ')' statement                         %prec THEN
    797799                // explicitly deal with the shift/reduce conflict on if/else
    798                 { $$ = new StatementNode( build_if( $3, $5, nullptr ) ); }
    799         | IF '(' comma_expression ')' statement ELSE statement
    800                 { $$ = new StatementNode( build_if( $3, $5, $7 ) ); }
    801         | SWITCH '(' comma_expression ')' case_clause           // CFA
     800                { $$ = new StatementNode( build_if( $4, $6, nullptr ) ); }
     801        | IF '(' push if_control_expression ')' statement ELSE statement
     802                { $$ = new StatementNode( build_if( $4, $6, $8 ) ); }
     803        | SWITCH '(' comma_expression ')' case_clause
    802804                { $$ = new StatementNode( build_switch( $3, $5 ) ); }
    803805        | SWITCH '(' comma_expression ')' '{' push declaration_list_opt switch_clause_list_opt '}' // CFA
     
    819821                }
    820822        ;
     823
     824if_control_expression:
     825        comma_expression pop
     826                { $$ = new IfCtl( nullptr, $1 ); }
     827        | c_declaration pop                                                                     // no semi-colon
     828                { $$ = new IfCtl( $1, nullptr ); }
     829        | cfa_declaration pop                                                           // no semi-colon
     830                { $$ = new IfCtl( $1, nullptr ); }
     831        | declaration comma_expression                                          // semi-colon separated
     832                { $$ = new IfCtl( $1, $2 ); }
     833        ;
    821834
    822835// CASE and DEFAULT clauses are only allowed in the SWITCH statement, precluding Duff's device. In addition, a case
     
    10911104
    10921105KR_declaration_list_opt:                                                                // used to declare parameter types in K&R style functions
    1093         pop
     1106        // empty
    10941107                { $$ = nullptr; }
    10951108        | KR_declaration_list
     
    10971110
    10981111KR_declaration_list:
    1099         c_declaration
    1100         | KR_declaration_list push c_declaration
     1112        push c_declaration pop ';'
     1113                { $$ = $2; }
     1114        | KR_declaration_list push c_declaration pop ';'
    11011115                { $$ = $1->appendList( $3 ); }
    11021116        ;
     
    11171131        ;
    11181132
    1119 declaration:                                                                                    // CFA, new & old style declarations
    1120         cfa_declaration
    1121         | c_declaration
     1133declaration:                                                                                    // old & new style declarations
     1134        c_declaration pop ';'
     1135        | cfa_declaration pop ';'                                                       // CFA
    11221136        ;
    11231137
     
    11341148
    11351149cfa_declaration:                                                                                // CFA
    1136         cfa_variable_declaration pop ';'
    1137         | cfa_typedef_declaration pop ';'
    1138         | cfa_function_declaration pop ';'
    1139         | type_declaring_list pop ';'
    1140         | trait_specifier pop ';'
     1150        cfa_variable_declaration
     1151        | cfa_typedef_declaration
     1152        | cfa_function_declaration
     1153        | type_declaring_list
     1154        | trait_specifier
    11411155        ;
    11421156
     
    13381352
    13391353c_declaration:
    1340         declaration_specifier declaring_list pop ';'
     1354        declaration_specifier declaring_list
    13411355                {
    13421356                        $$ = distAttr( $1, $2 );
    13431357                }
    1344         | typedef_declaration pop ';'
    1345         | typedef_expression pop ';'                                            // GCC, naming expression type
    1346         | sue_declaration_specifier pop ';'
     1358        | typedef_declaration
     1359        | typedef_expression                                                            // GCC, naming expression type
     1360        | sue_declaration_specifier
    13471361        ;
    13481362
     
    22152229                        $$ = $1->addFunctionBody( $2 );
    22162230                }
    2217         | KR_function_declarator push KR_declaration_list_opt compound_statement
     2231        | KR_function_declarator KR_declaration_list_opt compound_statement
    22182232                {
    22192233                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    22202234                        typedefTable.leaveScope();
    2221                         $$ = $1->addOldDeclList( $3 )->addFunctionBody( $4 );
     2235                        $$ = $1->addOldDeclList( $2 )->addFunctionBody( $3 );
    22222236                }
    22232237        ;
     
    22632277
    22642278                // Old-style K&R function definition, OBSOLESCENT (see 4)
    2265         | declaration_specifier KR_function_declarator push KR_declaration_list_opt with_clause_opt compound_statement
     2279        | declaration_specifier KR_function_declarator KR_declaration_list_opt with_clause_opt compound_statement
    22662280                {
    22672281                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    22682282                        typedefTable.leaveScope();
    2269                         $$ = $2->addOldDeclList( $4 )->addFunctionBody( $6 )->addType( $1 );
    2270                 }
    2271         | type_qualifier_list KR_function_declarator push KR_declaration_list_opt with_clause_opt compound_statement
     2283                        $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5 )->addType( $1 );
     2284                }
     2285        | type_qualifier_list KR_function_declarator KR_declaration_list_opt with_clause_opt compound_statement
    22722286                {
    22732287                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    22742288                        typedefTable.leaveScope();
    2275                         $$ = $2->addOldDeclList( $4 )->addFunctionBody( $6 )->addQualifiers( $1 );
     2289                        $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5 )->addQualifiers( $1 );
    22762290                }
    22772291
    22782292                // Old-style K&R function definition with "implicit int" type_specifier, OBSOLESCENT (see 4)
    2279         | declaration_qualifier_list KR_function_declarator push KR_declaration_list_opt with_clause_opt compound_statement
     2293        | declaration_qualifier_list KR_function_declarator KR_declaration_list_opt with_clause_opt compound_statement
    22802294                {
    22812295                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    22822296                        typedefTable.leaveScope();
    2283                         $$ = $2->addOldDeclList( $4 )->addFunctionBody( $6 )->addQualifiers( $1 );
    2284                 }
    2285         | declaration_qualifier_list type_qualifier_list KR_function_declarator push KR_declaration_list_opt with_clause_opt compound_statement
     2297                        $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5 )->addQualifiers( $1 );
     2298                }
     2299        | declaration_qualifier_list type_qualifier_list KR_function_declarator KR_declaration_list_opt with_clause_opt compound_statement
    22862300                {
    22872301                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    22882302                        typedefTable.leaveScope();
    2289                         $$ = $3->addOldDeclList( $5 )->addFunctionBody( $7 )->addQualifiers( $2 )->addQualifiers( $1 );
     2303                        $$ = $3->addOldDeclList( $4 )->addFunctionBody( $6 )->addQualifiers( $2 )->addQualifiers( $1 );
    22902304                }
    22912305        ;
  • src/Parser/parserutility.cc

    rfc56cdbf r8135d4c  
    1515
    1616#include "parserutility.h"
    17 #include "SynTree/Type.h"
    18 #include "SynTree/Expression.h"
     17
     18#include <list>                  // for list
     19#include <string>                // for string
     20
     21#include "SynTree/Constant.h"    // for Constant
     22#include "SynTree/Expression.h"  // for UntypedExpr, CastExpr, ConstantExpr
     23#include "SynTree/Type.h"        // for BasicType, ZeroType, BasicType::Kind...
    1924
    2025// rewrite
  • src/Parser/parserutility.h

    rfc56cdbf r8135d4c  
    1616#pragma once
    1717
    18 #include "SynTree/SynTree.h"
     18class Expression;
    1919
    2020Expression *notZeroExpr( Expression *orig );
Note: See TracChangeset for help on using the changeset viewer.