Changeset 39f04ec
- Timestamp:
- Jul 5, 2016, 11:10:14 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 9bb81bb8
- Parents:
- a43e1d7 (diff), d32c4e2 (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. - Location:
- src
- Files:
-
- 2 added
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
ra43e1d7 r39f04ec 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 9 13:21:00201613 // Update Count : 25612 // Last Modified On : Mon Jul 4 20:38:32 2016 13 // Update Count : 300 14 14 // 15 15 … … 47 47 dynamic_cast< WhileStmt * >( stmt ) || dynamic_cast< ForStmt * > ( stmt ) || dynamic_cast< SwitchStmt *>( stmt ); 48 48 } 49 50 void CodeGenerator::extension( Expression *expr ) { 51 if ( expr->get_extension() ) { 52 output << "__extension__ "; 53 } // if 54 } // extension 55 56 void CodeGenerator::extension( Declaration *decl ) { 57 if ( decl->get_extension() ) { 58 output << "__extension__ "; 59 } // if 60 } // extension 49 61 50 62 ostream & CodeGenerator::Indenter::operator()( ostream & output ) const { … … 110 122 //*** Declarations 111 123 void CodeGenerator::visit( FunctionDecl *functionDecl ) { 124 extension( functionDecl ); 112 125 genAttributes( functionDecl->get_attributes() ); 113 126 … … 134 147 135 148 void CodeGenerator::visit( ObjectDecl *objectDecl ) { 149 extension( objectDecl ); 136 150 handleStorageClass( objectDecl ); 137 151 output << genType( objectDecl->get_type(), mangleName( objectDecl ) ); … … 170 184 171 185 void CodeGenerator::visit( StructDecl *structDecl ) { 186 extension( structDecl ); 172 187 output << "struct "; 173 188 handleAggregate( structDecl ); 174 189 } 175 190 176 void CodeGenerator::visit( UnionDecl *aggregateDecl ) { 191 void CodeGenerator::visit( UnionDecl *unionDecl ) { 192 extension( unionDecl ); 177 193 output << "union "; 178 handleAggregate( aggregateDecl ); 179 } 180 181 void CodeGenerator::visit( EnumDecl *aggDecl ) { 194 handleAggregate( unionDecl ); 195 } 196 197 void CodeGenerator::visit( EnumDecl *enumDecl ) { 198 extension( enumDecl ); 182 199 output << "enum "; 183 200 184 if ( aggDecl->get_name() != "" )185 output << aggDecl->get_name();186 187 std::list< Declaration* > &memb = aggDecl->get_members();201 if ( enumDecl->get_name() != "" ) 202 output << enumDecl->get_name(); 203 204 std::list< Declaration* > &memb = enumDecl->get_members(); 188 205 189 206 if ( ! memb.empty() ) { … … 208 225 } 209 226 210 void CodeGenerator::visit( TraitDecl * aggregateDecl ) {}227 void CodeGenerator::visit( TraitDecl *traitDecl ) {} 211 228 212 229 void CodeGenerator::visit( TypedefDecl *typeDecl ) { 213 output << "typedef "; 214 output << genType( typeDecl->get_base(), typeDecl->get_name() ); 230 assert( false && "Typedefs are removed and substituted in earlier passes." ); 231 //output << "typedef "; 232 //output << genType( typeDecl->get_base(), typeDecl->get_name() ); 215 233 } 216 234 … … 218 236 // really, we should mutate this into something that isn't a TypeDecl but that requires large-scale changes, 219 237 // still to be done 238 extension( typeDecl ); 220 239 output << "extern unsigned long " << typeDecl->get_name(); 221 240 if ( typeDecl->get_base() ) { … … 251 270 output << "{ "; 252 271 if ( init->begin_initializers() == init->end_initializers() ) { 253 // illegal to leave initializer list empty for scalar initializers, 254 // but always legal to have 0 272 // illegal to leave initializer list empty for scalar initializers, but always legal to have 0 255 273 output << "0"; 256 274 } else { … … 317 335 case OT_DTOR: 318 336 if ( applicationExpr->get_args().size() == 1 ) { 319 // the expression fed into a single parameter constructor or destructor 320 // may contain sideeffects, so must still output this expression337 // the expression fed into a single parameter constructor or destructor may contain side 338 // effects, so must still output this expression 321 339 output << "("; 322 340 (*arg++)->accept( *this ); … … 403 421 case OT_DTOR: 404 422 if ( untypedExpr->get_args().size() == 1 ) { 405 // the expression fed into a single parameter constructor or destructor 406 // may contain sideeffects, so must still output this expression423 // the expression fed into a single parameter constructor or destructor may contain side 424 // effects, so must still output this expression 407 425 output << "("; 408 426 (*arg++)->accept( *this ); … … 500 518 output << ")"; 501 519 } else { 502 // otherwise, the cast is to an lvalue type, so the cast 503 // should be dropped, since the result of a cast is 520 // otherwise, the cast is to an lvalue type, so the cast should be dropped, since the result of a cast is 504 521 // never an lvalue in C 505 522 } … … 546 563 547 564 void CodeGenerator::visit( AlignofExpr *alignofExpr ) { 565 // use GCC extension to avoid bumping std to C11 548 566 extension( alignofExpr ); 549 // use GCC extension to avoid bumping std to C11550 567 output << "__alignof__("; 551 568 if ( alignofExpr->get_isType() ) { … … 558 575 559 576 void CodeGenerator::visit( UntypedOffsetofExpr *offsetofExpr ) { 560 assert( false && "UntypedOffsetofExpr should not reach code generation " );577 assert( false && "UntypedOffsetofExpr should not reach code generation." ); 561 578 } 562 579 563 580 void CodeGenerator::visit( OffsetofExpr *offsetofExpr ) { 564 extension( offsetofExpr );565 581 // use GCC builtin 566 582 output << "__builtin_offsetof("; … … 571 587 572 588 void CodeGenerator::visit( OffsetPackExpr *offsetPackExpr ) { 573 assert( false && "OffsetPackExpr should not reach code generation " );589 assert( false && "OffsetPackExpr should not reach code generation." ); 574 590 } 575 591 … … 612 628 613 629 void CodeGenerator::visit( AsmExpr *asmExpr ) { 614 extension( asmExpr );615 630 if ( asmExpr->get_inout() ) { 616 631 output << "[ "; … … 777 792 778 793 void CodeGenerator::visit( ForStmt *forStmt ) { 779 // initialization is always hoisted, so don't 780 // bother doing anything with that 794 // initialization is always hoisted, so don't bother doing anything with that 781 795 output << "for (;"; 782 796 -
src/CodeGen/CodeGenerator.h
ra43e1d7 r39f04ec 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 9 13:15:58201613 // Update Count : 2912 // Last Modified On : Mon Jul 4 17:12:40 2016 13 // Update Count : 34 14 14 // 15 15 … … 104 104 }; 105 105 106 void extension( Expression *expr ) { 107 if ( expr->get_extension() ) { 108 output << "__extension__ "; 109 } // if 110 } // extension 106 void extension( Expression *expr ); 107 void extension( Declaration *decl ); 111 108 private: 112 109 … … 121 118 void handleAggregate( AggregateDecl *aggDecl ); 122 119 void handleTypedef( NamedTypeDecl *namedType ); 123 124 120 }; 125 121 -
src/ControlStruct/CaseRangeMutator.cc
ra43e1d7 r39f04ec 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jan 25 21:22:40201613 // Update Count : 412 // Last Modified On : Thu Jun 30 13:28:55 2016 13 // Update Count : 8 14 14 // 15 15 -
src/GenPoly/Box.cc
ra43e1d7 r39f04ec 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Fri May 13 14:51:21201613 // Update Count : 29 511 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 29 21:43:03 2016 13 // Update Count : 296 14 14 // 15 15 … … 2294 2294 // all union members are at offset zero 2295 2295 delete offsetofExpr; 2296 return new ConstantExpr( Constant( new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), std::string("0")) );2296 return new ConstantExpr( Constant( new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), "0" ) ); 2297 2297 } else return offsetofExpr; 2298 2298 } -
src/GenPoly/GenPoly.cc
ra43e1d7 r39f04ec 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed May 25 13:39:21201613 // Update Count : 1 311 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 29 21:45:53 2016 13 // Update Count : 14 14 14 // 15 15 … … 78 78 type = replaceTypeInst( type, env ); 79 79 80 if ( TypeInstType *typeInst =dynamic_cast< TypeInstType * >( type ) ) {80 if ( dynamic_cast< TypeInstType * >( type ) ) { 81 81 return type; 82 82 } else if ( StructInstType *structType = dynamic_cast< StructInstType* >( type ) ) { -
src/InitTweak/FixGlobalInit.cc
ra43e1d7 r39f04ec 9 9 // Author : Rob Schluntz 10 10 // Created On : Mon May 04 15:14:56 2016 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Fri May 13 11:37:30201613 // Update Count : 211 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 29 22:33:15 2016 13 // Update Count : 4 14 14 // 15 15 … … 85 85 init->accept( checker ); 86 86 return checker.isConstExpr; 87 } 87 } // if 88 88 // for all intents and purposes, no initializer means const expr 89 89 return true; … … 98 98 } else { 99 99 translationUnit.push_back( fixer.initFunction ); 100 } 100 } // if 101 101 102 if ( fixer.destroyFunction->get_statements()->get_kids().empty() ) { 102 103 delete fixer.destroyFunction; 103 104 } else { 104 105 translationUnit.push_back( fixer.destroyFunction ); 105 } 106 } // if 106 107 } 107 108 … … 146 147 // if ( isConstExpr( objDecl->get_init() ) ) return; 147 148 148 if ( ArrayType * at =dynamic_cast< ArrayType * > ( objDecl->get_type() ) ) {149 if ( dynamic_cast< ArrayType * > ( objDecl->get_type() ) ) { 149 150 // xxx - initialize each element of the array 150 151 } else { … … 164 165 destroy->get_args().push_back( new AddressExpr( new VariableExpr( objDecl ) ) ); 165 166 destroyStatements.push_front( new ImplicitCtorDtorStmt( new ExprStmt( noLabels, destroy ) ) ); 166 } 167 } // if 167 168 } 168 169 -
src/InitTweak/FixInit.cc
ra43e1d7 r39f04ec 449 449 FunctionDecl * dtorCaller = new FunctionDecl( objDecl->get_mangleName() + "_dtor_atexit", DeclarationNode::NoStorageClass, LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt( noLabels ), false, false ); 450 450 dtorCaller->fixUniqueId(); 451 dtorCaller->get_statements()->get_kids().push_back( ctorInit->get_dtor() );451 dtorCaller->get_statements()->get_kids().push_back( ctorInit->get_dtor()->clone() ); 452 452 453 453 // on_exit(dtor_atexit); -
src/Parser/DeclarationNode.cc
ra43e1d7 r39f04ec 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 12:34:05 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Thu Apr 14 15:38:09201613 // Update Count : 16 111 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 30 14:39:51 2016 13 // Update Count : 163 14 14 // 15 15 … … 855 855 Declaration *DeclarationNode::build() const { 856 856 if ( type ) { 857 Declaration *newDecl = type->buildDecl( name, buildStorageClass(), maybeBuild< Expression >( bitfieldWidth ), buildFuncSpecifier( Inline ), buildFuncSpecifier( Noreturn ), linkage, maybeBuild< Initializer >(initializer) ); 858 return newDecl; 857 return type->buildDecl( name, buildStorageClass(), maybeBuild< Expression >( bitfieldWidth ), buildFuncSpecifier( Inline ), buildFuncSpecifier( Noreturn ), linkage, maybeBuild< Initializer >(initializer) )->set_extension( extension ); 859 858 } // if 860 859 if ( ! buildFuncSpecifier( Inline ) && ! buildFuncSpecifier( Noreturn ) ) { 861 return new ObjectDecl( name, buildStorageClass(), linkage, maybeBuild< Expression >( bitfieldWidth ), 0, maybeBuild< Initializer >( initializer ));860 return (new ObjectDecl( name, buildStorageClass(), linkage, maybeBuild< Expression >( bitfieldWidth ), 0, maybeBuild< Initializer >( initializer ) ))->set_extension( extension ); 862 861 } // if 863 862 throw SemanticError( "invalid function specifier in declaration of ", this ); -
src/Parser/ExpressionNode.cc
ra43e1d7 r39f04ec 10 10 // Created On : Sat May 16 13:17:07 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jun 13 14:46:17201613 // Update Count : 3 0712 // Last Modified On : Thu Jun 30 13:33:16 2016 13 // Update Count : 319 14 14 // 15 15 … … 19 19 #include <sstream> 20 20 #include <cstdio> 21 #include <climits>22 21 23 22 #include "ParseNode.h" … … 90 89 //############################################################################## 91 90 92 static inline bool checkU( char c ) { return c == 'u' || c == 'U'; } 93 static inline bool checkL( char c ) { return c == 'l' || c == 'L'; } 94 static inline bool checkF( char c ) { return c == 'f' || c == 'F'; } 95 static inline bool checkD( char c ) { return c == 'd' || c == 'D'; } 96 static inline bool checkI( char c ) { return c == 'i' || c == 'I'; } 97 static inline bool checkX( char c ) { return c == 'x' || c == 'X'; } 98 99 // Difficult to separate extra parts of constants during lexing because actions are not allow in the middle of patterns: 100 // 101 // prefix action constant action suffix 102 // 103 // Alternatively, breaking a pattern using BEGIN does not work if the following pattern can be empty: 104 // 105 // constant BEGIN CONT ... 106 // <CONT>(...)? BEGIN 0 ... // possible empty suffix 107 // 108 // because the CONT rule is NOT triggered if the pattern is empty. Hence, constants are reparsed here to determine their 109 // type. 110 111 ConstantNode::ConstantNode( Type t, string *inVal ) : type( t ), value( *inVal ) { 112 // lexing divides constants into 4 kinds 113 switch ( type ) { 114 case Integer: 115 { 116 static const BasicType::Kind kind[2][3] = { 117 { BasicType::SignedInt, BasicType::LongSignedInt, BasicType::LongLongSignedInt }, 118 { BasicType::UnsignedInt, BasicType::LongUnsignedInt, BasicType::LongLongUnsignedInt }, 119 }; 120 bool dec = true, Unsigned = false; // decimal, unsigned constant 121 int size; // 0 => int, 1 => long, 2 => long long 122 unsigned long long v; // converted integral value 123 size_t last = value.length() - 1; // last character of constant 124 125 if ( value[0] == '0' ) { // octal constant ? 126 dec = false; 127 if ( last != 0 && checkX( value[1] ) ) { // hex constant ? 128 sscanf( (char *)value.c_str(), "%llx", &v ); 129 //printf( "%llx %llu\n", v, v ); 130 } else { 131 sscanf( (char *)value.c_str(), "%llo", &v ); 132 //printf( "%llo %llu\n", v, v ); 133 } // if 134 } else { // decimal constant ? 135 sscanf( (char *)value.c_str(), "%llu", &v ); 136 //printf( "%llu %llu\n", v, v ); 137 } // if 138 139 if ( v <= INT_MAX ) { // signed int 140 size = 0; 141 } else if ( v <= UINT_MAX && ! dec ) { // unsigned int 142 size = 0; 143 Unsigned = true; // unsigned 144 } else if ( v <= LONG_MAX ) { // signed long int 145 size = 1; 146 } else if ( v <= ULONG_MAX && ( ! dec || LONG_MAX == LLONG_MAX ) ) { // signed long int 147 size = 1; 148 Unsigned = true; // unsigned long int 149 } else if ( v <= LLONG_MAX ) { // signed long long int 150 size = 2; 151 } else { // unsigned long long int 152 size = 2; 153 Unsigned = true; // unsigned long long int 154 } // if 155 156 if ( checkU( value[last] ) ) { // suffix 'u' ? 157 Unsigned = true; 158 if ( last > 0 && checkL( value[ last - 1 ] ) ) { // suffix 'l' ? 159 size = 1; 160 if ( last > 1 && checkL( value[ last - 2 ] ) ) { // suffix 'll' ? 161 size = 2; 162 } // if 163 } // if 164 } else if ( checkL( value[ last ] ) ) { // suffix 'l' ? 165 size = 1; 166 if ( last > 0 && checkL( value[ last - 1 ] ) ) { // suffix 'll' ? 167 size = 2; 168 if ( last > 1 && checkU( value[ last - 2 ] ) ) { // suffix 'u' ? 169 Unsigned = true; 170 } // if 171 } else { 172 if ( last > 0 && checkU( value[ last - 1 ] ) ) { // suffix 'u' ? 173 Unsigned = true; 174 } // if 175 } // if 176 } // if 177 btype = kind[Unsigned][size]; // lookup constant type 178 break; 179 } 180 case Float: 181 { 182 static const BasicType::Kind kind[2][3] = { 183 { BasicType::Float, BasicType::Double, BasicType::LongDouble }, 184 { BasicType::FloatComplex, BasicType::DoubleComplex, BasicType::LongDoubleComplex }, 185 }; 186 bool complx = false; // real, complex 187 int size = 1; // 0 => float, 1 => double (default), 2 => long double 188 // floating-point constant has minimum of 2 characters: 1. or .1 189 size_t last = value.length() - 1; 190 191 if ( checkI( value[last] ) ) { // imaginary ? 192 complx = true; 193 last -= 1; // backup one character 194 } // if 195 if ( checkF( value[last] ) ) { // float ? 196 size = 0; 197 } else if ( checkD( value[last] ) ) { // double ? 198 size = 1; 199 } else if ( checkL( value[last] ) ) { // long double ? 200 size = 2; 201 } // if 202 if ( ! complx && checkI( value[last - 1] ) ) { // imaginary ? 203 complx = true; 204 } // if 205 btype = kind[complx][size]; // lookup constant type 206 break; 207 } 208 case Character: 209 btype = BasicType::Char; // default 210 if ( string( "LUu" ).find( value[0] ) != string::npos ) { 211 // ??? 212 } // if 213 break; 214 case String: 215 // array of char 216 if ( string( "LUu" ).find( value[0] ) != string::npos ) { 217 if ( value[0] == 'u' && value[1] == '8' ) { 218 // ??? 219 } else { 220 // ??? 221 } // if 222 } // if 223 break; 224 } // switch 91 ConstantNode::ConstantNode( ConstantExpr *expr ) : expr( expr ) { 225 92 } // ConstantNode::ConstantNode 226 93 227 94 ConstantNode *ConstantNode::appendstr( const std::string *newValue ) { 228 95 assert( newValue != 0 ); 229 assert( type == String);96 string value = expr->get_constant()->get_value(); 230 97 231 98 // "abc" "def" "ghi" => "abcdefghi", remove new text from quotes and insert before last quote in old string. … … 237 104 238 105 void ConstantNode::printOneLine( std::ostream &os, int indent ) const { 239 os << string( indent, ' ' );240 printDesignation( os );241 242 switch ( type ) {243 case Integer:244 case Float:245 os << value ;246 break;247 case Character:248 os << "'" << value << "'";249 break;250 case String:251 os << '"' << value << '"';252 break;253 } // switch254 255 os << ' ';106 // os << string( indent, ' ' ); 107 // printDesignation( os ); 108 109 // switch ( type ) { 110 // case Integer: 111 // case Float: 112 // os << value ; 113 // break; 114 // case Character: 115 // os << "'" << value << "'"; 116 // break; 117 // case String: 118 // os << '"' << value << '"'; 119 // break; 120 // } // switch 121 122 // os << ' '; 256 123 } 257 124 … … 262 129 263 130 Expression *ConstantNode::build() const { 264 ::Type::Qualifiers q; // no qualifiers on constants 265 266 switch ( get_type() ) { 267 case String: 268 { 269 // string should probably be a primitive type 270 ArrayType *at = new ArrayType( q, new BasicType( q, BasicType::Char ), 271 new ConstantExpr( 272 Constant( new BasicType( q, BasicType::UnsignedInt ), 273 toString( value.size()+1-2 ) ) ), // +1 for '\0' and -2 for '"' 274 false, false ); 275 return new ConstantExpr( Constant( at, value ), maybeBuild< Expression >( get_argName() ) ); 276 } 277 default: 278 return new ConstantExpr( Constant( new BasicType( q, btype ), get_value() ), maybeBuild< Expression >( get_argName() ) ); 279 } 131 return expr->clone(); 280 132 } 281 133 -
src/Parser/InitializerNode.cc
ra43e1d7 r39f04ec 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 13:20:24 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Thu Jan 07 13:32:57201613 // Update Count : 1 311 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jul 4 15:37:15 2016 13 // Update Count : 15 14 14 // 15 15 … … 99 99 100 100 if ( get_expression() != 0) 101 return new SingleInit( get_expression()->build(), designators, maybeConstructed );101 return new SingleInit( maybeBuild<Expression>( get_expression() ), designators, maybeConstructed ); 102 102 } // if 103 103 -
src/Parser/ParseNode.cc
ra43e1d7 r39f04ec 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 13:26:29 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Aug 12 13:26:00 201513 // Update Count : 3611 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 30 21:13:12 2016 13 // Update Count : 52 14 14 // 15 15 16 #include <climits> 16 17 #include "ParseNode.h" 17 18 using namespace std; 19 20 // Difficult to separate extra parts of constants during lexing because actions are not allow in the middle of patterns: 21 // 22 // prefix action constant action suffix 23 // 24 // Alternatively, breaking a pattern using BEGIN does not work if the following pattern can be empty: 25 // 26 // constant BEGIN CONT ... 27 // <CONT>(...)? BEGIN 0 ... // possible empty suffix 28 // 29 // because the CONT rule is NOT triggered if the pattern is empty. Hence, constants are reparsed here to determine their 30 // type. 31 32 static inline bool checkU( char c ) { return c == 'u' || c == 'U'; } 33 static inline bool checkL( char c ) { return c == 'l' || c == 'L'; } 34 static inline bool checkF( char c ) { return c == 'f' || c == 'F'; } 35 static inline bool checkD( char c ) { return c == 'd' || c == 'D'; } 36 static inline bool checkI( char c ) { return c == 'i' || c == 'I'; } 37 static inline bool checkX( char c ) { return c == 'x' || c == 'X'; } 38 39 BasicType::Kind literalType( ConstantNode::Type type, string &value ) { 40 BasicType::Kind btype; 41 42 // lexing divides constants into 4 kinds 43 switch ( type ) { 44 case ConstantNode::Integer: 45 { 46 static const BasicType::Kind kind[2][3] = { 47 { BasicType::SignedInt, BasicType::LongSignedInt, BasicType::LongLongSignedInt }, 48 { BasicType::UnsignedInt, BasicType::LongUnsignedInt, BasicType::LongLongUnsignedInt }, 49 }; 50 bool dec = true, Unsigned = false; // decimal, unsigned constant 51 int size; // 0 => int, 1 => long, 2 => long long 52 unsigned long long v; // converted integral value 53 size_t last = value.length() - 1; // last character of constant 54 55 if ( value[0] == '0' ) { // octal constant ? 56 dec = false; 57 if ( last != 0 && checkX( value[1] ) ) { // hex constant ? 58 sscanf( (char *)value.c_str(), "%llx", &v ); 59 //printf( "%llx %llu\n", v, v ); 60 } else { 61 sscanf( (char *)value.c_str(), "%llo", &v ); 62 //printf( "%llo %llu\n", v, v ); 63 } // if 64 } else { // decimal constant ? 65 sscanf( (char *)value.c_str(), "%llu", &v ); 66 //printf( "%llu %llu\n", v, v ); 67 } // if 68 69 if ( v <= INT_MAX ) { // signed int 70 size = 0; 71 } else if ( v <= UINT_MAX && ! dec ) { // unsigned int 72 size = 0; 73 Unsigned = true; // unsigned 74 } else if ( v <= LONG_MAX ) { // signed long int 75 size = 1; 76 } else if ( v <= ULONG_MAX && ( ! dec || LONG_MAX == LLONG_MAX ) ) { // signed long int 77 size = 1; 78 Unsigned = true; // unsigned long int 79 } else if ( v <= LLONG_MAX ) { // signed long long int 80 size = 2; 81 } else { // unsigned long long int 82 size = 2; 83 Unsigned = true; // unsigned long long int 84 } // if 85 86 if ( checkU( value[last] ) ) { // suffix 'u' ? 87 Unsigned = true; 88 if ( last > 0 && checkL( value[ last - 1 ] ) ) { // suffix 'l' ? 89 size = 1; 90 if ( last > 1 && checkL( value[ last - 2 ] ) ) { // suffix 'll' ? 91 size = 2; 92 } // if 93 } // if 94 } else if ( checkL( value[ last ] ) ) { // suffix 'l' ? 95 size = 1; 96 if ( last > 0 && checkL( value[ last - 1 ] ) ) { // suffix 'll' ? 97 size = 2; 98 if ( last > 1 && checkU( value[ last - 2 ] ) ) { // suffix 'u' ? 99 Unsigned = true; 100 } // if 101 } else { 102 if ( last > 0 && checkU( value[ last - 1 ] ) ) { // suffix 'u' ? 103 Unsigned = true; 104 } // if 105 } // if 106 } // if 107 btype = kind[Unsigned][size]; // lookup constant type 108 break; 109 } 110 case ConstantNode::Float: 111 { 112 static const BasicType::Kind kind[2][3] = { 113 { BasicType::Float, BasicType::Double, BasicType::LongDouble }, 114 { BasicType::FloatComplex, BasicType::DoubleComplex, BasicType::LongDoubleComplex }, 115 }; 116 bool complx = false; // real, complex 117 int size = 1; // 0 => float, 1 => double (default), 2 => long double 118 // floating-point constant has minimum of 2 characters: 1. or .1 119 size_t last = value.length() - 1; 120 121 if ( checkI( value[last] ) ) { // imaginary ? 122 complx = true; 123 last -= 1; // backup one character 124 } // if 125 if ( checkF( value[last] ) ) { // float ? 126 size = 0; 127 } else if ( checkD( value[last] ) ) { // double ? 128 size = 1; 129 } else if ( checkL( value[last] ) ) { // long double ? 130 size = 2; 131 } // if 132 if ( ! complx && checkI( value[last - 1] ) ) { // imaginary ? 133 complx = true; 134 } // if 135 btype = kind[complx][size]; // lookup constant type 136 break; 137 } 138 case ConstantNode::Character: 139 btype = BasicType::Char; // default 140 if ( string( "LUu" ).find( value[0] ) != string::npos ) { 141 // ??? 142 } // if 143 break; 144 case ConstantNode::String: 145 assert( false ); 146 // array of char 147 if ( string( "LUu" ).find( value[0] ) != string::npos ) { 148 if ( value[0] == 'u' && value[1] == '8' ) { 149 // ??? 150 } else { 151 // ??? 152 } // if 153 } // if 154 break; 155 } // switch 156 return btype; 157 } // literalType 158 159 160 ConstantNode *makeConstant( ConstantNode::Type type, std::string *str ) { 161 ::Type::Qualifiers emptyQualifiers; // no qualifiers on constants 162 return new ConstantNode( new ConstantExpr( Constant( new BasicType( emptyQualifiers, literalType( type, *str ) ), *str ), nullptr ) ); 163 } 164 165 ConstantNode *makeConstantStr( ConstantNode::Type type, std::string *str ) { 166 ::Type::Qualifiers emptyQualifiers; // no qualifiers on constants 167 // string should probably be a primitive type 168 ArrayType *at = new ArrayType( emptyQualifiers, new BasicType( emptyQualifiers, BasicType::Char ), 169 new ConstantExpr( 170 Constant( new BasicType( emptyQualifiers, BasicType::UnsignedInt ), 171 toString( str->size()+1-2 ) ) ), // +1 for '\0' and -2 for '"' 172 false, false ); 173 return new ConstantNode( new ConstantExpr( Constant( at, *str ), nullptr ) ); 174 } 175 18 176 19 177 // Builder … … 28 186 }; 29 187 30 ParseNode *ParseNode::get_link() const {31 return next;32 }33 34 188 ParseNode *ParseNode::get_last() { 35 189 ParseNode *current = this; … … 43 197 ParseNode *ParseNode::set_link( ParseNode *next_ ) { 44 198 if ( next_ == 0 ) return this; 45 46 199 get_last()->next = next_; 47 48 200 return this; 49 201 } -
src/Parser/ParseNode.h
ra43e1d7 r39f04ec 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Ju n 27 23:28:10201613 // Update Count : 2 4212 // Last Modified On : Mon Jul 4 15:35:09 2016 13 // Update Count : 260 14 14 // 15 15 … … 43 43 ParseNode(); 44 44 ParseNode( const std::string * ); 45 ParseNode( const std::string & ); 45 ParseNode( const std::string & ); // for copy constructing subclasses 46 46 virtual ~ParseNode(); 47 47 48 ParseNode *get_link() const ;48 ParseNode *get_link() const { return next; } 49 49 ParseNode *get_last(); 50 50 ParseNode *set_link( ParseNode * ); … … 62 62 protected: 63 63 std::string name; 64 static int indent_by; 64 65 ParseNode *next; 65 static int indent_by;66 66 }; 67 67 … … 126 126 enum Type { Integer, Float, Character, String }; 127 127 128 ConstantNode( Type, std::string* );129 ConstantNode( const ConstantNode &other ) : type( other.type ), btype( other.btype), value( *new std::string( other.value) ) {};130 ~ConstantNode() { delete &value; }128 ConstantNode( ConstantExpr * ); 129 ConstantNode( const ConstantNode &other ) : expr( other.expr->clone() ) {}; 130 ~ConstantNode() { delete expr; } 131 131 132 132 virtual ConstantNode *clone() const { return new ConstantNode( *this ); } 133 Type get_type( void ) const { return type; }134 133 virtual void print( std::ostream &, int indent = 0) const; 135 134 virtual void printOneLine( std::ostream &, int indent = 0) const; 136 135 137 const std::string &get_value() const { return value; }138 136 ConstantNode *appendstr( const std::string *newValue ); 139 137 140 138 Expression *build() const; 141 139 private: 142 Type type; 143 BasicType::Kind btype; 144 std::string &value; 145 }; 140 ConstantExpr *expr; 141 }; 142 143 ConstantNode *makeConstant( ConstantNode::Type, std::string * ); 144 ConstantNode *makeConstantStr( ConstantNode::Type type, std::string *str ); 146 145 147 146 class VarRefNode : public ExpressionNode { … … 482 481 void setCatchRest( bool newVal ) { isCatchRest = newVal; } 483 482 484 bool get_extension() const { return extension; }485 StatementNode *set_extension( bool exten ) { extension = exten; return this; }486 487 483 std::string get_target() const; 488 484 … … 503 499 DeclarationNode *decl; 504 500 bool isCatchRest; 505 bool extension = false;506 501 }; // StatementNode 507 502 -
src/Parser/parser.cc
ra43e1d7 r39f04ec 1030 1030 613, 614, 615, 616, 617, 618, 619, 620, 624, 625, 1031 1031 631, 632, 638, 639, 640, 641, 642, 643, 644, 645, 1032 646, 656, 663, 665, 675, 676, 681, 683, 68 5, 687,1033 69 1, 692, 697, 702, 705, 707, 709, 714, 716, 724,1034 72 5, 727, 731, 732, 737, 738, 743, 744, 748, 753,1035 75 4, 758, 760, 766, 767, 771, 773, 775, 777, 783,1036 78 4, 788, 789, 793, 795, 797, 802, 804, 809, 811,1037 81 5, 818, 822, 825, 829, 831, 835, 837, 844, 846,1038 8 48, 857, 859, 861, 863, 865, 870, 872, 874, 876,1039 88 1, 894, 895, 900, 902, 907, 911, 913, 915, 917,1040 9 19, 925, 926, 932, 933, 937, 938, 943, 945, 951,1041 95 2, 954, 959, 961, 968, 970, 974, 975, 980, 982,1042 9 86, 987, 991, 993, 997, 998, 1002, 1003, 1007, 1008,1043 102 3, 1024, 1025, 1026, 1027, 1031, 1036, 1043, 1053, 1058,1044 106 3, 1071, 1076, 1081, 1086, 1091, 1099, 1121, 1126, 1133,1045 113 5, 1142, 1147, 1152, 1163, 1168, 1173, 1178, 1183, 1192,1046 1 197, 1205, 1206, 1207, 1208, 1214, 1219, 1227, 1228, 1229,1047 123 0, 1234, 1235, 1236, 1237, 1242, 1243, 1252, 1253, 1258,1048 12 59, 1264, 1266, 1268, 1270, 1272, 1275, 1274, 1286, 1287,1049 12 89, 1299, 1300, 1305, 1309, 1311, 1313, 1315, 1317, 1319,1050 132 1, 1323, 1328, 1330, 1332, 1334, 1336, 1338, 1340, 1342,1051 134 4, 1346, 1348, 1350, 1352, 1358, 1359, 1361, 1363, 1365,1052 137 0, 1371, 1377, 1378, 1380, 1382, 1387, 1389, 1391, 1393,1053 1 398, 1399, 1401, 1403, 1408, 1409, 1411, 1416, 1417, 1419,1054 142 1, 1426, 1428, 1430, 1435, 1436, 1440, 1442, 1448, 1447,1055 145 1, 1453, 1458, 1460, 1465, 1467, 1472, 1473, 1475, 1476,1056 148 1, 1482, 1484, 1486, 1491, 1493, 1499, 1500, 1502, 1505,1057 15 08, 1513, 1514, 1519, 1524, 1528, 1530, 1536, 1535, 1542,1058 15 44, 1550, 1551, 1559, 1560, 1564, 1565, 1566, 1568, 1570,1059 15 77, 1578, 1580, 1582, 1587, 1588, 1594, 1595, 1599, 1600,1060 16 05, 1606, 1607, 1609, 1617, 1618, 1620, 1623, 1625, 1629,1061 163 0, 1631, 1633, 1635, 1639, 1644, 1652, 1653, 1662, 1664,1062 16 69, 1670, 1671, 1675, 1676, 1677, 1681, 1682, 1683, 1687,1063 16 88, 1689, 1694, 1695, 1696, 1697, 1703, 1704, 1706, 1711,1064 17 12, 1717, 1718, 1719, 1720, 1721, 1736, 1737, 1742, 1743,1065 175 1, 1753, 1755, 1758, 1760, 1762, 1785, 1786, 1788, 1790,1066 1 795, 1796, 1798, 1803, 1808, 1809, 1815, 1814, 1818, 1822,1067 18 24, 1826, 1832, 1833, 1838, 1843, 1845, 1850, 1852, 1853,1068 18 55, 1860, 1862, 1864, 1869, 1871, 1876, 1881, 1889, 1895,1069 1 894, 1908, 1909, 1914, 1915, 1919, 1924, 1929, 1937, 1942,1070 19 53, 1954, 1965, 1966, 1972, 1973, 1977, 1978, 1979, 1982,1071 198 1, 1992, 1997, 2003, 2009, 2018, 2024, 2030, 2036, 2042,1072 20 50, 2056, 2064, 2070, 2079, 2080, 2081, 2085, 2089, 2091,1073 2 096, 2097, 2101, 2102, 2107, 2113, 2114, 2117, 2119, 2120,1074 21 24, 2125, 2126, 2127, 2161, 2163, 2164, 2166, 2171, 2176,1075 21 81, 2183, 2185, 2190, 2192, 2194, 2196, 2201, 2203, 2212,1076 22 14, 2215, 2220, 2222, 2224, 2229, 2231, 2233, 2238, 2240,1077 22 42, 2251, 2252, 2253, 2257, 2259, 2261, 2266, 2268, 2270,1078 22 75, 2277, 2279, 2294, 2296, 2297, 2299, 2304, 2305, 2310,1079 23 12, 2314, 2319, 2321, 2323, 2325, 2330, 2332, 2334, 2344,1080 23 46, 2347, 2349, 2354, 2356, 2358, 2363, 2365, 2367, 2369,1081 23 74, 2376, 2378, 2409, 2411, 2412, 2414, 2419, 2424, 2432,1082 24 34, 2436, 2441, 2443, 2448, 2450, 2464, 2465, 2467, 2472,1083 24 74, 2476, 2478, 2480, 2485, 2486, 2488, 2490, 2495, 2497,1084 2 499, 2505, 2507, 2509, 2513, 2515, 2517, 2519, 2533, 2534,1085 25 36, 2541, 2543, 2545, 2547, 2549, 2554, 2555, 2557, 2559,1086 25 64, 2566, 2568, 2574, 2575, 2577, 2586, 2589, 2591, 2594,1087 2 596, 2598, 2611, 2612, 2614, 2619, 2621, 2623, 2625, 2627,1088 26 32, 2633, 2635, 2637, 2642, 2644, 2652, 2653, 2654, 2659,1089 26 60, 2664, 2666, 2668, 2670, 2672, 2674, 2681, 2683, 2685,1090 26 87, 2689, 2691, 2693, 2695, 2697, 2699, 2704, 2706, 2708,1091 27 13, 2739, 2740, 2742, 2746, 2747, 2751, 2753, 2755, 2757,1092 27 59, 2761, 2768, 2770, 2772, 2774, 2776, 2778, 2783, 2788,1093 2 790, 2792, 2810, 2812, 2817, 28181032 646, 656, 663, 665, 675, 676, 681, 683, 689, 691, 1033 695, 696, 701, 706, 709, 711, 713, 718, 720, 728, 1034 729, 731, 735, 736, 741, 742, 747, 748, 752, 757, 1035 758, 762, 764, 770, 771, 775, 777, 779, 781, 787, 1036 788, 792, 793, 797, 799, 801, 806, 808, 813, 815, 1037 819, 822, 826, 829, 833, 835, 839, 841, 848, 850, 1038 852, 861, 863, 865, 867, 869, 874, 876, 878, 880, 1039 885, 898, 899, 904, 906, 911, 915, 917, 919, 921, 1040 923, 929, 930, 936, 937, 941, 942, 947, 949, 955, 1041 956, 958, 963, 965, 972, 974, 978, 979, 984, 986, 1042 990, 991, 995, 997, 1001, 1002, 1006, 1007, 1011, 1012, 1043 1027, 1028, 1029, 1030, 1031, 1035, 1040, 1047, 1057, 1062, 1044 1067, 1075, 1080, 1085, 1090, 1095, 1103, 1125, 1130, 1137, 1045 1139, 1146, 1151, 1156, 1167, 1172, 1177, 1182, 1187, 1196, 1046 1201, 1209, 1210, 1211, 1212, 1218, 1223, 1231, 1232, 1233, 1047 1234, 1238, 1239, 1240, 1241, 1246, 1247, 1256, 1257, 1262, 1048 1263, 1268, 1270, 1272, 1274, 1276, 1279, 1278, 1290, 1291, 1049 1293, 1303, 1304, 1309, 1313, 1315, 1317, 1319, 1321, 1323, 1050 1325, 1327, 1332, 1334, 1336, 1338, 1340, 1342, 1344, 1346, 1051 1348, 1350, 1352, 1354, 1356, 1362, 1363, 1365, 1367, 1369, 1052 1374, 1375, 1381, 1382, 1384, 1386, 1391, 1393, 1395, 1397, 1053 1402, 1403, 1405, 1407, 1412, 1413, 1415, 1420, 1421, 1423, 1054 1425, 1430, 1432, 1434, 1439, 1440, 1444, 1446, 1452, 1451, 1055 1455, 1457, 1462, 1464, 1469, 1471, 1476, 1477, 1479, 1480, 1056 1489, 1490, 1492, 1494, 1499, 1501, 1507, 1508, 1510, 1513, 1057 1516, 1521, 1522, 1527, 1532, 1536, 1538, 1544, 1543, 1550, 1058 1552, 1558, 1559, 1567, 1568, 1572, 1573, 1574, 1576, 1578, 1059 1585, 1586, 1588, 1590, 1595, 1596, 1602, 1603, 1607, 1608, 1060 1613, 1614, 1615, 1617, 1625, 1626, 1628, 1631, 1633, 1637, 1061 1638, 1639, 1641, 1643, 1647, 1652, 1660, 1661, 1670, 1672, 1062 1677, 1678, 1679, 1683, 1684, 1685, 1689, 1690, 1691, 1695, 1063 1696, 1697, 1702, 1703, 1704, 1705, 1711, 1712, 1714, 1719, 1064 1720, 1725, 1726, 1727, 1728, 1729, 1744, 1745, 1750, 1751, 1065 1759, 1761, 1763, 1766, 1768, 1770, 1793, 1794, 1796, 1798, 1066 1803, 1804, 1806, 1811, 1816, 1817, 1823, 1822, 1826, 1830, 1067 1832, 1834, 1840, 1841, 1846, 1851, 1853, 1858, 1860, 1861, 1068 1863, 1868, 1870, 1872, 1877, 1879, 1884, 1889, 1897, 1903, 1069 1902, 1916, 1917, 1922, 1923, 1927, 1932, 1937, 1945, 1950, 1070 1961, 1962, 1973, 1974, 1980, 1981, 1985, 1986, 1987, 1990, 1071 1989, 2000, 2009, 2015, 2021, 2030, 2036, 2042, 2048, 2054, 1072 2062, 2068, 2076, 2082, 2091, 2092, 2093, 2097, 2101, 2103, 1073 2108, 2109, 2113, 2114, 2119, 2125, 2126, 2129, 2131, 2132, 1074 2136, 2137, 2138, 2139, 2173, 2175, 2176, 2178, 2183, 2188, 1075 2193, 2195, 2197, 2202, 2204, 2206, 2208, 2213, 2215, 2224, 1076 2226, 2227, 2232, 2234, 2236, 2241, 2243, 2245, 2250, 2252, 1077 2254, 2263, 2264, 2265, 2269, 2271, 2273, 2278, 2280, 2282, 1078 2287, 2289, 2291, 2306, 2308, 2309, 2311, 2316, 2317, 2322, 1079 2324, 2326, 2331, 2333, 2335, 2337, 2342, 2344, 2346, 2356, 1080 2358, 2359, 2361, 2366, 2368, 2370, 2375, 2377, 2379, 2381, 1081 2386, 2388, 2390, 2421, 2423, 2424, 2426, 2431, 2436, 2444, 1082 2446, 2448, 2453, 2455, 2460, 2462, 2476, 2477, 2479, 2484, 1083 2486, 2488, 2490, 2492, 2497, 2498, 2500, 2502, 2507, 2509, 1084 2511, 2517, 2519, 2521, 2525, 2527, 2529, 2531, 2545, 2546, 1085 2548, 2553, 2555, 2557, 2559, 2561, 2566, 2567, 2569, 2571, 1086 2576, 2578, 2580, 2586, 2587, 2589, 2598, 2601, 2603, 2606, 1087 2608, 2610, 2623, 2624, 2626, 2631, 2633, 2635, 2637, 2639, 1088 2644, 2645, 2647, 2649, 2654, 2656, 2664, 2665, 2666, 2671, 1089 2672, 2676, 2678, 2680, 2682, 2684, 2686, 2693, 2695, 2697, 1090 2699, 2701, 2703, 2705, 2707, 2709, 2711, 2716, 2718, 2720, 1091 2725, 2751, 2752, 2754, 2758, 2759, 2763, 2765, 2767, 2769, 1092 2771, 2773, 2780, 2782, 2784, 2786, 2788, 2790, 2795, 2800, 1093 2802, 2804, 2822, 2824, 2829, 2830 1094 1094 }; 1095 1095 #endif … … 5237 5237 /* Line 1806 of yacc.c */ 5238 5238 #line 305 "parser.yy" 5239 { (yyval.constant) = new ConstantNode( ConstantNode::Integer, (yyvsp[(1) - (1)].tok) ); }5239 { (yyval.constant) = makeConstant( ConstantNode::Integer, (yyvsp[(1) - (1)].tok) ); } 5240 5240 break; 5241 5241 … … 5244 5244 /* Line 1806 of yacc.c */ 5245 5245 #line 306 "parser.yy" 5246 { (yyval.constant) = new ConstantNode( ConstantNode::Float, (yyvsp[(1) - (1)].tok) ); }5246 { (yyval.constant) = makeConstant( ConstantNode::Float, (yyvsp[(1) - (1)].tok) ); } 5247 5247 break; 5248 5248 … … 5251 5251 /* Line 1806 of yacc.c */ 5252 5252 #line 307 "parser.yy" 5253 { (yyval.constant) = new ConstantNode( ConstantNode::Character, (yyvsp[(1) - (1)].tok) ); }5253 { (yyval.constant) = makeConstant( ConstantNode::Character, (yyvsp[(1) - (1)].tok) ); } 5254 5254 break; 5255 5255 … … 5258 5258 /* Line 1806 of yacc.c */ 5259 5259 #line 332 "parser.yy" 5260 { (yyval.constant) = new ConstantNode( ConstantNode::String, (yyvsp[(1) - (1)].tok) ); }5260 { (yyval.constant) = makeConstantStr( ConstantNode::String, (yyvsp[(1) - (1)].tok) ); } 5261 5261 break; 5262 5262 … … 5953 5953 /* Line 1806 of yacc.c */ 5954 5954 #line 684 "parser.yy" 5955 { (yyval.sn) = new StatementNode( (yyvsp[(2) - (2)].decl) )/*->set_extension( true )*/; } 5955 { // mark all fields in list 5956 for ( DeclarationNode *iter = (yyvsp[(2) - (2)].decl); iter != NULL; iter = (DeclarationNode *)iter->get_link() ) 5957 iter->set_extension( true ); 5958 (yyval.sn) = new StatementNode( (yyvsp[(2) - (2)].decl) ); 5959 } 5956 5960 break; 5957 5961 … … 5959 5963 5960 5964 /* Line 1806 of yacc.c */ 5961 #line 6 86"parser.yy"5965 #line 690 "parser.yy" 5962 5966 { (yyval.sn) = new StatementNode( (yyvsp[(1) - (1)].decl) ); } 5963 5967 break; … … 5966 5970 5967 5971 /* Line 1806 of yacc.c */ 5968 #line 69 3"parser.yy"5972 #line 697 "parser.yy" 5969 5973 { if ( (yyvsp[(1) - (2)].sn) != 0 ) { (yyvsp[(1) - (2)].sn)->set_link( (yyvsp[(2) - (2)].sn) ); (yyval.sn) = (yyvsp[(1) - (2)].sn); } } 5970 5974 break; … … 5973 5977 5974 5978 /* Line 1806 of yacc.c */ 5975 #line 698"parser.yy"5979 #line 702 "parser.yy" 5976 5980 { (yyval.sn) = new StatementNode( StatementNode::Exp, (yyvsp[(1) - (2)].en), 0 ); } 5977 5981 break; … … 5980 5984 5981 5985 /* Line 1806 of yacc.c */ 5982 #line 70 4"parser.yy"5986 #line 708 "parser.yy" 5983 5987 { (yyval.sn) = new StatementNode( StatementNode::If, (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ); } 5984 5988 break; … … 5987 5991 5988 5992 /* Line 1806 of yacc.c */ 5989 #line 7 06"parser.yy"5993 #line 710 "parser.yy" 5990 5994 { (yyval.sn) = new StatementNode( StatementNode::If, (yyvsp[(3) - (7)].en), (StatementNode *)mkList((*(yyvsp[(5) - (7)].sn), *(yyvsp[(7) - (7)].sn) )) ); } 5991 5995 break; … … 5994 5998 5995 5999 /* Line 1806 of yacc.c */ 5996 #line 7 08"parser.yy"6000 #line 712 "parser.yy" 5997 6001 { (yyval.sn) = new StatementNode( StatementNode::Switch, (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ); } 5998 6002 break; … … 6001 6005 6002 6006 /* Line 1806 of yacc.c */ 6003 #line 71 0"parser.yy"6007 #line 714 "parser.yy" 6004 6008 { (yyval.sn) = new StatementNode( StatementNode::Switch, (yyvsp[(3) - (9)].en), (yyvsp[(8) - (9)].sn) ); /* xxx */ } 6005 6009 break; … … 6008 6012 6009 6013 /* Line 1806 of yacc.c */ 6010 #line 71 5"parser.yy"6014 #line 719 "parser.yy" 6011 6015 { (yyval.sn) = new StatementNode( StatementNode::Choose, (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ); } 6012 6016 break; … … 6015 6019 6016 6020 /* Line 1806 of yacc.c */ 6017 #line 7 17"parser.yy"6021 #line 721 "parser.yy" 6018 6022 { (yyval.sn) = new StatementNode( StatementNode::Choose, (yyvsp[(3) - (9)].en), (yyvsp[(8) - (9)].sn) ); } 6019 6023 break; … … 6022 6026 6023 6027 /* Line 1806 of yacc.c */ 6024 #line 72 4"parser.yy"6028 #line 728 "parser.yy" 6025 6029 { (yyval.en) = (yyvsp[(1) - (1)].en); } 6026 6030 break; … … 6029 6033 6030 6034 /* Line 1806 of yacc.c */ 6031 #line 7 26"parser.yy"6035 #line 730 "parser.yy" 6032 6036 { (yyval.en) = new CompositeExprNode( new OperatorNode( OperatorNode::Range ), (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ); } 6033 6037 break; … … 6036 6040 6037 6041 /* Line 1806 of yacc.c */ 6038 #line 73 3"parser.yy"6042 #line 737 "parser.yy" 6039 6043 { (yyval.en) = new CompositeExprNode( new OperatorNode( OperatorNode::TupleC ), (ExpressionNode *)(tupleContents( (yyvsp[(1) - (3)].en) ))->set_link( (yyvsp[(3) - (3)].en) ) ); } 6040 6044 break; … … 6043 6047 6044 6048 /* Line 1806 of yacc.c */ 6045 #line 7 37"parser.yy"6049 #line 741 "parser.yy" 6046 6050 { (yyval.sn) = new StatementNode( StatementNode::Case, (yyvsp[(2) - (3)].en), 0 ); } 6047 6051 break; … … 6050 6054 6051 6055 /* Line 1806 of yacc.c */ 6052 #line 7 38"parser.yy"6056 #line 742 "parser.yy" 6053 6057 { (yyval.sn) = new StatementNode( StatementNode::Default ); } 6054 6058 break; … … 6057 6061 6058 6062 /* Line 1806 of yacc.c */ 6059 #line 74 4"parser.yy"6063 #line 748 "parser.yy" 6060 6064 { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (2)].sn)->set_link( (yyvsp[(2) - (2)].sn) )); } 6061 6065 break; … … 6064 6068 6065 6069 /* Line 1806 of yacc.c */ 6066 #line 7 48"parser.yy"6070 #line 752 "parser.yy" 6067 6071 { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( (yyvsp[(2) - (2)].sn) ); } 6068 6072 break; … … 6071 6075 6072 6076 /* Line 1806 of yacc.c */ 6073 #line 75 3"parser.yy"6077 #line 757 "parser.yy" 6074 6078 { (yyval.sn) = 0; } 6075 6079 break; … … 6078 6082 6079 6083 /* Line 1806 of yacc.c */ 6080 #line 7 59"parser.yy"6084 #line 763 "parser.yy" 6081 6085 { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( (yyvsp[(2) - (2)].sn) ); } 6082 6086 break; … … 6085 6089 6086 6090 /* Line 1806 of yacc.c */ 6087 #line 76 1"parser.yy"6091 #line 765 "parser.yy" 6088 6092 { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (3)].sn)->set_link( (yyvsp[(2) - (3)].sn)->append_last_case( (yyvsp[(3) - (3)].sn) ))); } 6089 6093 break; … … 6092 6096 6093 6097 /* Line 1806 of yacc.c */ 6094 #line 7 66"parser.yy"6098 #line 770 "parser.yy" 6095 6099 { (yyval.sn) = 0; } 6096 6100 break; … … 6099 6103 6100 6104 /* Line 1806 of yacc.c */ 6101 #line 77 2"parser.yy"6105 #line 776 "parser.yy" 6102 6106 { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( (yyvsp[(2) - (2)].sn) ); } 6103 6107 break; … … 6106 6110 6107 6111 /* Line 1806 of yacc.c */ 6108 #line 77 4"parser.yy"6112 #line 778 "parser.yy" 6109 6113 { (yyval.sn) = (yyvsp[(1) - (3)].sn)->append_last_case((StatementNode *)mkList((*(yyvsp[(2) - (3)].sn),*(yyvsp[(3) - (3)].sn) ))); } 6110 6114 break; … … 6113 6117 6114 6118 /* Line 1806 of yacc.c */ 6115 #line 7 76"parser.yy"6119 #line 780 "parser.yy" 6116 6120 { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (3)].sn)->set_link( (yyvsp[(2) - (3)].sn)->append_last_case( (yyvsp[(3) - (3)].sn) ))); } 6117 6121 break; … … 6120 6124 6121 6125 /* Line 1806 of yacc.c */ 6122 #line 7 78"parser.yy"6126 #line 782 "parser.yy" 6123 6127 { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (4)].sn)->set_link( (yyvsp[(2) - (4)].sn)->append_last_case((StatementNode *)mkList((*(yyvsp[(3) - (4)].sn),*(yyvsp[(4) - (4)].sn) ))))); } 6124 6128 break; … … 6127 6131 6128 6132 /* Line 1806 of yacc.c */ 6129 #line 78 3"parser.yy"6133 #line 787 "parser.yy" 6130 6134 { (yyval.sn) = 0; } 6131 6135 break; … … 6134 6138 6135 6139 /* Line 1806 of yacc.c */ 6136 #line 7 88"parser.yy"6140 #line 792 "parser.yy" 6137 6141 { (yyval.sn) = new StatementNode( StatementNode::Fallthru ); } 6138 6142 break; … … 6141 6145 6142 6146 /* Line 1806 of yacc.c */ 6143 #line 7 89"parser.yy"6147 #line 793 "parser.yy" 6144 6148 { (yyval.sn) = new StatementNode( StatementNode::Fallthru ); } 6145 6149 break; … … 6148 6152 6149 6153 /* Line 1806 of yacc.c */ 6150 #line 79 4"parser.yy"6154 #line 798 "parser.yy" 6151 6155 { (yyval.sn) = new StatementNode( StatementNode::While, (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ); } 6152 6156 break; … … 6155 6159 6156 6160 /* Line 1806 of yacc.c */ 6157 #line 796"parser.yy"6161 #line 800 "parser.yy" 6158 6162 { (yyval.sn) = new StatementNode( StatementNode::Do, (yyvsp[(5) - (7)].en), (yyvsp[(2) - (7)].sn) ); } 6159 6163 break; … … 6162 6166 6163 6167 /* Line 1806 of yacc.c */ 6164 #line 798"parser.yy"6168 #line 802 "parser.yy" 6165 6169 { (yyval.sn) = new StatementNode( StatementNode::For, (yyvsp[(4) - (6)].en), (yyvsp[(6) - (6)].sn) ); } 6166 6170 break; … … 6169 6173 6170 6174 /* Line 1806 of yacc.c */ 6171 #line 80 3"parser.yy"6175 #line 807 "parser.yy" 6172 6176 { (yyval.en) = new ForCtlExprNode( (yyvsp[(1) - (6)].en), (yyvsp[(4) - (6)].en), (yyvsp[(6) - (6)].en) ); } 6173 6177 break; … … 6176 6180 6177 6181 /* Line 1806 of yacc.c */ 6178 #line 80 5"parser.yy"6182 #line 809 "parser.yy" 6179 6183 { (yyval.en) = new ForCtlExprNode( (yyvsp[(1) - (4)].decl), (yyvsp[(2) - (4)].en), (yyvsp[(4) - (4)].en) ); } 6180 6184 break; … … 6183 6187 6184 6188 /* Line 1806 of yacc.c */ 6185 #line 81 0"parser.yy"6189 #line 814 "parser.yy" 6186 6190 { (yyval.sn) = new StatementNode( StatementNode::Goto, (yyvsp[(2) - (3)].tok) ); } 6187 6191 break; … … 6190 6194 6191 6195 /* Line 1806 of yacc.c */ 6192 #line 81 4"parser.yy"6196 #line 818 "parser.yy" 6193 6197 { (yyval.sn) = new StatementNode( StatementNode::Goto, (yyvsp[(3) - (4)].en) ); } 6194 6198 break; … … 6197 6201 6198 6202 /* Line 1806 of yacc.c */ 6199 #line 8 17"parser.yy"6203 #line 821 "parser.yy" 6200 6204 { (yyval.sn) = new StatementNode( StatementNode::Continue ); } 6201 6205 break; … … 6204 6208 6205 6209 /* Line 1806 of yacc.c */ 6206 #line 82 1"parser.yy"6210 #line 825 "parser.yy" 6207 6211 { (yyval.sn) = new StatementNode( StatementNode::Continue, (yyvsp[(2) - (3)].tok) ); } 6208 6212 break; … … 6211 6215 6212 6216 /* Line 1806 of yacc.c */ 6213 #line 82 4"parser.yy"6217 #line 828 "parser.yy" 6214 6218 { (yyval.sn) = new StatementNode( StatementNode::Break ); } 6215 6219 break; … … 6218 6222 6219 6223 /* Line 1806 of yacc.c */ 6220 #line 8 28"parser.yy"6224 #line 832 "parser.yy" 6221 6225 { (yyval.sn) = new StatementNode( StatementNode::Break, (yyvsp[(2) - (3)].tok) ); } 6222 6226 break; … … 6225 6229 6226 6230 /* Line 1806 of yacc.c */ 6227 #line 83 0"parser.yy"6231 #line 834 "parser.yy" 6228 6232 { (yyval.sn) = new StatementNode( StatementNode::Return, (yyvsp[(2) - (3)].en), 0 ); } 6229 6233 break; 6230 6234 6231 6235 case 195: 6232 6233 /* Line 1806 of yacc.c */6234 #line 832 "parser.yy"6235 { (yyval.sn) = new StatementNode( StatementNode::Throw, (yyvsp[(2) - (3)].en), 0 ); }6236 break;6237 6238 case 196:6239 6236 6240 6237 /* Line 1806 of yacc.c */ … … 6243 6240 break; 6244 6241 6242 case 196: 6243 6244 /* Line 1806 of yacc.c */ 6245 #line 840 "parser.yy" 6246 { (yyval.sn) = new StatementNode( StatementNode::Throw, (yyvsp[(2) - (3)].en), 0 ); } 6247 break; 6248 6245 6249 case 197: 6246 6250 6247 6251 /* Line 1806 of yacc.c */ 6248 #line 8 38"parser.yy"6252 #line 842 "parser.yy" 6249 6253 { (yyval.sn) = new StatementNode( StatementNode::Throw, (yyvsp[(2) - (5)].en), 0 ); } 6250 6254 break; … … 6253 6257 6254 6258 /* Line 1806 of yacc.c */ 6255 #line 84 5"parser.yy"6259 #line 849 "parser.yy" 6256 6260 { (yyval.sn) = new StatementNode( StatementNode::Try, 0,(StatementNode *)(mkList((*(yyvsp[(2) - (3)].sn),*(yyvsp[(3) - (3)].pn) )))); } 6257 6261 break; … … 6260 6264 6261 6265 /* Line 1806 of yacc.c */ 6262 #line 8 47"parser.yy"6266 #line 851 "parser.yy" 6263 6267 { (yyval.sn) = new StatementNode( StatementNode::Try, 0,(StatementNode *)(mkList((*(yyvsp[(2) - (3)].sn),*(yyvsp[(3) - (3)].pn) )))); } 6264 6268 break; … … 6267 6271 6268 6272 /* Line 1806 of yacc.c */ 6269 #line 8 49"parser.yy"6273 #line 853 "parser.yy" 6270 6274 { 6271 6275 (yyvsp[(3) - (4)].pn)->set_link( (yyvsp[(4) - (4)].pn) ); … … 6277 6281 6278 6282 /* Line 1806 of yacc.c */ 6279 #line 860 "parser.yy"6280 { (yyval.pn) = StatementNode::newCatchStmt( 0, (yyvsp[(5) - (5)].sn), true ); }6281 break;6282 6283 case 203:6284 6285 /* Line 1806 of yacc.c */6286 #line 862 "parser.yy"6287 { (yyval.pn) = (yyvsp[(1) - (6)].pn)->set_link( StatementNode::newCatchStmt( 0, (yyvsp[(6) - (6)].sn), true ) ); }6288 break;6289 6290 case 204:6291 6292 /* Line 1806 of yacc.c */6293 6283 #line 864 "parser.yy" 6294 6284 { (yyval.pn) = StatementNode::newCatchStmt( 0, (yyvsp[(5) - (5)].sn), true ); } 6295 6285 break; 6296 6286 6297 case 20 5:6287 case 203: 6298 6288 6299 6289 /* Line 1806 of yacc.c */ … … 6302 6292 break; 6303 6293 6294 case 204: 6295 6296 /* Line 1806 of yacc.c */ 6297 #line 868 "parser.yy" 6298 { (yyval.pn) = StatementNode::newCatchStmt( 0, (yyvsp[(5) - (5)].sn), true ); } 6299 break; 6300 6301 case 205: 6302 6303 /* Line 1806 of yacc.c */ 6304 #line 870 "parser.yy" 6305 { (yyval.pn) = (yyvsp[(1) - (6)].pn)->set_link( StatementNode::newCatchStmt( 0, (yyvsp[(6) - (6)].sn), true ) ); } 6306 break; 6307 6304 6308 case 206: 6305 6306 /* Line 1806 of yacc.c */6307 #line 871 "parser.yy"6308 { (yyval.pn) = StatementNode::newCatchStmt( (yyvsp[(5) - (9)].decl), (yyvsp[(8) - (9)].sn) ); }6309 break;6310 6311 case 207:6312 6313 /* Line 1806 of yacc.c */6314 #line 873 "parser.yy"6315 { (yyval.pn) = (yyvsp[(1) - (10)].pn)->set_link( StatementNode::newCatchStmt( (yyvsp[(6) - (10)].decl), (yyvsp[(9) - (10)].sn) ) ); }6316 break;6317 6318 case 208:6319 6309 6320 6310 /* Line 1806 of yacc.c */ … … 6323 6313 break; 6324 6314 6325 case 20 9:6315 case 207: 6326 6316 6327 6317 /* Line 1806 of yacc.c */ … … 6330 6320 break; 6331 6321 6322 case 208: 6323 6324 /* Line 1806 of yacc.c */ 6325 #line 879 "parser.yy" 6326 { (yyval.pn) = StatementNode::newCatchStmt( (yyvsp[(5) - (9)].decl), (yyvsp[(8) - (9)].sn) ); } 6327 break; 6328 6329 case 209: 6330 6331 /* Line 1806 of yacc.c */ 6332 #line 881 "parser.yy" 6333 { (yyval.pn) = (yyvsp[(1) - (10)].pn)->set_link( StatementNode::newCatchStmt( (yyvsp[(6) - (10)].decl), (yyvsp[(9) - (10)].sn) ) ); } 6334 break; 6335 6332 6336 case 210: 6333 6337 6334 6338 /* Line 1806 of yacc.c */ 6335 #line 88 2"parser.yy"6339 #line 886 "parser.yy" 6336 6340 { 6337 6341 (yyval.pn) = new StatementNode( StatementNode::Finally, 0, (yyvsp[(2) - (2)].sn) ); … … 6343 6347 6344 6348 /* Line 1806 of yacc.c */ 6345 #line 896"parser.yy"6349 #line 900 "parser.yy" 6346 6350 { 6347 6351 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6353 6357 6354 6358 /* Line 1806 of yacc.c */ 6355 #line 90 1"parser.yy"6359 #line 905 "parser.yy" 6356 6360 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); } 6357 6361 break; … … 6360 6364 6361 6365 /* Line 1806 of yacc.c */ 6362 #line 90 3"parser.yy"6366 #line 907 "parser.yy" 6363 6367 { 6364 6368 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6370 6374 6371 6375 /* Line 1806 of yacc.c */ 6372 #line 91 2"parser.yy"6376 #line 916 "parser.yy" 6373 6377 { (yyval.sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (6)].flag), (yyvsp[(4) - (6)].constant), 0 ); } 6374 6378 break; … … 6377 6381 6378 6382 /* Line 1806 of yacc.c */ 6379 #line 91 4"parser.yy"6383 #line 918 "parser.yy" 6380 6384 { (yyval.sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (8)].flag), (yyvsp[(4) - (8)].constant), (yyvsp[(6) - (8)].en) ); } 6381 6385 break; … … 6384 6388 6385 6389 /* Line 1806 of yacc.c */ 6386 #line 9 16"parser.yy"6390 #line 920 "parser.yy" 6387 6391 { (yyval.sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (10)].flag), (yyvsp[(4) - (10)].constant), (yyvsp[(6) - (10)].en), (yyvsp[(8) - (10)].en) ); } 6388 6392 break; … … 6391 6395 6392 6396 /* Line 1806 of yacc.c */ 6393 #line 9 18"parser.yy"6397 #line 922 "parser.yy" 6394 6398 { (yyval.sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (12)].flag), (yyvsp[(4) - (12)].constant), (yyvsp[(6) - (12)].en), (yyvsp[(8) - (12)].en), (yyvsp[(10) - (12)].constant) ); } 6395 6399 break; … … 6398 6402 6399 6403 /* Line 1806 of yacc.c */ 6400 #line 92 0"parser.yy"6404 #line 924 "parser.yy" 6401 6405 { (yyval.sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (14)].flag), (yyvsp[(5) - (14)].constant), 0, (yyvsp[(8) - (14)].en), (yyvsp[(10) - (14)].constant), (yyvsp[(12) - (14)].label) ); } 6402 6406 break; … … 6405 6409 6406 6410 /* Line 1806 of yacc.c */ 6407 #line 92 5"parser.yy"6411 #line 929 "parser.yy" 6408 6412 { (yyval.flag) = false; } 6409 6413 break; … … 6412 6416 6413 6417 /* Line 1806 of yacc.c */ 6414 #line 9 27"parser.yy"6418 #line 931 "parser.yy" 6415 6419 { (yyval.flag) = true; } 6416 6420 break; … … 6419 6423 6420 6424 /* Line 1806 of yacc.c */ 6421 #line 93 2"parser.yy"6425 #line 936 "parser.yy" 6422 6426 { (yyval.en) = 0; } 6423 6427 break; … … 6426 6430 6427 6431 /* Line 1806 of yacc.c */ 6428 #line 9 39"parser.yy"6432 #line 943 "parser.yy" 6429 6433 { (yyval.en) = (ExpressionNode *)(yyvsp[(1) - (3)].en)->set_link( (yyvsp[(3) - (3)].en) ); } 6430 6434 break; … … 6433 6437 6434 6438 /* Line 1806 of yacc.c */ 6435 #line 94 4"parser.yy"6439 #line 948 "parser.yy" 6436 6440 { (yyval.en) = new AsmExprNode( 0, (yyvsp[(1) - (4)].constant), (yyvsp[(3) - (4)].en) ); } 6437 6441 break; … … 6440 6444 6441 6445 /* Line 1806 of yacc.c */ 6442 #line 9 46"parser.yy"6446 #line 950 "parser.yy" 6443 6447 { (yyval.en) = new AsmExprNode( (yyvsp[(2) - (7)].en), (yyvsp[(4) - (7)].constant), (yyvsp[(6) - (7)].en) ); } 6444 6448 break; … … 6447 6451 6448 6452 /* Line 1806 of yacc.c */ 6449 #line 95 1"parser.yy"6453 #line 955 "parser.yy" 6450 6454 { (yyval.constant) = 0; } 6451 6455 break; … … 6454 6458 6455 6459 /* Line 1806 of yacc.c */ 6456 #line 95 3"parser.yy"6460 #line 957 "parser.yy" 6457 6461 { (yyval.constant) = (yyvsp[(1) - (1)].constant); } 6458 6462 break; … … 6461 6465 6462 6466 /* Line 1806 of yacc.c */ 6463 #line 95 5"parser.yy"6467 #line 959 "parser.yy" 6464 6468 { (yyval.constant) = (ConstantNode *)(yyvsp[(1) - (3)].constant)->set_link( (yyvsp[(3) - (3)].constant) ); } 6465 6469 break; … … 6468 6472 6469 6473 /* Line 1806 of yacc.c */ 6470 #line 96 0"parser.yy"6474 #line 964 "parser.yy" 6471 6475 { (yyval.label) = new LabelNode(); (yyval.label)->append_label( (yyvsp[(1) - (1)].tok) ); } 6472 6476 break; … … 6475 6479 6476 6480 /* Line 1806 of yacc.c */ 6477 #line 96 2"parser.yy"6481 #line 966 "parser.yy" 6478 6482 { (yyval.label) = (yyvsp[(1) - (3)].label); (yyvsp[(1) - (3)].label)->append_label( (yyvsp[(3) - (3)].tok) ); } 6479 6483 break; … … 6482 6486 6483 6487 /* Line 1806 of yacc.c */ 6484 #line 9 69"parser.yy"6488 #line 973 "parser.yy" 6485 6489 { (yyval.decl) = 0; } 6486 6490 break; … … 6489 6493 6490 6494 /* Line 1806 of yacc.c */ 6491 #line 9 76"parser.yy"6495 #line 980 "parser.yy" 6492 6496 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ); } 6493 6497 break; … … 6496 6500 6497 6501 /* Line 1806 of yacc.c */ 6498 #line 98 1"parser.yy"6502 #line 985 "parser.yy" 6499 6503 { (yyval.decl) = 0; } 6500 6504 break; … … 6503 6507 6504 6508 /* Line 1806 of yacc.c */ 6505 #line 9 88"parser.yy"6509 #line 992 "parser.yy" 6506 6510 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ); } 6507 6511 break; … … 6510 6514 6511 6515 /* Line 1806 of yacc.c */ 6512 #line 100 2"parser.yy"6516 #line 1006 "parser.yy" 6513 6517 {} 6514 6518 break; … … 6517 6521 6518 6522 /* Line 1806 of yacc.c */ 6519 #line 100 3"parser.yy"6523 #line 1007 "parser.yy" 6520 6524 {} 6521 6525 break; … … 6524 6528 6525 6529 /* Line 1806 of yacc.c */ 6526 #line 103 2"parser.yy"6530 #line 1036 "parser.yy" 6527 6531 { 6528 6532 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6534 6538 6535 6539 /* Line 1806 of yacc.c */ 6536 #line 10 39"parser.yy"6540 #line 1043 "parser.yy" 6537 6541 { 6538 6542 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6544 6548 6545 6549 /* Line 1806 of yacc.c */ 6546 #line 104 4"parser.yy"6550 #line 1048 "parser.yy" 6547 6551 { 6548 6552 typedefTable.addToEnclosingScope( *(yyvsp[(5) - (6)].tok), TypedefTable::ID ); … … 6554 6558 6555 6559 /* Line 1806 of yacc.c */ 6556 #line 105 4"parser.yy"6560 #line 1058 "parser.yy" 6557 6561 { 6558 6562 typedefTable.setNextIdentifier( *(yyvsp[(2) - (3)].tok) ); … … 6564 6568 6565 6569 /* Line 1806 of yacc.c */ 6566 #line 10 59"parser.yy"6570 #line 1063 "parser.yy" 6567 6571 { 6568 6572 typedefTable.setNextIdentifier( *(yyvsp[(2) - (3)].tok) ); … … 6574 6578 6575 6579 /* Line 1806 of yacc.c */ 6576 #line 106 4"parser.yy"6580 #line 1068 "parser.yy" 6577 6581 { 6578 6582 typedefTable.setNextIdentifier( *(yyvsp[(3) - (4)].tok) ); … … 6584 6588 6585 6589 /* Line 1806 of yacc.c */ 6586 #line 107 2"parser.yy"6590 #line 1076 "parser.yy" 6587 6591 { 6588 6592 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6594 6598 6595 6599 /* Line 1806 of yacc.c */ 6596 #line 10 77"parser.yy"6600 #line 1081 "parser.yy" 6597 6601 { 6598 6602 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6604 6608 6605 6609 /* Line 1806 of yacc.c */ 6606 #line 108 2"parser.yy"6610 #line 1086 "parser.yy" 6607 6611 { 6608 6612 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6614 6618 6615 6619 /* Line 1806 of yacc.c */ 6616 #line 10 87"parser.yy"6620 #line 1091 "parser.yy" 6617 6621 { 6618 6622 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6624 6628 6625 6629 /* Line 1806 of yacc.c */ 6626 #line 109 2"parser.yy"6630 #line 1096 "parser.yy" 6627 6631 { 6628 6632 typedefTable.addToEnclosingScope( *(yyvsp[(5) - (5)].tok), TypedefTable::ID ); … … 6634 6638 6635 6639 /* Line 1806 of yacc.c */ 6636 #line 110 0"parser.yy"6640 #line 1104 "parser.yy" 6637 6641 { 6638 6642 (yyval.decl) = DeclarationNode::newFunction( (yyvsp[(3) - (8)].tok), DeclarationNode::newTuple( 0 ), (yyvsp[(6) - (8)].decl), 0, true ); … … 6641 6645 6642 6646 case 267: 6643 6644 /* Line 1806 of yacc.c */6645 #line 1123 "parser.yy"6646 {6647 (yyval.decl) = DeclarationNode::newFunction( (yyvsp[(2) - (7)].tok), (yyvsp[(1) - (7)].decl), (yyvsp[(5) - (7)].decl), 0, true );6648 }6649 break;6650 6651 case 268:6652 6647 6653 6648 /* Line 1806 of yacc.c */ … … 6658 6653 break; 6659 6654 6655 case 268: 6656 6657 /* Line 1806 of yacc.c */ 6658 #line 1131 "parser.yy" 6659 { 6660 (yyval.decl) = DeclarationNode::newFunction( (yyvsp[(2) - (7)].tok), (yyvsp[(1) - (7)].decl), (yyvsp[(5) - (7)].decl), 0, true ); 6661 } 6662 break; 6663 6660 6664 case 269: 6661 6665 6662 6666 /* Line 1806 of yacc.c */ 6663 #line 113 4"parser.yy"6667 #line 1138 "parser.yy" 6664 6668 { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (5)].decl) ); } 6665 6669 break; … … 6668 6672 6669 6673 /* Line 1806 of yacc.c */ 6670 #line 11 38"parser.yy"6674 #line 1142 "parser.yy" 6671 6675 { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (9)].decl)->appendList( (yyvsp[(7) - (9)].decl) ) ); } 6672 6676 break; … … 6675 6679 6676 6680 /* Line 1806 of yacc.c */ 6677 #line 114 3"parser.yy"6681 #line 1147 "parser.yy" 6678 6682 { 6679 6683 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6685 6689 6686 6690 /* Line 1806 of yacc.c */ 6687 #line 11 48"parser.yy"6691 #line 1152 "parser.yy" 6688 6692 { 6689 6693 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6695 6699 6696 6700 /* Line 1806 of yacc.c */ 6697 #line 115 3"parser.yy"6701 #line 1157 "parser.yy" 6698 6702 { 6699 6703 typedefTable.addToEnclosingScope( *(yyvsp[(5) - (5)].tok), TypedefTable::TD ); … … 6705 6709 6706 6710 /* Line 1806 of yacc.c */ 6707 #line 116 4"parser.yy"6711 #line 1168 "parser.yy" 6708 6712 { 6709 6713 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6715 6719 6716 6720 /* Line 1806 of yacc.c */ 6717 #line 11 69"parser.yy"6721 #line 1173 "parser.yy" 6718 6722 { 6719 6723 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6725 6729 6726 6730 /* Line 1806 of yacc.c */ 6727 #line 117 4"parser.yy"6731 #line 1178 "parser.yy" 6728 6732 { 6729 6733 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6735 6739 6736 6740 /* Line 1806 of yacc.c */ 6737 #line 11 79"parser.yy"6741 #line 1183 "parser.yy" 6738 6742 { 6739 6743 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6745 6749 6746 6750 /* Line 1806 of yacc.c */ 6747 #line 118 4"parser.yy"6751 #line 1188 "parser.yy" 6748 6752 { 6749 6753 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6755 6759 6756 6760 /* Line 1806 of yacc.c */ 6757 #line 119 3"parser.yy"6761 #line 1197 "parser.yy" 6758 6762 { 6759 6763 typedefTable.addToEnclosingScope( *(yyvsp[(2) - (4)].tok), TypedefTable::TD ); … … 6765 6769 6766 6770 /* Line 1806 of yacc.c */ 6767 #line 1 198"parser.yy"6771 #line 1202 "parser.yy" 6768 6772 { 6769 6773 typedefTable.addToEnclosingScope( *(yyvsp[(5) - (7)].tok), TypedefTable::TD ); … … 6775 6779 6776 6780 /* Line 1806 of yacc.c */ 6777 #line 121 5"parser.yy"6781 #line 1219 "parser.yy" 6778 6782 { 6779 6783 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6785 6789 6786 6790 /* Line 1806 of yacc.c */ 6787 #line 122 0"parser.yy"6791 #line 1224 "parser.yy" 6788 6792 { 6789 6793 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6795 6799 6796 6800 /* Line 1806 of yacc.c */ 6797 #line 124 2"parser.yy"6801 #line 1246 "parser.yy" 6798 6802 { (yyval.decl) = 0; } 6799 6803 break; … … 6802 6806 6803 6807 /* Line 1806 of yacc.c */ 6804 #line 125 4"parser.yy"6808 #line 1258 "parser.yy" 6805 6809 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 6806 6810 break; … … 6809 6813 6810 6814 /* Line 1806 of yacc.c */ 6811 #line 126 5"parser.yy"6815 #line 1269 "parser.yy" 6812 6816 { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Const ); } 6813 6817 break; … … 6816 6820 6817 6821 /* Line 1806 of yacc.c */ 6818 #line 12 67"parser.yy"6822 #line 1271 "parser.yy" 6819 6823 { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Restrict ); } 6820 6824 break; … … 6823 6827 6824 6828 /* Line 1806 of yacc.c */ 6825 #line 12 69"parser.yy"6829 #line 1273 "parser.yy" 6826 6830 { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Volatile ); } 6827 6831 break; … … 6830 6834 6831 6835 /* Line 1806 of yacc.c */ 6832 #line 127 1"parser.yy"6836 #line 1275 "parser.yy" 6833 6837 { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Lvalue ); } 6834 6838 break; … … 6837 6841 6838 6842 /* Line 1806 of yacc.c */ 6839 #line 127 3"parser.yy"6843 #line 1277 "parser.yy" 6840 6844 { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Atomic ); } 6841 6845 break; … … 6844 6848 6845 6849 /* Line 1806 of yacc.c */ 6846 #line 127 5"parser.yy"6850 #line 1279 "parser.yy" 6847 6851 { 6848 6852 typedefTable.enterScope(); … … 6853 6857 6854 6858 /* Line 1806 of yacc.c */ 6855 #line 12 79"parser.yy"6859 #line 1283 "parser.yy" 6856 6860 { 6857 6861 typedefTable.leaveScope(); … … 6863 6867 6864 6868 /* Line 1806 of yacc.c */ 6865 #line 12 88"parser.yy"6869 #line 1292 "parser.yy" 6866 6870 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 6867 6871 break; … … 6870 6874 6871 6875 /* Line 1806 of yacc.c */ 6872 #line 129 0"parser.yy"6876 #line 1294 "parser.yy" 6873 6877 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 6874 6878 break; … … 6877 6881 6878 6882 /* Line 1806 of yacc.c */ 6879 #line 130 1"parser.yy"6883 #line 1305 "parser.yy" 6880 6884 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 6881 6885 break; … … 6884 6888 6885 6889 /* Line 1806 of yacc.c */ 6886 #line 131 0"parser.yy"6890 #line 1314 "parser.yy" 6887 6891 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Extern ); } 6888 6892 break; … … 6891 6895 6892 6896 /* Line 1806 of yacc.c */ 6893 #line 131 2"parser.yy"6897 #line 1316 "parser.yy" 6894 6898 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Static ); } 6895 6899 break; … … 6898 6902 6899 6903 /* Line 1806 of yacc.c */ 6900 #line 131 4"parser.yy"6904 #line 1318 "parser.yy" 6901 6905 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Auto ); } 6902 6906 break; … … 6905 6909 6906 6910 /* Line 1806 of yacc.c */ 6907 #line 13 16"parser.yy"6911 #line 1320 "parser.yy" 6908 6912 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Register ); } 6909 6913 break; … … 6912 6916 6913 6917 /* Line 1806 of yacc.c */ 6914 #line 13 18"parser.yy"6918 #line 1322 "parser.yy" 6915 6919 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Inline ); } 6916 6920 break; … … 6919 6923 6920 6924 /* Line 1806 of yacc.c */ 6921 #line 132 0"parser.yy"6925 #line 1324 "parser.yy" 6922 6926 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Fortran ); } 6923 6927 break; … … 6926 6930 6927 6931 /* Line 1806 of yacc.c */ 6928 #line 132 2"parser.yy"6932 #line 1326 "parser.yy" 6929 6933 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Noreturn ); } 6930 6934 break; … … 6933 6937 6934 6938 /* Line 1806 of yacc.c */ 6935 #line 132 4"parser.yy"6939 #line 1328 "parser.yy" 6936 6940 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Threadlocal ); } 6937 6941 break; … … 6940 6944 6941 6945 /* Line 1806 of yacc.c */ 6942 #line 13 29"parser.yy"6946 #line 1333 "parser.yy" 6943 6947 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Char ); } 6944 6948 break; … … 6947 6951 6948 6952 /* Line 1806 of yacc.c */ 6949 #line 133 1"parser.yy"6953 #line 1335 "parser.yy" 6950 6954 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Double ); } 6951 6955 break; … … 6954 6958 6955 6959 /* Line 1806 of yacc.c */ 6956 #line 133 3"parser.yy"6960 #line 1337 "parser.yy" 6957 6961 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Float ); } 6958 6962 break; … … 6961 6965 6962 6966 /* Line 1806 of yacc.c */ 6963 #line 133 5"parser.yy"6967 #line 1339 "parser.yy" 6964 6968 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Int ); } 6965 6969 break; … … 6968 6972 6969 6973 /* Line 1806 of yacc.c */ 6970 #line 13 37"parser.yy"6974 #line 1341 "parser.yy" 6971 6975 { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Long ); } 6972 6976 break; … … 6975 6979 6976 6980 /* Line 1806 of yacc.c */ 6977 #line 13 39"parser.yy"6981 #line 1343 "parser.yy" 6978 6982 { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Short ); } 6979 6983 break; … … 6982 6986 6983 6987 /* Line 1806 of yacc.c */ 6984 #line 134 1"parser.yy"6988 #line 1345 "parser.yy" 6985 6989 { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Signed ); } 6986 6990 break; … … 6989 6993 6990 6994 /* Line 1806 of yacc.c */ 6991 #line 134 3"parser.yy"6995 #line 1347 "parser.yy" 6992 6996 { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Unsigned ); } 6993 6997 break; … … 6996 7000 6997 7001 /* Line 1806 of yacc.c */ 6998 #line 134 5"parser.yy"7002 #line 1349 "parser.yy" 6999 7003 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Void ); } 7000 7004 break; … … 7003 7007 7004 7008 /* Line 1806 of yacc.c */ 7005 #line 13 47"parser.yy"7009 #line 1351 "parser.yy" 7006 7010 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Bool ); } 7007 7011 break; … … 7010 7014 7011 7015 /* Line 1806 of yacc.c */ 7012 #line 13 49"parser.yy"7016 #line 1353 "parser.yy" 7013 7017 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Complex ); } 7014 7018 break; … … 7017 7021 7018 7022 /* Line 1806 of yacc.c */ 7019 #line 135 1"parser.yy"7023 #line 1355 "parser.yy" 7020 7024 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Imaginary ); } 7021 7025 break; … … 7024 7028 7025 7029 /* Line 1806 of yacc.c */ 7026 #line 135 3"parser.yy"7030 #line 1357 "parser.yy" 7027 7031 { (yyval.decl) = DeclarationNode::newBuiltinType( DeclarationNode::Valist ); } 7028 7032 break; … … 7031 7035 7032 7036 /* Line 1806 of yacc.c */ 7033 #line 136 0"parser.yy"7037 #line 1364 "parser.yy" 7034 7038 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7035 7039 break; … … 7038 7042 7039 7043 /* Line 1806 of yacc.c */ 7040 #line 136 2"parser.yy"7044 #line 1366 "parser.yy" 7041 7045 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 7042 7046 break; … … 7045 7049 7046 7050 /* Line 1806 of yacc.c */ 7047 #line 136 4"parser.yy"7051 #line 1368 "parser.yy" 7048 7052 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 7049 7053 break; … … 7052 7056 7053 7057 /* Line 1806 of yacc.c */ 7054 #line 13 66"parser.yy"7058 #line 1370 "parser.yy" 7055 7059 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addType( (yyvsp[(1) - (3)].decl) ); } 7056 7060 break; … … 7059 7063 7060 7064 /* Line 1806 of yacc.c */ 7061 #line 137 2"parser.yy"7065 #line 1376 "parser.yy" 7062 7066 { (yyval.decl) = (yyvsp[(2) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 7063 7067 break; … … 7066 7070 7067 7071 /* Line 1806 of yacc.c */ 7068 #line 13 79"parser.yy"7072 #line 1383 "parser.yy" 7069 7073 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7070 7074 break; … … 7073 7077 7074 7078 /* Line 1806 of yacc.c */ 7075 #line 138 1"parser.yy"7079 #line 1385 "parser.yy" 7076 7080 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 7077 7081 break; … … 7080 7084 7081 7085 /* Line 1806 of yacc.c */ 7082 #line 138 3"parser.yy"7086 #line 1387 "parser.yy" 7083 7087 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addType( (yyvsp[(2) - (2)].decl) ); } 7084 7088 break; … … 7087 7091 7088 7092 /* Line 1806 of yacc.c */ 7089 #line 13 88"parser.yy"7093 #line 1392 "parser.yy" 7090 7094 { (yyval.decl) = (yyvsp[(3) - (4)].decl); } 7091 7095 break; … … 7094 7098 7095 7099 /* Line 1806 of yacc.c */ 7096 #line 139 0"parser.yy"7100 #line 1394 "parser.yy" 7097 7101 { (yyval.decl) = DeclarationNode::newTypeof( (yyvsp[(3) - (4)].en) ); } 7098 7102 break; … … 7101 7105 7102 7106 /* Line 1806 of yacc.c */ 7103 #line 139 2"parser.yy"7107 #line 1396 "parser.yy" 7104 7108 { (yyval.decl) = DeclarationNode::newAttr( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].decl) ); } 7105 7109 break; … … 7108 7112 7109 7113 /* Line 1806 of yacc.c */ 7110 #line 139 4"parser.yy"7114 #line 1398 "parser.yy" 7111 7115 { (yyval.decl) = DeclarationNode::newAttr( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].en) ); } 7112 7116 break; … … 7115 7119 7116 7120 /* Line 1806 of yacc.c */ 7117 #line 140 0"parser.yy"7121 #line 1404 "parser.yy" 7118 7122 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7119 7123 break; … … 7122 7126 7123 7127 /* Line 1806 of yacc.c */ 7124 #line 140 2"parser.yy"7128 #line 1406 "parser.yy" 7125 7129 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 7126 7130 break; … … 7129 7133 7130 7134 /* Line 1806 of yacc.c */ 7131 #line 140 4"parser.yy"7135 #line 1408 "parser.yy" 7132 7136 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 7133 7137 break; … … 7136 7140 7137 7141 /* Line 1806 of yacc.c */ 7138 #line 141 0"parser.yy"7142 #line 1414 "parser.yy" 7139 7143 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7140 7144 break; … … 7143 7147 7144 7148 /* Line 1806 of yacc.c */ 7145 #line 141 2"parser.yy"7149 #line 1416 "parser.yy" 7146 7150 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 7147 7151 break; … … 7150 7154 7151 7155 /* Line 1806 of yacc.c */ 7152 #line 14 18"parser.yy"7156 #line 1422 "parser.yy" 7153 7157 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7154 7158 break; … … 7157 7161 7158 7162 /* Line 1806 of yacc.c */ 7159 #line 142 0"parser.yy"7163 #line 1424 "parser.yy" 7160 7164 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 7161 7165 break; … … 7164 7168 7165 7169 /* Line 1806 of yacc.c */ 7166 #line 142 2"parser.yy"7170 #line 1426 "parser.yy" 7167 7171 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 7168 7172 break; … … 7171 7175 7172 7176 /* Line 1806 of yacc.c */ 7173 #line 14 27"parser.yy"7177 #line 1431 "parser.yy" 7174 7178 { (yyval.decl) = DeclarationNode::newFromTypedef( (yyvsp[(1) - (1)].tok) ); } 7175 7179 break; … … 7178 7182 7179 7183 /* Line 1806 of yacc.c */ 7180 #line 14 29"parser.yy"7184 #line 1433 "parser.yy" 7181 7185 { (yyval.decl) = DeclarationNode::newFromTypedef( (yyvsp[(2) - (2)].tok) )->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7182 7186 break; … … 7185 7189 7186 7190 /* Line 1806 of yacc.c */ 7187 #line 143 1"parser.yy"7191 #line 1435 "parser.yy" 7188 7192 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 7189 7193 break; … … 7192 7196 7193 7197 /* Line 1806 of yacc.c */ 7194 #line 144 1"parser.yy"7198 #line 1445 "parser.yy" 7195 7199 { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (4)].aggKey), 0, 0, (yyvsp[(3) - (4)].decl) ); } 7196 7200 break; … … 7199 7203 7200 7204 /* Line 1806 of yacc.c */ 7201 #line 144 3"parser.yy"7205 #line 1447 "parser.yy" 7202 7206 { 7203 7207 typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) ); … … 7209 7213 7210 7214 /* Line 1806 of yacc.c */ 7211 #line 14 48"parser.yy"7215 #line 1452 "parser.yy" 7212 7216 { typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) ); } 7213 7217 break; … … 7216 7220 7217 7221 /* Line 1806 of yacc.c */ 7218 #line 145 0"parser.yy"7222 #line 1454 "parser.yy" 7219 7223 { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (6)].aggKey), (yyvsp[(2) - (6)].tok), 0, (yyvsp[(5) - (6)].decl)); } 7220 7224 break; … … 7223 7227 7224 7228 /* Line 1806 of yacc.c */ 7225 #line 145 2"parser.yy"7229 #line 1456 "parser.yy" 7226 7230 { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (7)].aggKey), 0, (yyvsp[(3) - (7)].en), (yyvsp[(6) - (7)].decl) ); } 7227 7231 break; … … 7230 7234 7231 7235 /* Line 1806 of yacc.c */ 7232 #line 145 4"parser.yy"7236 #line 1458 "parser.yy" 7233 7237 { (yyval.decl) = (yyvsp[(2) - (2)].decl); } 7234 7238 break; … … 7237 7241 7238 7242 /* Line 1806 of yacc.c */ 7239 #line 14 59"parser.yy"7243 #line 1463 "parser.yy" 7240 7244 { (yyval.aggKey) = DeclarationNode::Struct; } 7241 7245 break; … … 7244 7248 7245 7249 /* Line 1806 of yacc.c */ 7246 #line 146 1"parser.yy"7250 #line 1465 "parser.yy" 7247 7251 { (yyval.aggKey) = DeclarationNode::Union; } 7248 7252 break; … … 7251 7255 7252 7256 /* Line 1806 of yacc.c */ 7253 #line 14 66"parser.yy"7257 #line 1470 "parser.yy" 7254 7258 { (yyval.decl) = (yyvsp[(1) - (1)].decl); } 7255 7259 break; … … 7258 7262 7259 7263 /* Line 1806 of yacc.c */ 7260 #line 14 68"parser.yy"7264 #line 1472 "parser.yy" 7261 7265 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(2) - (2)].decl) ); } 7262 7266 break; … … 7265 7269 7266 7270 /* Line 1806 of yacc.c */ 7267 #line 147 4"parser.yy"7268 { (yyval.decl) = (yyvsp[(2) - (3)].decl) /*->set_extension( true )*/; }7271 #line 1478 "parser.yy" 7272 { (yyval.decl) = (yyvsp[(2) - (3)].decl)->set_extension( true ); } 7269 7273 break; 7270 7274 … … 7272 7276 7273 7277 /* Line 1806 of yacc.c */ 7274 #line 1477 "parser.yy" 7275 { (yyval.decl) = (yyvsp[(2) - (3)].decl)/*->set_extension( true )*/; } 7278 #line 1481 "parser.yy" 7279 { // mark all fields in list 7280 for ( DeclarationNode *iter = (yyvsp[(2) - (3)].decl); iter != NULL; iter = (DeclarationNode *)iter->get_link() ) 7281 iter->set_extension( true ); 7282 (yyval.decl) = (yyvsp[(2) - (3)].decl); 7283 } 7276 7284 break; 7277 7285 … … 7279 7287 7280 7288 /* Line 1806 of yacc.c */ 7281 #line 14 83"parser.yy"7289 #line 1491 "parser.yy" 7282 7290 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addName( (yyvsp[(2) - (2)].tok) ); } 7283 7291 break; … … 7286 7294 7287 7295 /* Line 1806 of yacc.c */ 7288 #line 14 85"parser.yy"7296 #line 1493 "parser.yy" 7289 7297 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(1) - (3)].decl)->cloneType( (yyvsp[(3) - (3)].tok) ) ); } 7290 7298 break; … … 7293 7301 7294 7302 /* Line 1806 of yacc.c */ 7295 #line 14 87"parser.yy"7303 #line 1495 "parser.yy" 7296 7304 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(1) - (2)].decl)->cloneType( 0 ) ); } 7297 7305 break; … … 7300 7308 7301 7309 /* Line 1806 of yacc.c */ 7302 #line 1 492"parser.yy"7310 #line 1500 "parser.yy" 7303 7311 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); } 7304 7312 break; … … 7307 7315 7308 7316 /* Line 1806 of yacc.c */ 7309 #line 1 494"parser.yy"7317 #line 1502 "parser.yy" 7310 7318 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( (yyvsp[(1) - (4)].decl)->cloneBaseType( (yyvsp[(4) - (4)].decl) ) ); } 7311 7319 break; … … 7314 7322 7315 7323 /* Line 1806 of yacc.c */ 7316 #line 1 499"parser.yy"7324 #line 1507 "parser.yy" 7317 7325 { (yyval.decl) = DeclarationNode::newName( 0 ); /* XXX */ } 7318 7326 break; … … 7321 7329 7322 7330 /* Line 1806 of yacc.c */ 7323 #line 150 1"parser.yy"7331 #line 1509 "parser.yy" 7324 7332 { (yyval.decl) = DeclarationNode::newBitfield( (yyvsp[(1) - (1)].en) ); } 7325 7333 break; … … 7328 7336 7329 7337 /* Line 1806 of yacc.c */ 7330 #line 15 04"parser.yy"7338 #line 1512 "parser.yy" 7331 7339 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addBitfield( (yyvsp[(2) - (2)].en) ); } 7332 7340 break; … … 7335 7343 7336 7344 /* Line 1806 of yacc.c */ 7337 #line 15 07"parser.yy"7345 #line 1515 "parser.yy" 7338 7346 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addBitfield( (yyvsp[(2) - (2)].en) ); } 7339 7347 break; … … 7342 7350 7343 7351 /* Line 1806 of yacc.c */ 7344 #line 15 13"parser.yy"7352 #line 1521 "parser.yy" 7345 7353 { (yyval.en) = 0; } 7346 7354 break; … … 7349 7357 7350 7358 /* Line 1806 of yacc.c */ 7351 #line 15 15"parser.yy"7359 #line 1523 "parser.yy" 7352 7360 { (yyval.en) = (yyvsp[(1) - (1)].en); } 7353 7361 break; … … 7356 7364 7357 7365 /* Line 1806 of yacc.c */ 7358 #line 152 0"parser.yy"7366 #line 1528 "parser.yy" 7359 7367 { (yyval.en) = (yyvsp[(2) - (2)].en); } 7360 7368 break; … … 7363 7371 7364 7372 /* Line 1806 of yacc.c */ 7365 #line 15 29"parser.yy"7373 #line 1537 "parser.yy" 7366 7374 { (yyval.decl) = DeclarationNode::newEnum( 0, (yyvsp[(3) - (5)].decl) ); } 7367 7375 break; … … 7370 7378 7371 7379 /* Line 1806 of yacc.c */ 7372 #line 153 1"parser.yy"7380 #line 1539 "parser.yy" 7373 7381 { 7374 7382 typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) ); … … 7380 7388 7381 7389 /* Line 1806 of yacc.c */ 7382 #line 15 36"parser.yy"7390 #line 1544 "parser.yy" 7383 7391 { typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) ); } 7384 7392 break; … … 7387 7395 7388 7396 /* Line 1806 of yacc.c */ 7389 #line 15 38"parser.yy"7397 #line 1546 "parser.yy" 7390 7398 { (yyval.decl) = DeclarationNode::newEnum( (yyvsp[(2) - (7)].tok), (yyvsp[(5) - (7)].decl) ); } 7391 7399 break; … … 7394 7402 7395 7403 /* Line 1806 of yacc.c */ 7396 #line 15 43"parser.yy"7404 #line 1551 "parser.yy" 7397 7405 { (yyval.decl) = DeclarationNode::newEnumConstant( (yyvsp[(1) - (2)].tok), (yyvsp[(2) - (2)].en) ); } 7398 7406 break; … … 7401 7409 7402 7410 /* Line 1806 of yacc.c */ 7403 #line 15 45"parser.yy"7411 #line 1553 "parser.yy" 7404 7412 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( DeclarationNode::newEnumConstant( (yyvsp[(3) - (4)].tok), (yyvsp[(4) - (4)].en) ) ); } 7405 7413 break; … … 7408 7416 7409 7417 /* Line 1806 of yacc.c */ 7410 #line 155 0"parser.yy"7418 #line 1558 "parser.yy" 7411 7419 { (yyval.en) = 0; } 7412 7420 break; … … 7415 7423 7416 7424 /* Line 1806 of yacc.c */ 7417 #line 15 52"parser.yy"7425 #line 1560 "parser.yy" 7418 7426 { (yyval.en) = (yyvsp[(2) - (2)].en); } 7419 7427 break; … … 7422 7430 7423 7431 /* Line 1806 of yacc.c */ 7424 #line 15 59"parser.yy"7432 #line 1567 "parser.yy" 7425 7433 { (yyval.decl) = 0; } 7426 7434 break; … … 7429 7437 7430 7438 /* Line 1806 of yacc.c */ 7431 #line 15 67"parser.yy"7439 #line 1575 "parser.yy" 7432 7440 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); } 7433 7441 break; … … 7436 7444 7437 7445 /* Line 1806 of yacc.c */ 7438 #line 15 69"parser.yy"7446 #line 1577 "parser.yy" 7439 7447 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); } 7440 7448 break; … … 7443 7451 7444 7452 /* Line 1806 of yacc.c */ 7445 #line 157 1"parser.yy"7453 #line 1579 "parser.yy" 7446 7454 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); } 7447 7455 break; … … 7450 7458 7451 7459 /* Line 1806 of yacc.c */ 7452 #line 15 79"parser.yy"7460 #line 1587 "parser.yy" 7453 7461 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); } 7454 7462 break; 7455 7463 7456 7464 case 412: 7457 7458 /* Line 1806 of yacc.c */7459 #line 1581 "parser.yy"7460 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }7461 break;7462 7463 case 413:7464 7465 /* Line 1806 of yacc.c */7466 #line 1583 "parser.yy"7467 { (yyval.decl) = (yyvsp[(1) - (9)].decl)->appendList( (yyvsp[(5) - (9)].decl) )->appendList( (yyvsp[(9) - (9)].decl) ); }7468 break;7469 7470 case 415:7471 7465 7472 7466 /* Line 1806 of yacc.c */ … … 7475 7469 break; 7476 7470 7471 case 413: 7472 7473 /* Line 1806 of yacc.c */ 7474 #line 1591 "parser.yy" 7475 { (yyval.decl) = (yyvsp[(1) - (9)].decl)->appendList( (yyvsp[(5) - (9)].decl) )->appendList( (yyvsp[(9) - (9)].decl) ); } 7476 break; 7477 7478 case 415: 7479 7480 /* Line 1806 of yacc.c */ 7481 #line 1597 "parser.yy" 7482 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); } 7483 break; 7484 7477 7485 case 416: 7478 7486 7479 7487 /* Line 1806 of yacc.c */ 7480 #line 1 594"parser.yy"7488 #line 1602 "parser.yy" 7481 7489 { (yyval.decl) = 0; } 7482 7490 break; … … 7485 7493 7486 7494 /* Line 1806 of yacc.c */ 7487 #line 160 1"parser.yy"7495 #line 1609 "parser.yy" 7488 7496 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); } 7489 7497 break; … … 7492 7500 7493 7501 /* Line 1806 of yacc.c */ 7494 #line 16 08"parser.yy"7502 #line 1616 "parser.yy" 7495 7503 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); } 7496 7504 break; … … 7499 7507 7500 7508 /* Line 1806 of yacc.c */ 7501 #line 161 0"parser.yy"7509 #line 1618 "parser.yy" 7502 7510 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); } 7503 7511 break; … … 7506 7514 7507 7515 /* Line 1806 of yacc.c */ 7508 #line 16 19"parser.yy"7516 #line 1627 "parser.yy" 7509 7517 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addName( (yyvsp[(2) - (3)].tok) ); } 7510 7518 break; … … 7513 7521 7514 7522 /* Line 1806 of yacc.c */ 7515 #line 16 22"parser.yy"7523 #line 1630 "parser.yy" 7516 7524 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addName( (yyvsp[(2) - (3)].tok) ); } 7517 7525 break; … … 7520 7528 7521 7529 /* Line 1806 of yacc.c */ 7522 #line 16 24"parser.yy"7530 #line 1632 "parser.yy" 7523 7531 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addName( (yyvsp[(3) - (4)].tok) )->addQualifiers( (yyvsp[(1) - (4)].decl) ); } 7524 7532 break; … … 7527 7535 7528 7536 /* Line 1806 of yacc.c */ 7529 #line 16 34"parser.yy"7537 #line 1642 "parser.yy" 7530 7538 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7531 7539 break; … … 7534 7542 7535 7543 /* Line 1806 of yacc.c */ 7536 #line 164 0"parser.yy"7544 #line 1648 "parser.yy" 7537 7545 { 7538 7546 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7544 7552 7545 7553 /* Line 1806 of yacc.c */ 7546 #line 16 45"parser.yy"7554 #line 1653 "parser.yy" 7547 7555 { 7548 7556 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7554 7562 7555 7563 /* Line 1806 of yacc.c */ 7556 #line 16 54"parser.yy"7564 #line 1662 "parser.yy" 7557 7565 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); } 7558 7566 break; … … 7561 7569 7562 7570 /* Line 1806 of yacc.c */ 7563 #line 16 63"parser.yy"7571 #line 1671 "parser.yy" 7564 7572 { (yyval.decl) = DeclarationNode::newName( (yyvsp[(1) - (1)].tok) ); } 7565 7573 break; … … 7568 7576 7569 7577 /* Line 1806 of yacc.c */ 7570 #line 16 65"parser.yy"7578 #line 1673 "parser.yy" 7571 7579 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( DeclarationNode::newName( (yyvsp[(3) - (3)].tok) ) ); } 7572 7580 break; 7573 7581 7574 7582 case 451: 7575 7576 /* Line 1806 of yacc.c */7577 #line 1690 "parser.yy"7578 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); }7579 break;7580 7581 case 455:7582 7583 7583 7584 /* Line 1806 of yacc.c */ … … 7586 7587 break; 7587 7588 7589 case 455: 7590 7591 /* Line 1806 of yacc.c */ 7592 #line 1706 "parser.yy" 7593 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); } 7594 break; 7595 7588 7596 case 456: 7589 7597 7590 7598 /* Line 1806 of yacc.c */ 7591 #line 17 03"parser.yy"7599 #line 1711 "parser.yy" 7592 7600 { (yyval.in) = 0; } 7593 7601 break; … … 7596 7604 7597 7605 /* Line 1806 of yacc.c */ 7598 #line 17 05"parser.yy"7606 #line 1713 "parser.yy" 7599 7607 { (yyval.in) = (yyvsp[(2) - (2)].in); } 7600 7608 break; … … 7603 7611 7604 7612 /* Line 1806 of yacc.c */ 7605 #line 17 07"parser.yy"7613 #line 1715 "parser.yy" 7606 7614 { (yyval.in) = (yyvsp[(2) - (2)].in)->set_maybeConstructed( false ); } 7607 7615 break; … … 7610 7618 7611 7619 /* Line 1806 of yacc.c */ 7612 #line 171 1"parser.yy"7620 #line 1719 "parser.yy" 7613 7621 { (yyval.in) = new InitializerNode( (yyvsp[(1) - (1)].en) ); } 7614 7622 break; … … 7617 7625 7618 7626 /* Line 1806 of yacc.c */ 7619 #line 17 12"parser.yy"7627 #line 1720 "parser.yy" 7620 7628 { (yyval.in) = new InitializerNode( (yyvsp[(2) - (4)].in), true ); } 7621 7629 break; … … 7624 7632 7625 7633 /* Line 1806 of yacc.c */ 7626 #line 17 17"parser.yy"7634 #line 1725 "parser.yy" 7627 7635 { (yyval.in) = 0; } 7628 7636 break; … … 7631 7639 7632 7640 /* Line 1806 of yacc.c */ 7633 #line 17 19"parser.yy"7641 #line 1727 "parser.yy" 7634 7642 { (yyval.in) = (yyvsp[(2) - (2)].in)->set_designators( (yyvsp[(1) - (2)].en) ); } 7635 7643 break; … … 7638 7646 7639 7647 /* Line 1806 of yacc.c */ 7640 #line 172 0"parser.yy"7648 #line 1728 "parser.yy" 7641 7649 { (yyval.in) = (InitializerNode *)( (yyvsp[(1) - (3)].in)->set_link( (yyvsp[(3) - (3)].in) ) ); } 7642 7650 break; … … 7645 7653 7646 7654 /* Line 1806 of yacc.c */ 7647 #line 17 22"parser.yy"7655 #line 1730 "parser.yy" 7648 7656 { (yyval.in) = (InitializerNode *)( (yyvsp[(1) - (4)].in)->set_link( (yyvsp[(4) - (4)].in)->set_designators( (yyvsp[(3) - (4)].en) ) ) ); } 7649 7657 break; … … 7652 7660 7653 7661 /* Line 1806 of yacc.c */ 7654 #line 17 38"parser.yy"7662 #line 1746 "parser.yy" 7655 7663 { (yyval.en) = new VarRefNode( (yyvsp[(1) - (2)].tok) ); } 7656 7664 break; … … 7659 7667 7660 7668 /* Line 1806 of yacc.c */ 7661 #line 17 44"parser.yy"7669 #line 1752 "parser.yy" 7662 7670 { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (2)].en)->set_link( (yyvsp[(2) - (2)].en) )); } 7663 7671 break; … … 7666 7674 7667 7675 /* Line 1806 of yacc.c */ 7668 #line 17 52"parser.yy"7676 #line 1760 "parser.yy" 7669 7677 { (yyval.en) = new DesignatorNode( new VarRefNode( (yyvsp[(1) - (1)].tok) ) ); } 7670 7678 break; … … 7673 7681 7674 7682 /* Line 1806 of yacc.c */ 7675 #line 17 54"parser.yy"7683 #line 1762 "parser.yy" 7676 7684 { (yyval.en) = new DesignatorNode( new VarRefNode( (yyvsp[(2) - (2)].tok) ) ); } 7677 7685 break; … … 7680 7688 7681 7689 /* Line 1806 of yacc.c */ 7682 #line 17 57"parser.yy"7690 #line 1765 "parser.yy" 7683 7691 { (yyval.en) = new DesignatorNode( (yyvsp[(3) - (5)].en), true ); } 7684 7692 break; … … 7687 7695 7688 7696 /* Line 1806 of yacc.c */ 7689 #line 17 59"parser.yy"7697 #line 1767 "parser.yy" 7690 7698 { (yyval.en) = new DesignatorNode( (yyvsp[(3) - (5)].en), true ); } 7691 7699 break; … … 7694 7702 7695 7703 /* Line 1806 of yacc.c */ 7696 #line 176 1"parser.yy"7704 #line 1769 "parser.yy" 7697 7705 { (yyval.en) = new DesignatorNode( new CompositeExprNode( new OperatorNode( OperatorNode::Range ), (yyvsp[(3) - (7)].en), (yyvsp[(5) - (7)].en) ), true ); } 7698 7706 break; … … 7701 7709 7702 7710 /* Line 1806 of yacc.c */ 7703 #line 17 63"parser.yy"7711 #line 1771 "parser.yy" 7704 7712 { (yyval.en) = new DesignatorNode( (yyvsp[(4) - (6)].en) ); } 7705 7713 break; … … 7708 7716 7709 7717 /* Line 1806 of yacc.c */ 7710 #line 17 87"parser.yy"7718 #line 1795 "parser.yy" 7711 7719 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7712 7720 break; … … 7715 7723 7716 7724 /* Line 1806 of yacc.c */ 7717 #line 17 89"parser.yy"7725 #line 1797 "parser.yy" 7718 7726 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 7719 7727 break; … … 7722 7730 7723 7731 /* Line 1806 of yacc.c */ 7724 #line 179 1"parser.yy"7732 #line 1799 "parser.yy" 7725 7733 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 7726 7734 break; … … 7729 7737 7730 7738 /* Line 1806 of yacc.c */ 7731 #line 1 797"parser.yy"7739 #line 1805 "parser.yy" 7732 7740 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7733 7741 break; … … 7736 7744 7737 7745 /* Line 1806 of yacc.c */ 7738 #line 1 799"parser.yy"7746 #line 1807 "parser.yy" 7739 7747 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 7740 7748 break; … … 7743 7751 7744 7752 /* Line 1806 of yacc.c */ 7745 #line 18 04"parser.yy"7753 #line 1812 "parser.yy" 7746 7754 { (yyval.decl) = DeclarationNode::newFromTypeGen( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].en) ); } 7747 7755 break; … … 7750 7758 7751 7759 /* Line 1806 of yacc.c */ 7752 #line 181 0"parser.yy"7760 #line 1818 "parser.yy" 7753 7761 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( (yyvsp[(3) - (4)].decl) ); } 7754 7762 break; … … 7757 7765 7758 7766 /* Line 1806 of yacc.c */ 7759 #line 18 15"parser.yy"7767 #line 1823 "parser.yy" 7760 7768 { typedefTable.addToEnclosingScope( *(yyvsp[(2) - (2)].tok), TypedefTable::TD ); } 7761 7769 break; … … 7764 7772 7765 7773 /* Line 1806 of yacc.c */ 7766 #line 18 17"parser.yy"7774 #line 1825 "parser.yy" 7767 7775 { (yyval.decl) = DeclarationNode::newTypeParam( (yyvsp[(1) - (4)].tclass), (yyvsp[(2) - (4)].tok) )->addAssertions( (yyvsp[(4) - (4)].decl) ); } 7768 7776 break; … … 7771 7779 7772 7780 /* Line 1806 of yacc.c */ 7773 #line 18 23"parser.yy"7781 #line 1831 "parser.yy" 7774 7782 { (yyval.tclass) = DeclarationNode::Type; } 7775 7783 break; … … 7778 7786 7779 7787 /* Line 1806 of yacc.c */ 7780 #line 18 25"parser.yy"7788 #line 1833 "parser.yy" 7781 7789 { (yyval.tclass) = DeclarationNode::Ftype; } 7782 7790 break; … … 7785 7793 7786 7794 /* Line 1806 of yacc.c */ 7787 #line 18 27"parser.yy"7795 #line 1835 "parser.yy" 7788 7796 { (yyval.tclass) = DeclarationNode::Dtype; } 7789 7797 break; … … 7792 7800 7793 7801 /* Line 1806 of yacc.c */ 7794 #line 18 32"parser.yy"7802 #line 1840 "parser.yy" 7795 7803 { (yyval.decl) = 0; } 7796 7804 break; … … 7799 7807 7800 7808 /* Line 1806 of yacc.c */ 7801 #line 18 34"parser.yy"7809 #line 1842 "parser.yy" 7802 7810 { (yyval.decl) = (yyvsp[(1) - (2)].decl) == 0 ? (yyvsp[(2) - (2)].decl) : (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(2) - (2)].decl) ); } 7803 7811 break; … … 7806 7814 7807 7815 /* Line 1806 of yacc.c */ 7808 #line 18 39"parser.yy"7816 #line 1847 "parser.yy" 7809 7817 { 7810 7818 typedefTable.openTrait( *(yyvsp[(2) - (5)].tok) ); … … 7816 7824 7817 7825 /* Line 1806 of yacc.c */ 7818 #line 18 44"parser.yy"7826 #line 1852 "parser.yy" 7819 7827 { (yyval.decl) = (yyvsp[(4) - (5)].decl); } 7820 7828 break; … … 7823 7831 7824 7832 /* Line 1806 of yacc.c */ 7825 #line 18 46"parser.yy"7833 #line 1854 "parser.yy" 7826 7834 { (yyval.decl) = 0; } 7827 7835 break; … … 7830 7838 7831 7839 /* Line 1806 of yacc.c */ 7832 #line 185 1"parser.yy"7840 #line 1859 "parser.yy" 7833 7841 { (yyval.en) = new TypeValueNode( (yyvsp[(1) - (1)].decl) ); } 7834 7842 break; … … 7837 7845 7838 7846 /* Line 1806 of yacc.c */ 7839 #line 18 54"parser.yy"7847 #line 1862 "parser.yy" 7840 7848 { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_link( new TypeValueNode( (yyvsp[(3) - (3)].decl) ))); } 7841 7849 break; … … 7844 7852 7845 7853 /* Line 1806 of yacc.c */ 7846 #line 18 56"parser.yy"7854 #line 1864 "parser.yy" 7847 7855 { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_link( (yyvsp[(3) - (3)].en) )); } 7848 7856 break; … … 7851 7859 7852 7860 /* Line 1806 of yacc.c */ 7853 #line 186 1"parser.yy"7861 #line 1869 "parser.yy" 7854 7862 { (yyval.decl) = (yyvsp[(2) - (2)].decl); } 7855 7863 break; … … 7858 7866 7859 7867 /* Line 1806 of yacc.c */ 7860 #line 18 63"parser.yy"7868 #line 1871 "parser.yy" 7861 7869 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) ); } 7862 7870 break; … … 7865 7873 7866 7874 /* Line 1806 of yacc.c */ 7867 #line 18 65"parser.yy"7875 #line 1873 "parser.yy" 7868 7876 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl)->copyStorageClasses( (yyvsp[(1) - (3)].decl) ) ); } 7869 7877 break; … … 7872 7880 7873 7881 /* Line 1806 of yacc.c */ 7874 #line 187 0"parser.yy"7882 #line 1878 "parser.yy" 7875 7883 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addAssertions( (yyvsp[(2) - (2)].decl) ); } 7876 7884 break; … … 7879 7887 7880 7888 /* Line 1806 of yacc.c */ 7881 #line 18 72"parser.yy"7889 #line 1880 "parser.yy" 7882 7890 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->addAssertions( (yyvsp[(2) - (4)].decl) )->addType( (yyvsp[(4) - (4)].decl) ); } 7883 7891 break; … … 7886 7894 7887 7895 /* Line 1806 of yacc.c */ 7888 #line 18 77"parser.yy"7896 #line 1885 "parser.yy" 7889 7897 { 7890 7898 typedefTable.addToEnclosingScope( *(yyvsp[(1) - (1)].tok), TypedefTable::TD ); … … 7896 7904 7897 7905 /* Line 1806 of yacc.c */ 7898 #line 18 82"parser.yy"7906 #line 1890 "parser.yy" 7899 7907 { 7900 7908 typedefTable.addToEnclosingScope( *(yyvsp[(1) - (6)].tok), TypedefTable::TG ); … … 7906 7914 7907 7915 /* Line 1806 of yacc.c */ 7908 #line 189 0"parser.yy"7916 #line 1898 "parser.yy" 7909 7917 { 7910 7918 typedefTable.addToEnclosingScope( *(yyvsp[(2) - (9)].tok), TypedefTable::ID ); … … 7916 7924 7917 7925 /* Line 1806 of yacc.c */ 7918 #line 1 895"parser.yy"7926 #line 1903 "parser.yy" 7919 7927 { 7920 7928 typedefTable.enterTrait( *(yyvsp[(2) - (8)].tok) ); … … 7926 7934 7927 7935 /* Line 1806 of yacc.c */ 7928 #line 190 0"parser.yy"7936 #line 1908 "parser.yy" 7929 7937 { 7930 7938 typedefTable.leaveTrait(); … … 7937 7945 7938 7946 /* Line 1806 of yacc.c */ 7939 #line 191 0"parser.yy"7947 #line 1918 "parser.yy" 7940 7948 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ); } 7941 7949 break; … … 7944 7952 7945 7953 /* Line 1806 of yacc.c */ 7946 #line 192 0"parser.yy"7954 #line 1928 "parser.yy" 7947 7955 { 7948 7956 typedefTable.addToEnclosingScope2( TypedefTable::ID ); … … 7954 7962 7955 7963 /* Line 1806 of yacc.c */ 7956 #line 19 25"parser.yy"7964 #line 1933 "parser.yy" 7957 7965 { 7958 7966 typedefTable.addToEnclosingScope2( TypedefTable::ID ); … … 7964 7972 7965 7973 /* Line 1806 of yacc.c */ 7966 #line 193 0"parser.yy"7974 #line 1938 "parser.yy" 7967 7975 { 7968 7976 typedefTable.addToEnclosingScope2( *(yyvsp[(5) - (5)].tok), TypedefTable::ID ); … … 7974 7982 7975 7983 /* Line 1806 of yacc.c */ 7976 #line 19 38"parser.yy"7984 #line 1946 "parser.yy" 7977 7985 { 7978 7986 typedefTable.addToEnclosingScope2( TypedefTable::ID ); … … 7984 7992 7985 7993 /* Line 1806 of yacc.c */ 7986 #line 19 43"parser.yy"7994 #line 1951 "parser.yy" 7987 7995 { 7988 7996 typedefTable.addToEnclosingScope2( TypedefTable::ID ); … … 7994 8002 7995 8003 /* Line 1806 of yacc.c */ 7996 #line 19 53"parser.yy"8004 #line 1961 "parser.yy" 7997 8005 {} 7998 8006 break; … … 8001 8009 8002 8010 /* Line 1806 of yacc.c */ 8003 #line 19 55"parser.yy"8011 #line 1963 "parser.yy" 8004 8012 { 8005 8013 if ( theTree ) { … … 8014 8022 8015 8023 /* Line 1806 of yacc.c */ 8016 #line 19 67"parser.yy"8024 #line 1975 "parser.yy" 8017 8025 { (yyval.decl) = ( (yyvsp[(1) - (3)].decl) != NULL ) ? (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ) : (yyvsp[(3) - (3)].decl); } 8018 8026 break; … … 8021 8029 8022 8030 /* Line 1806 of yacc.c */ 8023 #line 19 72"parser.yy"8031 #line 1980 "parser.yy" 8024 8032 { (yyval.decl) = 0; } 8025 8033 break; … … 8028 8036 8029 8037 /* Line 1806 of yacc.c */ 8030 #line 198 0"parser.yy"8038 #line 1988 "parser.yy" 8031 8039 {} 8032 8040 break; … … 8035 8043 8036 8044 /* Line 1806 of yacc.c */ 8037 #line 19 82"parser.yy"8045 #line 1990 "parser.yy" 8038 8046 { 8039 8047 linkageStack.push( linkage ); … … 8045 8053 8046 8054 /* Line 1806 of yacc.c */ 8047 #line 19 87"parser.yy"8055 #line 1995 "parser.yy" 8048 8056 { 8049 8057 linkage = linkageStack.top(); … … 8056 8064 8057 8065 /* Line 1806 of yacc.c */ 8058 #line 1993 "parser.yy" 8059 { (yyval.decl) = (yyvsp[(2) - (2)].decl)/*->set_extension( true )*/; } 8066 #line 2001 "parser.yy" 8067 { // mark all fields in list 8068 for ( DeclarationNode *iter = (yyvsp[(2) - (2)].decl); iter != NULL; iter = (DeclarationNode *)iter->get_link() ) 8069 iter->set_extension( true ); 8070 (yyval.decl) = (yyvsp[(2) - (2)].decl); 8071 } 8060 8072 break; 8061 8073 … … 8063 8075 8064 8076 /* Line 1806 of yacc.c */ 8065 #line 20 04"parser.yy"8077 #line 2016 "parser.yy" 8066 8078 { 8067 8079 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8074 8086 8075 8087 /* Line 1806 of yacc.c */ 8076 #line 20 10"parser.yy"8088 #line 2022 "parser.yy" 8077 8089 { 8078 8090 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8085 8097 8086 8098 /* Line 1806 of yacc.c */ 8087 #line 20 19"parser.yy"8099 #line 2031 "parser.yy" 8088 8100 { 8089 8101 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8096 8108 8097 8109 /* Line 1806 of yacc.c */ 8098 #line 20 25"parser.yy"8110 #line 2037 "parser.yy" 8099 8111 { 8100 8112 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8107 8119 8108 8120 /* Line 1806 of yacc.c */ 8109 #line 20 31"parser.yy"8121 #line 2043 "parser.yy" 8110 8122 { 8111 8123 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8118 8130 8119 8131 /* Line 1806 of yacc.c */ 8120 #line 20 37"parser.yy"8132 #line 2049 "parser.yy" 8121 8133 { 8122 8134 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8129 8141 8130 8142 /* Line 1806 of yacc.c */ 8131 #line 20 43"parser.yy"8143 #line 2055 "parser.yy" 8132 8144 { 8133 8145 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8140 8152 8141 8153 /* Line 1806 of yacc.c */ 8142 #line 20 51"parser.yy"8154 #line 2063 "parser.yy" 8143 8155 { 8144 8156 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8151 8163 8152 8164 /* Line 1806 of yacc.c */ 8153 #line 20 57"parser.yy"8165 #line 2069 "parser.yy" 8154 8166 { 8155 8167 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8162 8174 8163 8175 /* Line 1806 of yacc.c */ 8164 #line 20 65"parser.yy"8176 #line 2077 "parser.yy" 8165 8177 { 8166 8178 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8173 8185 8174 8186 /* Line 1806 of yacc.c */ 8175 #line 20 71"parser.yy"8187 #line 2083 "parser.yy" 8176 8188 { 8177 8189 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8184 8196 8185 8197 /* Line 1806 of yacc.c */ 8186 #line 20 86"parser.yy"8198 #line 2098 "parser.yy" 8187 8199 { (yyval.en) = new CompositeExprNode( new OperatorNode( OperatorNode::Range ), (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ); } 8188 8200 break; … … 8191 8203 8192 8204 /* Line 1806 of yacc.c */ 8193 #line 2 096"parser.yy"8205 #line 2108 "parser.yy" 8194 8206 { (yyval.decl) = 0; } 8195 8207 break; … … 8198 8210 8199 8211 /* Line 1806 of yacc.c */ 8200 #line 21 03"parser.yy"8212 #line 2115 "parser.yy" 8201 8213 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 8202 8214 break; … … 8205 8217 8206 8218 /* Line 1806 of yacc.c */ 8207 #line 21 09"parser.yy"8219 #line 2121 "parser.yy" 8208 8220 { (yyval.decl) = 0; } 8209 8221 break; … … 8212 8224 8213 8225 /* Line 1806 of yacc.c */ 8214 #line 21 24"parser.yy"8226 #line 2136 "parser.yy" 8215 8227 {} 8216 8228 break; … … 8219 8231 8220 8232 /* Line 1806 of yacc.c */ 8221 #line 21 25"parser.yy"8233 #line 2137 "parser.yy" 8222 8234 {} 8223 8235 break; … … 8226 8238 8227 8239 /* Line 1806 of yacc.c */ 8228 #line 21 26"parser.yy"8240 #line 2138 "parser.yy" 8229 8241 {} 8230 8242 break; … … 8233 8245 8234 8246 /* Line 1806 of yacc.c */ 8235 #line 21 27"parser.yy"8247 #line 2139 "parser.yy" 8236 8248 {} 8237 8249 break; … … 8240 8252 8241 8253 /* Line 1806 of yacc.c */ 8242 #line 21 62"parser.yy"8254 #line 2174 "parser.yy" 8243 8255 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8244 8256 break; … … 8247 8259 8248 8260 /* Line 1806 of yacc.c */ 8249 #line 21 65"parser.yy"8261 #line 2177 "parser.yy" 8250 8262 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8251 8263 break; … … 8254 8266 8255 8267 /* Line 1806 of yacc.c */ 8256 #line 21 67"parser.yy"8268 #line 2179 "parser.yy" 8257 8269 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8258 8270 break; … … 8261 8273 8262 8274 /* Line 1806 of yacc.c */ 8263 #line 21 72"parser.yy"8275 #line 2184 "parser.yy" 8264 8276 { 8265 8277 typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) ); … … 8271 8283 8272 8284 /* Line 1806 of yacc.c */ 8273 #line 21 77"parser.yy"8285 #line 2189 "parser.yy" 8274 8286 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8275 8287 break; … … 8278 8290 8279 8291 /* Line 1806 of yacc.c */ 8280 #line 21 82"parser.yy"8292 #line 2194 "parser.yy" 8281 8293 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8282 8294 break; … … 8285 8297 8286 8298 /* Line 1806 of yacc.c */ 8287 #line 21 84"parser.yy"8299 #line 2196 "parser.yy" 8288 8300 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8289 8301 break; … … 8292 8304 8293 8305 /* Line 1806 of yacc.c */ 8294 #line 21 86"parser.yy"8306 #line 2198 "parser.yy" 8295 8307 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8296 8308 break; … … 8299 8311 8300 8312 /* Line 1806 of yacc.c */ 8301 #line 2 191"parser.yy"8313 #line 2203 "parser.yy" 8302 8314 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8303 8315 break; … … 8306 8318 8307 8319 /* Line 1806 of yacc.c */ 8308 #line 2 193"parser.yy"8320 #line 2205 "parser.yy" 8309 8321 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8310 8322 break; … … 8313 8325 8314 8326 /* Line 1806 of yacc.c */ 8315 #line 2 195"parser.yy"8327 #line 2207 "parser.yy" 8316 8328 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8317 8329 break; … … 8320 8332 8321 8333 /* Line 1806 of yacc.c */ 8322 #line 2 197"parser.yy"8334 #line 2209 "parser.yy" 8323 8335 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8324 8336 break; … … 8327 8339 8328 8340 /* Line 1806 of yacc.c */ 8329 #line 22 02"parser.yy"8341 #line 2214 "parser.yy" 8330 8342 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8331 8343 break; … … 8334 8346 8335 8347 /* Line 1806 of yacc.c */ 8336 #line 22 04"parser.yy"8348 #line 2216 "parser.yy" 8337 8349 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8338 8350 break; … … 8341 8353 8342 8354 /* Line 1806 of yacc.c */ 8343 #line 22 13"parser.yy"8355 #line 2225 "parser.yy" 8344 8356 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8345 8357 break; … … 8348 8360 8349 8361 /* Line 1806 of yacc.c */ 8350 #line 22 16"parser.yy"8362 #line 2228 "parser.yy" 8351 8363 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8352 8364 break; … … 8355 8367 8356 8368 /* Line 1806 of yacc.c */ 8357 #line 22 21"parser.yy"8369 #line 2233 "parser.yy" 8358 8370 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); } 8359 8371 break; … … 8362 8374 8363 8375 /* Line 1806 of yacc.c */ 8364 #line 22 23"parser.yy"8376 #line 2235 "parser.yy" 8365 8377 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8366 8378 break; … … 8369 8381 8370 8382 /* Line 1806 of yacc.c */ 8371 #line 22 25"parser.yy"8383 #line 2237 "parser.yy" 8372 8384 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8373 8385 break; … … 8376 8388 8377 8389 /* Line 1806 of yacc.c */ 8378 #line 22 30"parser.yy"8390 #line 2242 "parser.yy" 8379 8391 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8380 8392 break; … … 8383 8395 8384 8396 /* Line 1806 of yacc.c */ 8385 #line 22 32"parser.yy"8397 #line 2244 "parser.yy" 8386 8398 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8387 8399 break; … … 8390 8402 8391 8403 /* Line 1806 of yacc.c */ 8392 #line 22 34"parser.yy"8404 #line 2246 "parser.yy" 8393 8405 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8394 8406 break; … … 8397 8409 8398 8410 /* Line 1806 of yacc.c */ 8399 #line 22 39"parser.yy"8411 #line 2251 "parser.yy" 8400 8412 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8401 8413 break; … … 8404 8416 8405 8417 /* Line 1806 of yacc.c */ 8406 #line 22 41"parser.yy"8418 #line 2253 "parser.yy" 8407 8419 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8408 8420 break; … … 8411 8423 8412 8424 /* Line 1806 of yacc.c */ 8413 #line 22 43"parser.yy"8425 #line 2255 "parser.yy" 8414 8426 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8415 8427 break; … … 8418 8430 8419 8431 /* Line 1806 of yacc.c */ 8420 #line 22 58"parser.yy"8432 #line 2270 "parser.yy" 8421 8433 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->addIdList( (yyvsp[(3) - (4)].decl) ); } 8422 8434 break; … … 8425 8437 8426 8438 /* Line 1806 of yacc.c */ 8427 #line 22 60"parser.yy"8439 #line 2272 "parser.yy" 8428 8440 { (yyval.decl) = (yyvsp[(2) - (6)].decl)->addIdList( (yyvsp[(5) - (6)].decl) ); } 8429 8441 break; … … 8432 8444 8433 8445 /* Line 1806 of yacc.c */ 8434 #line 22 62"parser.yy"8446 #line 2274 "parser.yy" 8435 8447 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8436 8448 break; … … 8439 8451 8440 8452 /* Line 1806 of yacc.c */ 8441 #line 22 67"parser.yy"8453 #line 2279 "parser.yy" 8442 8454 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8443 8455 break; … … 8446 8458 8447 8459 /* Line 1806 of yacc.c */ 8448 #line 22 69"parser.yy"8460 #line 2281 "parser.yy" 8449 8461 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8450 8462 break; … … 8453 8465 8454 8466 /* Line 1806 of yacc.c */ 8455 #line 22 71"parser.yy"8467 #line 2283 "parser.yy" 8456 8468 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8457 8469 break; … … 8460 8472 8461 8473 /* Line 1806 of yacc.c */ 8462 #line 22 76"parser.yy"8474 #line 2288 "parser.yy" 8463 8475 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8464 8476 break; … … 8467 8479 8468 8480 /* Line 1806 of yacc.c */ 8469 #line 22 78"parser.yy"8481 #line 2290 "parser.yy" 8470 8482 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8471 8483 break; … … 8474 8486 8475 8487 /* Line 1806 of yacc.c */ 8476 #line 22 80"parser.yy"8488 #line 2292 "parser.yy" 8477 8489 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8478 8490 break; … … 8481 8493 8482 8494 /* Line 1806 of yacc.c */ 8483 #line 2 295"parser.yy"8495 #line 2307 "parser.yy" 8484 8496 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8485 8497 break; … … 8488 8500 8489 8501 /* Line 1806 of yacc.c */ 8490 #line 2 298"parser.yy"8502 #line 2310 "parser.yy" 8491 8503 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8492 8504 break; … … 8495 8507 8496 8508 /* Line 1806 of yacc.c */ 8497 #line 23 00"parser.yy"8509 #line 2312 "parser.yy" 8498 8510 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8499 8511 break; … … 8502 8514 8503 8515 /* Line 1806 of yacc.c */ 8504 #line 23 06"parser.yy"8516 #line 2318 "parser.yy" 8505 8517 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8506 8518 break; … … 8509 8521 8510 8522 /* Line 1806 of yacc.c */ 8511 #line 23 11"parser.yy"8523 #line 2323 "parser.yy" 8512 8524 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8513 8525 break; … … 8516 8528 8517 8529 /* Line 1806 of yacc.c */ 8518 #line 23 13"parser.yy"8530 #line 2325 "parser.yy" 8519 8531 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8520 8532 break; … … 8523 8535 8524 8536 /* Line 1806 of yacc.c */ 8525 #line 23 15"parser.yy"8537 #line 2327 "parser.yy" 8526 8538 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8527 8539 break; … … 8530 8542 8531 8543 /* Line 1806 of yacc.c */ 8532 #line 23 20"parser.yy"8544 #line 2332 "parser.yy" 8533 8545 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8534 8546 break; … … 8537 8549 8538 8550 /* Line 1806 of yacc.c */ 8539 #line 23 22"parser.yy"8551 #line 2334 "parser.yy" 8540 8552 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8541 8553 break; … … 8544 8556 8545 8557 /* Line 1806 of yacc.c */ 8546 #line 23 24"parser.yy"8558 #line 2336 "parser.yy" 8547 8559 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8548 8560 break; … … 8551 8563 8552 8564 /* Line 1806 of yacc.c */ 8553 #line 23 26"parser.yy"8565 #line 2338 "parser.yy" 8554 8566 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8555 8567 break; … … 8558 8570 8559 8571 /* Line 1806 of yacc.c */ 8560 #line 23 31"parser.yy"8572 #line 2343 "parser.yy" 8561 8573 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); } 8562 8574 break; … … 8565 8577 8566 8578 /* Line 1806 of yacc.c */ 8567 #line 23 33"parser.yy"8579 #line 2345 "parser.yy" 8568 8580 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8569 8581 break; … … 8572 8584 8573 8585 /* Line 1806 of yacc.c */ 8574 #line 23 35"parser.yy"8586 #line 2347 "parser.yy" 8575 8587 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8576 8588 break; … … 8579 8591 8580 8592 /* Line 1806 of yacc.c */ 8581 #line 23 45"parser.yy"8593 #line 2357 "parser.yy" 8582 8594 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8583 8595 break; … … 8586 8598 8587 8599 /* Line 1806 of yacc.c */ 8588 #line 23 48"parser.yy"8600 #line 2360 "parser.yy" 8589 8601 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8590 8602 break; … … 8593 8605 8594 8606 /* Line 1806 of yacc.c */ 8595 #line 23 50"parser.yy"8607 #line 2362 "parser.yy" 8596 8608 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8597 8609 break; … … 8600 8612 8601 8613 /* Line 1806 of yacc.c */ 8602 #line 23 55"parser.yy"8614 #line 2367 "parser.yy" 8603 8615 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8604 8616 break; … … 8607 8619 8608 8620 /* Line 1806 of yacc.c */ 8609 #line 23 57"parser.yy"8621 #line 2369 "parser.yy" 8610 8622 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8611 8623 break; … … 8614 8626 8615 8627 /* Line 1806 of yacc.c */ 8616 #line 23 59"parser.yy"8628 #line 2371 "parser.yy" 8617 8629 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8618 8630 break; … … 8621 8633 8622 8634 /* Line 1806 of yacc.c */ 8623 #line 23 64"parser.yy"8635 #line 2376 "parser.yy" 8624 8636 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8625 8637 break; … … 8628 8640 8629 8641 /* Line 1806 of yacc.c */ 8630 #line 23 66"parser.yy"8642 #line 2378 "parser.yy" 8631 8643 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8632 8644 break; … … 8635 8647 8636 8648 /* Line 1806 of yacc.c */ 8637 #line 23 68"parser.yy"8649 #line 2380 "parser.yy" 8638 8650 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8639 8651 break; … … 8642 8654 8643 8655 /* Line 1806 of yacc.c */ 8644 #line 23 70"parser.yy"8656 #line 2382 "parser.yy" 8645 8657 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8646 8658 break; … … 8649 8661 8650 8662 /* Line 1806 of yacc.c */ 8651 #line 23 75"parser.yy"8663 #line 2387 "parser.yy" 8652 8664 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); } 8653 8665 break; … … 8656 8668 8657 8669 /* Line 1806 of yacc.c */ 8658 #line 23 77"parser.yy"8670 #line 2389 "parser.yy" 8659 8671 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8660 8672 break; … … 8663 8675 8664 8676 /* Line 1806 of yacc.c */ 8665 #line 23 79"parser.yy"8677 #line 2391 "parser.yy" 8666 8678 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8667 8679 break; … … 8670 8682 8671 8683 /* Line 1806 of yacc.c */ 8672 #line 24 10"parser.yy"8684 #line 2422 "parser.yy" 8673 8685 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8674 8686 break; … … 8677 8689 8678 8690 /* Line 1806 of yacc.c */ 8679 #line 24 13"parser.yy"8691 #line 2425 "parser.yy" 8680 8692 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8681 8693 break; … … 8684 8696 8685 8697 /* Line 1806 of yacc.c */ 8686 #line 24 15"parser.yy"8698 #line 2427 "parser.yy" 8687 8699 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8688 8700 break; … … 8691 8703 8692 8704 /* Line 1806 of yacc.c */ 8693 #line 24 20"parser.yy"8705 #line 2432 "parser.yy" 8694 8706 { 8695 8707 typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) ); … … 8701 8713 8702 8714 /* Line 1806 of yacc.c */ 8703 #line 24 25"parser.yy"8715 #line 2437 "parser.yy" 8704 8716 { 8705 8717 typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) ); … … 8711 8723 8712 8724 /* Line 1806 of yacc.c */ 8713 #line 24 33"parser.yy"8725 #line 2445 "parser.yy" 8714 8726 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8715 8727 break; … … 8718 8730 8719 8731 /* Line 1806 of yacc.c */ 8720 #line 24 35"parser.yy"8732 #line 2447 "parser.yy" 8721 8733 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8722 8734 break; … … 8725 8737 8726 8738 /* Line 1806 of yacc.c */ 8727 #line 24 37"parser.yy"8739 #line 2449 "parser.yy" 8728 8740 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8729 8741 break; … … 8732 8744 8733 8745 /* Line 1806 of yacc.c */ 8734 #line 24 42"parser.yy"8746 #line 2454 "parser.yy" 8735 8747 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8736 8748 break; … … 8739 8751 8740 8752 /* Line 1806 of yacc.c */ 8741 #line 24 44"parser.yy"8753 #line 2456 "parser.yy" 8742 8754 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8743 8755 break; … … 8746 8758 8747 8759 /* Line 1806 of yacc.c */ 8748 #line 24 49"parser.yy"8760 #line 2461 "parser.yy" 8749 8761 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); } 8750 8762 break; … … 8753 8765 8754 8766 /* Line 1806 of yacc.c */ 8755 #line 24 51"parser.yy"8767 #line 2463 "parser.yy" 8756 8768 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8757 8769 break; … … 8760 8772 8761 8773 /* Line 1806 of yacc.c */ 8762 #line 24 66"parser.yy"8774 #line 2478 "parser.yy" 8763 8775 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8764 8776 break; … … 8767 8779 8768 8780 /* Line 1806 of yacc.c */ 8769 #line 24 68"parser.yy"8781 #line 2480 "parser.yy" 8770 8782 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8771 8783 break; … … 8774 8786 8775 8787 /* Line 1806 of yacc.c */ 8776 #line 24 73"parser.yy"8788 #line 2485 "parser.yy" 8777 8789 { (yyval.decl) = DeclarationNode::newPointer( 0 ); } 8778 8790 break; … … 8781 8793 8782 8794 /* Line 1806 of yacc.c */ 8783 #line 24 75"parser.yy"8795 #line 2487 "parser.yy" 8784 8796 { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); } 8785 8797 break; … … 8788 8800 8789 8801 /* Line 1806 of yacc.c */ 8790 #line 24 77"parser.yy"8802 #line 2489 "parser.yy" 8791 8803 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8792 8804 break; … … 8795 8807 8796 8808 /* Line 1806 of yacc.c */ 8797 #line 24 79"parser.yy"8809 #line 2491 "parser.yy" 8798 8810 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8799 8811 break; … … 8802 8814 8803 8815 /* Line 1806 of yacc.c */ 8804 #line 24 81"parser.yy"8816 #line 2493 "parser.yy" 8805 8817 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8806 8818 break; … … 8809 8821 8810 8822 /* Line 1806 of yacc.c */ 8811 #line 24 87"parser.yy"8823 #line 2499 "parser.yy" 8812 8824 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8813 8825 break; … … 8816 8828 8817 8829 /* Line 1806 of yacc.c */ 8818 #line 2 489"parser.yy"8830 #line 2501 "parser.yy" 8819 8831 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8820 8832 break; … … 8823 8835 8824 8836 /* Line 1806 of yacc.c */ 8825 #line 2 491"parser.yy"8837 #line 2503 "parser.yy" 8826 8838 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8827 8839 break; … … 8830 8842 8831 8843 /* Line 1806 of yacc.c */ 8832 #line 2 496"parser.yy"8844 #line 2508 "parser.yy" 8833 8845 { (yyval.decl) = DeclarationNode::newFunction( 0, 0, (yyvsp[(3) - (5)].decl), 0 ); } 8834 8846 break; … … 8837 8849 8838 8850 /* Line 1806 of yacc.c */ 8839 #line 2 498"parser.yy"8851 #line 2510 "parser.yy" 8840 8852 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8841 8853 break; … … 8844 8856 8845 8857 /* Line 1806 of yacc.c */ 8846 #line 25 00"parser.yy"8858 #line 2512 "parser.yy" 8847 8859 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8848 8860 break; … … 8851 8863 8852 8864 /* Line 1806 of yacc.c */ 8853 #line 25 06"parser.yy"8865 #line 2518 "parser.yy" 8854 8866 { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); } 8855 8867 break; … … 8858 8870 8859 8871 /* Line 1806 of yacc.c */ 8860 #line 25 08"parser.yy"8872 #line 2520 "parser.yy" 8861 8873 { (yyval.decl) = DeclarationNode::newArray( 0, 0, false )->addArray( (yyvsp[(3) - (3)].decl) ); } 8862 8874 break; … … 8865 8877 8866 8878 /* Line 1806 of yacc.c */ 8867 #line 25 14"parser.yy"8879 #line 2526 "parser.yy" 8868 8880 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(3) - (5)].en), 0, false ); } 8869 8881 break; … … 8872 8884 8873 8885 /* Line 1806 of yacc.c */ 8874 #line 25 16"parser.yy"8886 #line 2528 "parser.yy" 8875 8887 { (yyval.decl) = DeclarationNode::newVarArray( 0 ); } 8876 8888 break; … … 8879 8891 8880 8892 /* Line 1806 of yacc.c */ 8881 #line 25 18"parser.yy"8893 #line 2530 "parser.yy" 8882 8894 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newArray( (yyvsp[(4) - (6)].en), 0, false ) ); } 8883 8895 break; … … 8886 8898 8887 8899 /* Line 1806 of yacc.c */ 8888 #line 25 20"parser.yy"8900 #line 2532 "parser.yy" 8889 8901 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newVarArray( 0 ) ); } 8890 8902 break; … … 8893 8905 8894 8906 /* Line 1806 of yacc.c */ 8895 #line 25 35"parser.yy"8907 #line 2547 "parser.yy" 8896 8908 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8897 8909 break; … … 8900 8912 8901 8913 /* Line 1806 of yacc.c */ 8902 #line 25 37"parser.yy"8914 #line 2549 "parser.yy" 8903 8915 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8904 8916 break; … … 8907 8919 8908 8920 /* Line 1806 of yacc.c */ 8909 #line 25 42"parser.yy"8921 #line 2554 "parser.yy" 8910 8922 { (yyval.decl) = DeclarationNode::newPointer( 0 ); } 8911 8923 break; … … 8914 8926 8915 8927 /* Line 1806 of yacc.c */ 8916 #line 25 44"parser.yy"8928 #line 2556 "parser.yy" 8917 8929 { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); } 8918 8930 break; … … 8921 8933 8922 8934 /* Line 1806 of yacc.c */ 8923 #line 25 46"parser.yy"8935 #line 2558 "parser.yy" 8924 8936 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8925 8937 break; … … 8928 8940 8929 8941 /* Line 1806 of yacc.c */ 8930 #line 25 48"parser.yy"8942 #line 2560 "parser.yy" 8931 8943 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8932 8944 break; … … 8935 8947 8936 8948 /* Line 1806 of yacc.c */ 8937 #line 25 50"parser.yy"8949 #line 2562 "parser.yy" 8938 8950 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8939 8951 break; … … 8942 8954 8943 8955 /* Line 1806 of yacc.c */ 8944 #line 25 56"parser.yy"8956 #line 2568 "parser.yy" 8945 8957 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8946 8958 break; … … 8949 8961 8950 8962 /* Line 1806 of yacc.c */ 8951 #line 25 58"parser.yy"8963 #line 2570 "parser.yy" 8952 8964 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8953 8965 break; … … 8956 8968 8957 8969 /* Line 1806 of yacc.c */ 8958 #line 25 60"parser.yy"8970 #line 2572 "parser.yy" 8959 8971 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8960 8972 break; … … 8963 8975 8964 8976 /* Line 1806 of yacc.c */ 8965 #line 25 65"parser.yy"8977 #line 2577 "parser.yy" 8966 8978 { (yyval.decl) = DeclarationNode::newFunction( 0, 0, (yyvsp[(3) - (5)].decl), 0 ); } 8967 8979 break; … … 8970 8982 8971 8983 /* Line 1806 of yacc.c */ 8972 #line 25 67"parser.yy"8984 #line 2579 "parser.yy" 8973 8985 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8974 8986 break; … … 8977 8989 8978 8990 /* Line 1806 of yacc.c */ 8979 #line 25 69"parser.yy"8991 #line 2581 "parser.yy" 8980 8992 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8981 8993 break; … … 8984 8996 8985 8997 /* Line 1806 of yacc.c */ 8986 #line 25 76"parser.yy"8998 #line 2588 "parser.yy" 8987 8999 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8988 9000 break; … … 8991 9003 8992 9004 /* Line 1806 of yacc.c */ 8993 #line 25 87"parser.yy"9005 #line 2599 "parser.yy" 8994 9006 { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); } 8995 9007 break; … … 8998 9010 8999 9011 /* Line 1806 of yacc.c */ 9000 #line 2 590"parser.yy"9012 #line 2602 "parser.yy" 9001 9013 { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); } 9002 9014 break; … … 9005 9017 9006 9018 /* Line 1806 of yacc.c */ 9007 #line 2 592"parser.yy"9019 #line 2604 "parser.yy" 9008 9020 { (yyval.decl) = DeclarationNode::newArray( 0, (yyvsp[(3) - (5)].decl), false ); } 9009 9021 break; … … 9012 9024 9013 9025 /* Line 1806 of yacc.c */ 9014 #line 2 595"parser.yy"9026 #line 2607 "parser.yy" 9015 9027 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); } 9016 9028 break; … … 9019 9031 9020 9032 /* Line 1806 of yacc.c */ 9021 #line 2 597"parser.yy"9033 #line 2609 "parser.yy" 9022 9034 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl), true ); } 9023 9035 break; … … 9026 9038 9027 9039 /* Line 1806 of yacc.c */ 9028 #line 2 599"parser.yy"9040 #line 2611 "parser.yy" 9029 9041 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(3) - (7)].decl), true ); } 9030 9042 break; … … 9033 9045 9034 9046 /* Line 1806 of yacc.c */ 9035 #line 26 13"parser.yy"9047 #line 2625 "parser.yy" 9036 9048 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 9037 9049 break; … … 9040 9052 9041 9053 /* Line 1806 of yacc.c */ 9042 #line 26 15"parser.yy"9054 #line 2627 "parser.yy" 9043 9055 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 9044 9056 break; … … 9047 9059 9048 9060 /* Line 1806 of yacc.c */ 9049 #line 26 20"parser.yy"9061 #line 2632 "parser.yy" 9050 9062 { (yyval.decl) = DeclarationNode::newPointer( 0 ); } 9051 9063 break; … … 9054 9066 9055 9067 /* Line 1806 of yacc.c */ 9056 #line 26 22"parser.yy"9068 #line 2634 "parser.yy" 9057 9069 { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); } 9058 9070 break; … … 9061 9073 9062 9074 /* Line 1806 of yacc.c */ 9063 #line 26 24"parser.yy"9075 #line 2636 "parser.yy" 9064 9076 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 9065 9077 break; … … 9068 9080 9069 9081 /* Line 1806 of yacc.c */ 9070 #line 26 26"parser.yy"9082 #line 2638 "parser.yy" 9071 9083 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 9072 9084 break; … … 9075 9087 9076 9088 /* Line 1806 of yacc.c */ 9077 #line 26 28"parser.yy"9089 #line 2640 "parser.yy" 9078 9090 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 9079 9091 break; … … 9082 9094 9083 9095 /* Line 1806 of yacc.c */ 9084 #line 26 34"parser.yy"9096 #line 2646 "parser.yy" 9085 9097 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 9086 9098 break; … … 9089 9101 9090 9102 /* Line 1806 of yacc.c */ 9091 #line 26 36"parser.yy"9103 #line 2648 "parser.yy" 9092 9104 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 9093 9105 break; … … 9096 9108 9097 9109 /* Line 1806 of yacc.c */ 9098 #line 26 38"parser.yy"9110 #line 2650 "parser.yy" 9099 9111 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 9100 9112 break; … … 9103 9115 9104 9116 /* Line 1806 of yacc.c */ 9105 #line 26 43"parser.yy"9117 #line 2655 "parser.yy" 9106 9118 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 9107 9119 break; … … 9110 9122 9111 9123 /* Line 1806 of yacc.c */ 9112 #line 26 45"parser.yy"9124 #line 2657 "parser.yy" 9113 9125 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 9114 9126 break; … … 9117 9129 9118 9130 /* Line 1806 of yacc.c */ 9119 #line 26 55"parser.yy"9131 #line 2667 "parser.yy" 9120 9132 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 9121 9133 break; … … 9124 9136 9125 9137 /* Line 1806 of yacc.c */ 9126 #line 26 65"parser.yy"9138 #line 2677 "parser.yy" 9127 9139 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9128 9140 break; … … 9131 9143 9132 9144 /* Line 1806 of yacc.c */ 9133 #line 26 67"parser.yy"9145 #line 2679 "parser.yy" 9134 9146 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9135 9147 break; … … 9138 9150 9139 9151 /* Line 1806 of yacc.c */ 9140 #line 26 69"parser.yy"9152 #line 2681 "parser.yy" 9141 9153 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9142 9154 break; … … 9145 9157 9146 9158 /* Line 1806 of yacc.c */ 9147 #line 26 71"parser.yy"9159 #line 2683 "parser.yy" 9148 9160 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9149 9161 break; … … 9152 9164 9153 9165 /* Line 1806 of yacc.c */ 9154 #line 26 73"parser.yy"9166 #line 2685 "parser.yy" 9155 9167 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9156 9168 break; … … 9159 9171 9160 9172 /* Line 1806 of yacc.c */ 9161 #line 26 75"parser.yy"9173 #line 2687 "parser.yy" 9162 9174 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9163 9175 break; … … 9166 9178 9167 9179 /* Line 1806 of yacc.c */ 9168 #line 26 82"parser.yy"9180 #line 2694 "parser.yy" 9169 9181 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9170 9182 break; … … 9173 9185 9174 9186 /* Line 1806 of yacc.c */ 9175 #line 26 84"parser.yy"9187 #line 2696 "parser.yy" 9176 9188 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9177 9189 break; … … 9180 9192 9181 9193 /* Line 1806 of yacc.c */ 9182 #line 26 86"parser.yy"9194 #line 2698 "parser.yy" 9183 9195 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9184 9196 break; … … 9187 9199 9188 9200 /* Line 1806 of yacc.c */ 9189 #line 2 688"parser.yy"9201 #line 2700 "parser.yy" 9190 9202 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); } 9191 9203 break; … … 9194 9206 9195 9207 /* Line 1806 of yacc.c */ 9196 #line 2 690"parser.yy"9208 #line 2702 "parser.yy" 9197 9209 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9198 9210 break; … … 9201 9213 9202 9214 /* Line 1806 of yacc.c */ 9203 #line 2 692"parser.yy"9215 #line 2704 "parser.yy" 9204 9216 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9205 9217 break; … … 9208 9220 9209 9221 /* Line 1806 of yacc.c */ 9210 #line 2 694"parser.yy"9222 #line 2706 "parser.yy" 9211 9223 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9212 9224 break; … … 9215 9227 9216 9228 /* Line 1806 of yacc.c */ 9217 #line 2 696"parser.yy"9229 #line 2708 "parser.yy" 9218 9230 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9219 9231 break; … … 9222 9234 9223 9235 /* Line 1806 of yacc.c */ 9224 #line 2 698"parser.yy"9236 #line 2710 "parser.yy" 9225 9237 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); } 9226 9238 break; … … 9229 9241 9230 9242 /* Line 1806 of yacc.c */ 9231 #line 27 00"parser.yy"9243 #line 2712 "parser.yy" 9232 9244 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9233 9245 break; … … 9236 9248 9237 9249 /* Line 1806 of yacc.c */ 9238 #line 27 05"parser.yy"9250 #line 2717 "parser.yy" 9239 9251 { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); } 9240 9252 break; … … 9243 9255 9244 9256 /* Line 1806 of yacc.c */ 9245 #line 27 07"parser.yy"9257 #line 2719 "parser.yy" 9246 9258 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); } 9247 9259 break; … … 9250 9262 9251 9263 /* Line 1806 of yacc.c */ 9252 #line 27 12"parser.yy"9264 #line 2724 "parser.yy" 9253 9265 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), true ); } 9254 9266 break; … … 9257 9269 9258 9270 /* Line 1806 of yacc.c */ 9259 #line 27 14"parser.yy"9271 #line 2726 "parser.yy" 9260 9272 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl)->addQualifiers( (yyvsp[(3) - (7)].decl) ), true ); } 9261 9273 break; … … 9264 9276 9265 9277 /* Line 1806 of yacc.c */ 9266 #line 27 41"parser.yy"9278 #line 2753 "parser.yy" 9267 9279 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 9268 9280 break; … … 9271 9283 9272 9284 /* Line 1806 of yacc.c */ 9273 #line 27 52"parser.yy"9285 #line 2764 "parser.yy" 9274 9286 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9275 9287 break; … … 9278 9290 9279 9291 /* Line 1806 of yacc.c */ 9280 #line 27 54"parser.yy"9292 #line 2766 "parser.yy" 9281 9293 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9282 9294 break; … … 9285 9297 9286 9298 /* Line 1806 of yacc.c */ 9287 #line 27 56"parser.yy"9299 #line 2768 "parser.yy" 9288 9300 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9289 9301 break; … … 9292 9304 9293 9305 /* Line 1806 of yacc.c */ 9294 #line 27 58"parser.yy"9306 #line 2770 "parser.yy" 9295 9307 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9296 9308 break; … … 9299 9311 9300 9312 /* Line 1806 of yacc.c */ 9301 #line 27 60"parser.yy"9313 #line 2772 "parser.yy" 9302 9314 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9303 9315 break; … … 9306 9318 9307 9319 /* Line 1806 of yacc.c */ 9308 #line 27 62"parser.yy"9320 #line 2774 "parser.yy" 9309 9321 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9310 9322 break; … … 9313 9325 9314 9326 /* Line 1806 of yacc.c */ 9315 #line 27 69"parser.yy"9327 #line 2781 "parser.yy" 9316 9328 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9317 9329 break; … … 9320 9332 9321 9333 /* Line 1806 of yacc.c */ 9322 #line 27 71"parser.yy"9334 #line 2783 "parser.yy" 9323 9335 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9324 9336 break; … … 9327 9339 9328 9340 /* Line 1806 of yacc.c */ 9329 #line 27 73"parser.yy"9341 #line 2785 "parser.yy" 9330 9342 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9331 9343 break; … … 9334 9346 9335 9347 /* Line 1806 of yacc.c */ 9336 #line 27 75"parser.yy"9348 #line 2787 "parser.yy" 9337 9349 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9338 9350 break; … … 9341 9353 9342 9354 /* Line 1806 of yacc.c */ 9343 #line 27 77"parser.yy"9355 #line 2789 "parser.yy" 9344 9356 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9345 9357 break; … … 9348 9360 9349 9361 /* Line 1806 of yacc.c */ 9350 #line 27 79"parser.yy"9362 #line 2791 "parser.yy" 9351 9363 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9352 9364 break; … … 9355 9367 9356 9368 /* Line 1806 of yacc.c */ 9357 #line 27 84"parser.yy"9369 #line 2796 "parser.yy" 9358 9370 { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (5)].decl) ); } 9359 9371 break; … … 9362 9374 9363 9375 /* Line 1806 of yacc.c */ 9364 #line 2 789"parser.yy"9376 #line 2801 "parser.yy" 9365 9377 { (yyval.decl) = DeclarationNode::newFunction( 0, DeclarationNode::newTuple( 0 ), (yyvsp[(4) - (5)].decl), 0 ); } 9366 9378 break; … … 9369 9381 9370 9382 /* Line 1806 of yacc.c */ 9371 #line 2 791"parser.yy"9383 #line 2803 "parser.yy" 9372 9384 { (yyval.decl) = DeclarationNode::newFunction( 0, (yyvsp[(1) - (6)].decl), (yyvsp[(4) - (6)].decl), 0 ); } 9373 9385 break; … … 9376 9388 9377 9389 /* Line 1806 of yacc.c */ 9378 #line 2 793"parser.yy"9390 #line 2805 "parser.yy" 9379 9391 { (yyval.decl) = DeclarationNode::newFunction( 0, (yyvsp[(1) - (6)].decl), (yyvsp[(4) - (6)].decl), 0 ); } 9380 9392 break; … … 9383 9395 9384 9396 /* Line 1806 of yacc.c */ 9385 #line 28 17"parser.yy"9397 #line 2829 "parser.yy" 9386 9398 { (yyval.en) = 0; } 9387 9399 break; … … 9390 9402 9391 9403 /* Line 1806 of yacc.c */ 9392 #line 28 19"parser.yy"9404 #line 2831 "parser.yy" 9393 9405 { (yyval.en) = (yyvsp[(2) - (2)].en); } 9394 9406 break; … … 9397 9409 9398 9410 /* Line 1806 of yacc.c */ 9399 #line 94 00"Parser/parser.cc"9411 #line 9412 "Parser/parser.cc" 9400 9412 default: break; 9401 9413 } … … 9628 9640 9629 9641 /* Line 2067 of yacc.c */ 9630 #line 28 22"parser.yy"9642 #line 2834 "parser.yy" 9631 9643 9632 9644 // ----end of grammar---- -
src/Parser/parser.yy
ra43e1d7 r39f04ec 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jun 27 17:47:56201613 // Update Count : 16 2712 // Last Modified On : Thu Jun 30 21:15:54 2016 13 // Update Count : 1657 14 14 // 15 15 … … 303 303 constant: 304 304 // ENUMERATIONconstant is not included here; it is treated as a variable with type "enumeration constant". 305 INTEGERconstant { $$ = new ConstantNode( ConstantNode::Integer, $1 ); }306 | FLOATINGconstant { $$ = new ConstantNode( ConstantNode::Float, $1 ); }307 | CHARACTERconstant { $$ = new ConstantNode( ConstantNode::Character, $1 ); }305 INTEGERconstant { $$ = makeConstant( ConstantNode::Integer, $1 ); } 306 | FLOATINGconstant { $$ = makeConstant( ConstantNode::Float, $1 ); } 307 | CHARACTERconstant { $$ = makeConstant( ConstantNode::Character, $1 ); } 308 308 ; 309 309 … … 330 330 331 331 string_literal_list: // juxtaposed strings are concatenated 332 STRINGliteral { $$ = new ConstantNode( ConstantNode::String, $1 ); }332 STRINGliteral { $$ = makeConstantStr( ConstantNode::String, $1 ); } 333 333 | string_literal_list STRINGliteral { $$ = $1->appendstr( $2 ); } 334 334 ; … … 682 682 { $$ = new StatementNode( $1 ); } 683 683 | EXTENSION declaration // GCC 684 { $$ = new StatementNode( $2 )/*->set_extension( true )*/; } 684 { // mark all fields in list 685 for ( DeclarationNode *iter = $2; iter != NULL; iter = (DeclarationNode *)iter->get_link() ) 686 iter->set_extension( true ); 687 $$ = new StatementNode( $2 ); 688 } 685 689 | function_definition 686 690 { $$ = new StatementNode( $1 ); } … … 1472 1476 new_field_declaring_list ';' // CFA, new style field declaration 1473 1477 | EXTENSION new_field_declaring_list ';' // GCC 1474 { $$ = $2 /*->set_extension( true )*/; }1478 { $$ = $2->set_extension( true ); } 1475 1479 | field_declaring_list ';' 1476 1480 | EXTENSION field_declaring_list ';' // GCC 1477 { $$ = $2/*->set_extension( true )*/; } 1481 { // mark all fields in list 1482 for ( DeclarationNode *iter = $2; iter != NULL; iter = (DeclarationNode *)iter->get_link() ) 1483 iter->set_extension( true ); 1484 $$ = $2; 1485 } 1478 1486 ; 1479 1487 … … 1991 1999 } 1992 2000 | EXTENSION external_definition 1993 { $$ = $2/*->set_extension( true )*/; } 2001 { // mark all fields in list 2002 for ( DeclarationNode *iter = $2; iter != NULL; iter = (DeclarationNode *)iter->get_link() ) 2003 iter->set_extension( true ); 2004 $$ = $2; 2005 } 1994 2006 ; 1995 2007 -
src/ResolvExpr/AlternativeFinder.cc
ra43e1d7 r39f04ec 10 10 // Created On : Sat May 16 23:52:08 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Ju n 13 16:13:54201613 // Update Count : 2 512 // Last Modified On : Mon Jul 4 17:02:51 2016 13 // Update Count : 29 14 14 // 15 15 … … 227 227 std::cerr << "there are " << alternatives.size() << " alternatives after elimination" << std::endl; 228 228 ) 229 230 // Central location to handle gcc extension keyword for all expression types. 231 for ( Alternative &iter: alternatives ) { 232 iter.expr->set_extension( expr->get_extension() ); 233 } // for 229 234 } 230 235 … … 772 777 for ( std::list< DeclarationWithType* >::iterator i = declList.begin(); i != declList.end(); ++i ) { 773 778 VariableExpr newExpr( *i, nameExpr->get_argName() ); 774 newExpr.set_extension( nameExpr->get_extension() );775 779 alternatives.push_back( Alternative( newExpr.clone(), env, Cost() ) ); 776 780 PRINT( -
src/SynTree/Constant.h
ra43e1d7 r39f04ec 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Ju l 30 15:19:16 201513 // Update Count : 512 // Last Modified On : Thu Jun 30 13:33:17 2016 13 // Update Count : 6 14 14 // 15 15 … … 29 29 Type *get_type() { return type; } 30 30 void set_type( Type *newValue ) { type = newValue; } 31 std::string get_value() { return value; }31 std::string &get_value() { return value; } 32 32 void set_value( std::string newValue ) { value = newValue; } 33 33 -
src/SynTree/Declaration.h
ra43e1d7 r39f04ec 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Fri May 06 16:26:12201613 // Update Count : 3 311 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 30 21:17:24 2016 13 // Update Count : 38 14 14 // 15 15 … … 41 41 void set_isNoreturn( bool newValue ) { isNoreturn = newValue; } 42 42 UniqueId get_uniqueId() const { return uniqueId; } 43 bool get_extension() const { return extension; } 44 Declaration *set_extension( bool exten ) { extension = exten; return this; } 43 45 44 46 void fixUniqueId( void ); … … 57 59 bool isInline, isNoreturn; 58 60 UniqueId uniqueId; 61 bool extension = false; 59 62 }; 60 63 -
src/SynTree/Expression.h
ra43e1d7 r39f04ec 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 8 17:05:30201613 // Update Count : 2 212 // Last Modified On : Mon Jul 4 14:45:32 2016 13 // Update Count : 23 14 14 // 15 15 … … 39 39 void set_argName( Expression *name ) { argName = name; } 40 40 bool get_extension() const { return extension; } 41 void set_extension( bool exten ) { extension = exten; }41 Expression * set_extension( bool exten ) { extension = exten; return this; } 42 42 43 43 virtual Expression *clone() const = 0; -
src/driver/cfa.cc
ra43e1d7 r39f04ec 10 10 // Created On : Tue Aug 20 13:44:49 2002 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jun 10 09:26:19201613 // Update Count : 13 812 // Last Modified On : Mon Jul 4 11:33:15 2016 13 // Update Count : 139 14 14 // 15 15 … … 246 246 args[nargs] = "-I" CFA_INCDIR; 247 247 nargs += 1; 248 args[nargs] = "-I" CFA_INCDIR "/containers"; 249 nargs += 1; 248 250 249 251 args[nargs] = "-I" CFA_INCDIR "/containers"; -
src/libcfa/builtins.cf
ra43e1d7 r39f04ec 584 584 int __builtin_LINE(); 585 585 extern const char *__PRETTY_FUNCTION__; 586 typedef int wchar_t; 587 int atexit( void (*)(void) ); -
src/libcfa/stdlib
ra43e1d7 r39f04ec 10 10 // Created On : Thu Jan 28 17:12:35 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Apr 27 22:03:29201613 // Update Count : 9 612 // Last Modified On : Thu Jun 30 15:04:18 2016 13 // Update Count : 97 14 14 // 15 15 … … 129 129 T max( const T t1, const T t2 ); 130 130 131 forall( otype T | { T min( T, T ); T max( T, T ); } ) 132 T clamp( const T value, const T min_val, const T max_val ); 133 131 134 forall( otype T ) 132 135 void swap( T * t1, T * t2 ); -
src/libcfa/stdlib.c
ra43e1d7 r39f04ec 10 10 // Created On : Thu Jan 28 17:10:29 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Apr 28 07:54:21201613 // Update Count : 16 612 // Last Modified On : Thu Jun 30 15:04:25 2016 13 // Update Count : 168 14 14 // 15 15 … … 254 254 } // max 255 255 256 forall( otype T | { T min( T, T ); T max( T, T ); } ) 257 T clamp( const T value, const T min_val, const T max_val ) { 258 return max( min_val, min( value, max_val ) ); 259 } // clamp 260 256 261 forall( otype T ) 257 262 void swap( T * t1, T * t2 ) { -
src/tests/quoted_keyword.c
ra43e1d7 r39f04ec 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jun 25 08:02:58201613 // Update Count : 1 612 // Last Modified On : Thu Jun 30 14:03:59 2016 13 // Update Count : 19 14 14 // 15 15 … … 37 37 int main() { 38 38 int `if` = 0; 39 `catch` = 1; 40 st.`otype` = 2; 41 st.`struct` = 3; 42 `throw` = 4; 39 43 sout | `catch` + st.`otype` + st.`struct` + `throw` | endl; 40 44 }
Note: See TracChangeset
for help on using the changeset viewer.