Changeset 7bf7fb9
- Timestamp:
- Aug 7, 2016, 9:47:37 AM (9 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:
- 04273e9, d1625f8
- Parents:
- 35f9114
- Location:
- src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
r35f9114 r7bf7fb9 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 12 20:49:31201613 // Update Count : 16 412 // Last Modified On : Sun Aug 7 08:01:55 2016 13 // Update Count : 165 14 14 // 15 15 … … 49 49 newnode->name = name; 50 50 newnode->storageClasses = storageClasses; 51 newnode->bitfieldWidth = maybeClone( bitfieldWidth ); 51 //PAB newnode->bitfieldWidth = maybeClone( bitfieldWidth ); 52 newnode->bitfieldWidth = bitfieldWidth; 52 53 newnode->hasEllipsis = hasEllipsis; 53 54 newnode->initializer = initializer; -
src/Parser/ExpressionNode.cc
r35f9114 r7bf7fb9 10 10 // Created On : Sat May 16 13:17:07 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Aug 5 15:07:19201613 // Update Count : 4 0912 // Last Modified On : Sun Aug 7 09:23:12 2016 13 // Update Count : 437 14 14 // 15 15 16 16 #include <cassert> 17 17 #include <cctype> 18 #include <climits> 19 #include <cstdio> 18 20 #include <algorithm> 19 21 #include <sstream> 20 #include <cstdio>21 22 22 23 #include "ParseNode.h" … … 37 38 ExpressionNode::ExpressionNode( const ExpressionNode &other ) : ParseNode( other.name ), extension( other.extension ) { 38 39 if ( other.argName ) { 40 std::cout << "ExpressionNode" << std::endl; 39 41 argName = other.argName->clone(); 40 42 } else { … … 83 85 } 84 86 85 // CommaExprNode *ExpressionNode::add_to_list( ExpressionNode *exp ) { 86 // return new CommaExprNode( this, exp ); 87 // } 88 89 //############################################################################## 90 91 ConstantNode::ConstantNode( ConstantExpr *expr ) : expr( expr ) { 92 } // ConstantNode::ConstantNode 93 94 ConstantNode *ConstantNode::appendstr( const std::string *newValue ) { 95 assert( newValue != 0 ); 96 97 string value = expr->get_constant()->get_value(); 98 99 // "abc" "def" "ghi" => "abcdefghi", remove new text from quotes and insert before last quote in old string. 100 value.insert( value.length() - 1, newValue->substr( 1, newValue->length() - 2 ) ); 101 expr->get_constant()->set_value( value ); 102 103 delete newValue; // allocated by lexer 104 return this; 105 } 106 107 void ConstantNode::printOneLine( std::ostream &os, int indent ) const { 108 // os << string( indent, ' ' ); 109 // printDesignation( os ); 110 111 // switch ( type ) { 112 // case Integer: 113 // case Float: 114 // os << value ; 115 // break; 116 // case Character: 117 // os << "'" << value << "'"; 118 // break; 119 // case String: 120 // os << '"' << value << '"'; 121 // break; 122 // } // switch 123 124 // os << ' '; 125 } 126 127 void ConstantNode::print( std::ostream &os, int indent ) const { 128 printOneLine( os, indent ); 129 os << endl; 130 } 131 132 Expression *ConstantNode::build() const { 133 return expr->clone(); 134 } 135 136 //############################################################################## 137 138 VarRefNode::VarRefNode() : isLabel( false ) {} 139 140 VarRefNode::VarRefNode( const string *name_, bool labelp ) : ExpressionNode( name_ ), isLabel( labelp ) {} 87 //############################################################################## 88 89 // Difficult to separate extra parts of constants during lexing because actions are not allow in the middle of patterns: 90 // 91 // prefix action constant action suffix 92 // 93 // Alternatively, breaking a pattern using BEGIN does not work if the following pattern can be empty: 94 // 95 // constant BEGIN CONT ... 96 // <CONT>(...)? BEGIN 0 ... // possible empty suffix 97 // 98 // because the CONT rule is NOT triggered if the pattern is empty. Hence, constants are reparsed here to determine their 99 // type. 100 101 static Type::Qualifiers emptyQualifiers; // no qualifiers on constants 102 103 static inline bool checkU( char c ) { return c == 'u' || c == 'U'; } 104 static inline bool checkL( char c ) { return c == 'l' || c == 'L'; } 105 static inline bool checkF( char c ) { return c == 'f' || c == 'F'; } 106 static inline bool checkD( char c ) { return c == 'd' || c == 'D'; } 107 static inline bool checkI( char c ) { return c == 'i' || c == 'I'; } 108 static inline bool checkX( char c ) { return c == 'x' || c == 'X'; } 109 110 ConstantNode *build_constantInteger( std::string & str ) { 111 static const BasicType::Kind kind[2][3] = { 112 { BasicType::SignedInt, BasicType::LongSignedInt, BasicType::LongLongSignedInt }, 113 { BasicType::UnsignedInt, BasicType::LongUnsignedInt, BasicType::LongLongUnsignedInt }, 114 }; 115 bool dec = true, Unsigned = false; // decimal, unsigned constant 116 int size; // 0 => int, 1 => long, 2 => long long 117 unsigned long long v; // converted integral value 118 size_t last = str.length() - 1; // last character of constant 119 120 if ( str[0] == '0' ) { // octal/hex constant ? 121 dec = false; 122 if ( last != 0 && checkX( str[1] ) ) { // hex constant ? 123 sscanf( (char *)str.c_str(), "%llx", &v ); 124 //printf( "%llx %llu\n", v, v ); 125 } else { // octal constant 126 sscanf( (char *)str.c_str(), "%llo", &v ); 127 //printf( "%llo %llu\n", v, v ); 128 } // if 129 } else { // decimal constant ? 130 sscanf( (char *)str.c_str(), "%llu", &v ); 131 //printf( "%llu %llu\n", v, v ); 132 } // if 133 134 if ( v <= INT_MAX ) { // signed int 135 size = 0; 136 } else if ( v <= UINT_MAX && ! dec ) { // unsigned int 137 size = 0; 138 Unsigned = true; // unsigned 139 } else if ( v <= LONG_MAX ) { // signed long int 140 size = 1; 141 } else if ( v <= ULONG_MAX && ( ! dec || LONG_MAX == LLONG_MAX ) ) { // signed long int 142 size = 1; 143 Unsigned = true; // unsigned long int 144 } else if ( v <= LLONG_MAX ) { // signed long long int 145 size = 2; 146 } else { // unsigned long long int 147 size = 2; 148 Unsigned = true; // unsigned long long int 149 } // if 150 151 if ( checkU( str[last] ) ) { // suffix 'u' ? 152 Unsigned = true; 153 if ( last > 0 && checkL( str[last - 1] ) ) { // suffix 'l' ? 154 size = 1; 155 if ( last > 1 && checkL( str[last - 2] ) ) { // suffix 'll' ? 156 size = 2; 157 } // if 158 } // if 159 } else if ( checkL( str[ last ] ) ) { // suffix 'l' ? 160 size = 1; 161 if ( last > 0 && checkL( str[last - 1] ) ) { // suffix 'll' ? 162 size = 2; 163 if ( last > 1 && checkU( str[last - 2] ) ) { // suffix 'u' ? 164 Unsigned = true; 165 } // if 166 } else { 167 if ( last > 0 && checkU( str[last - 1] ) ) { // suffix 'u' ? 168 Unsigned = true; 169 } // if 170 } // if 171 } // if 172 173 return new ConstantNode( new ConstantExpr( Constant( new BasicType( emptyQualifiers, kind[Unsigned][size] ), str ) ) ); 174 } // build_constantInteger 175 176 ConstantNode *build_constantFloat( std::string & str ) { 177 static const BasicType::Kind kind[2][3] = { 178 { BasicType::Float, BasicType::Double, BasicType::LongDouble }, 179 { BasicType::FloatComplex, BasicType::DoubleComplex, BasicType::LongDoubleComplex }, 180 }; 181 182 bool complx = false; // real, complex 183 int size = 1; // 0 => float, 1 => double (default), 2 => long double 184 // floating-point constant has minimum of 2 characters: 1. or .1 185 size_t last = str.length() - 1; 186 187 if ( checkI( str[last] ) ) { // imaginary ? 188 complx = true; 189 last -= 1; // backup one character 190 } // if 191 192 if ( checkF( str[last] ) ) { // float ? 193 size = 0; 194 } else if ( checkD( str[last] ) ) { // double ? 195 size = 1; 196 } else if ( checkL( str[last] ) ) { // long double ? 197 size = 2; 198 } // if 199 if ( ! complx && checkI( str[last - 1] ) ) { // imaginary ? 200 complx = true; 201 } // if 202 203 return new ConstantNode( new ConstantExpr( Constant( new BasicType( emptyQualifiers, kind[complx][size] ), str ) ) ); 204 } // build_constantFloat 205 206 ConstantNode *build_constantChar( std::string & str ) { 207 return new ConstantNode( new ConstantExpr( Constant( new BasicType( emptyQualifiers, BasicType::Char ), str ) ) ); 208 } // build_constantChar 209 210 ConstantNode *build_constantStr( std::string & str ) { 211 // string should probably be a primitive type 212 ArrayType *at = new ArrayType( emptyQualifiers, new BasicType( emptyQualifiers, BasicType::Char ), 213 new ConstantExpr( Constant( new BasicType( emptyQualifiers, BasicType::UnsignedInt ), 214 toString( str.size()+1-2 ) ) ), // +1 for '\0' and -2 for '"' 215 false, false ); 216 return new ConstantNode( new ConstantExpr( Constant( at, str ) ) ); 217 } // build_constantStr 218 219 //############################################################################## 220 221 //Expression *build_varref( ExpressionNode expr ) { 222 // return new NameExpr( get_name(), maybeBuild<Expression>( get_argName() ) ); 223 //} 224 225 VarRefNode::VarRefNode( const string *name, bool labelp ) : ExpressionNode( name ), isLabel( labelp ) {} 141 226 142 227 VarRefNode::VarRefNode( const VarRefNode &other ) : ExpressionNode( other ), isLabel( other.isLabel ) { … … 171 256 double value; 172 257 if ( ss >> value ) { 173 // this is a floating point constant. It MUST be 174 // ".0" or ".1", otherwise the program is invalid 258 // this is a floating point constant. It MUST be ".0" or ".1", otherwise the program is invalid 175 259 if ( ! (var->get_name() == ".0" || var->get_name() == ".1") ) { 176 260 throw SemanticError( "invalid designator name: " + var->get_name() ); … … 201 285 202 286 if ( isArrayIndex ) { 203 // need to traverse entire structure and change any instances of 0 or 1 to 204 // ConstantExpr 287 // need to traverse entire structure and change any instances of 0 or 1 to ConstantExpr 205 288 DesignatorFixer fixer; 206 289 ret = ret->acceptMutator( fixer ); … … 240 323 static const char *OperName[] = { 241 324 // diadic 242 "SizeOf", "AlignOf", "OffsetOf", " Attr", "?+?", "?-?", "?*?", "?/?", "?%?", "||", "&&",325 "SizeOf", "AlignOf", "OffsetOf", "?+?", "?-?", "?*?", "?/?", "?%?", "||", "&&", 243 326 "?|?", "?&?", "?^?", "Cast", "?<<?", "?>>?", "?<?", "?>?", "?<=?", "?>=?", "?==?", "?!=?", 244 327 "?=?", "?*=?", "?/=?", "?%=?", "?+=?", "?-=?", "?<<=?", "?>>=?", "?&=?", "?^=?", "?|=?", … … 249 332 250 333 //############################################################################## 251 252 CompositeExprNode::CompositeExprNode( Expression *expr ) : expr( expr ) {}253 CompositeExprNode::CompositeExprNode( const CompositeExprNode &other ) : expr( other.expr->clone() ) {}254 CompositeExprNode::~CompositeExprNode() { delete expr; }255 void CompositeExprNode::print( std::ostream &, int indent ) const { assert( false ); }256 void CompositeExprNode::printOneLine( std::ostream &, int indent ) const { assert( false ); }257 334 258 335 Expression *build_cast( TypeValueNode * arg, ExpressionNode *expr_node ) { -
src/Parser/ParseNode.cc
r35f9114 r7bf7fb9 10 10 // Created On : Sat May 16 13:26:29 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : S un Jul 24 02:17:01 201613 // Update Count : 9 012 // Last Modified On : Sat Aug 6 08:26:11 2016 13 // Update Count : 93 14 14 // 15 15 16 #include <climits>17 16 #include "ParseNode.h" 18 17 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 suffix23 //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 suffix28 //29 // because the CONT rule is NOT triggered if the pattern is empty. Hence, constants are reparsed here to determine their30 // type.31 32 static Type::Qualifiers emptyQualifiers; // no qualifiers on constants33 34 static inline bool checkU( char c ) { return c == 'u' || c == 'U'; }35 static inline bool checkL( char c ) { return c == 'l' || c == 'L'; }36 static inline bool checkF( char c ) { return c == 'f' || c == 'F'; }37 static inline bool checkD( char c ) { return c == 'd' || c == 'D'; }38 static inline bool checkI( char c ) { return c == 'i' || c == 'I'; }39 static inline bool checkX( char c ) { return c == 'x' || c == 'X'; }40 41 ConstantNode *makeConstantInteger( std::string & str ) {42 static const BasicType::Kind kind[2][3] = {43 { BasicType::SignedInt, BasicType::LongSignedInt, BasicType::LongLongSignedInt },44 { BasicType::UnsignedInt, BasicType::LongUnsignedInt, BasicType::LongLongUnsignedInt },45 };46 bool dec = true, Unsigned = false; // decimal, unsigned constant47 int size; // 0 => int, 1 => long, 2 => long long48 unsigned long long v; // converted integral value49 size_t last = str.length() - 1; // last character of constant50 51 if ( str[0] == '0' ) { // octal/hex constant ?52 dec = false;53 if ( last != 0 && checkX( str[1] ) ) { // hex constant ?54 sscanf( (char *)str.c_str(), "%llx", &v );55 //printf( "%llx %llu\n", v, v );56 } else { // octal constant57 sscanf( (char *)str.c_str(), "%llo", &v );58 //printf( "%llo %llu\n", v, v );59 } // if60 } else { // decimal constant ?61 sscanf( (char *)str.c_str(), "%llu", &v );62 //printf( "%llu %llu\n", v, v );63 } // if64 65 if ( v <= INT_MAX ) { // signed int66 size = 0;67 } else if ( v <= UINT_MAX && ! dec ) { // unsigned int68 size = 0;69 Unsigned = true; // unsigned70 } else if ( v <= LONG_MAX ) { // signed long int71 size = 1;72 } else if ( v <= ULONG_MAX && ( ! dec || LONG_MAX == LLONG_MAX ) ) { // signed long int73 size = 1;74 Unsigned = true; // unsigned long int75 } else if ( v <= LLONG_MAX ) { // signed long long int76 size = 2;77 } else { // unsigned long long int78 size = 2;79 Unsigned = true; // unsigned long long int80 } // if81 82 if ( checkU( str[last] ) ) { // suffix 'u' ?83 Unsigned = true;84 if ( last > 0 && checkL( str[last - 1] ) ) { // suffix 'l' ?85 size = 1;86 if ( last > 1 && checkL( str[last - 2] ) ) { // suffix 'll' ?87 size = 2;88 } // if89 } // if90 } else if ( checkL( str[ last ] ) ) { // suffix 'l' ?91 size = 1;92 if ( last > 0 && checkL( str[last - 1] ) ) { // suffix 'll' ?93 size = 2;94 if ( last > 1 && checkU( str[last - 2] ) ) { // suffix 'u' ?95 Unsigned = true;96 } // if97 } else {98 if ( last > 0 && checkU( str[last - 1] ) ) { // suffix 'u' ?99 Unsigned = true;100 } // if101 } // if102 } // if103 104 return new ConstantNode( new ConstantExpr( Constant( new BasicType( emptyQualifiers, kind[Unsigned][size] ), str ), nullptr ) );105 } // makeConstantInteger106 107 ConstantNode *makeConstantFloat( std::string & str ) {108 static const BasicType::Kind kind[2][3] = {109 { BasicType::Float, BasicType::Double, BasicType::LongDouble },110 { BasicType::FloatComplex, BasicType::DoubleComplex, BasicType::LongDoubleComplex },111 };112 113 bool complx = false; // real, complex114 int size = 1; // 0 => float, 1 => double (default), 2 => long double115 // floating-point constant has minimum of 2 characters: 1. or .1116 size_t last = str.length() - 1;117 118 if ( checkI( str[last] ) ) { // imaginary ?119 complx = true;120 last -= 1; // backup one character121 } // if122 123 if ( checkF( str[last] ) ) { // float ?124 size = 0;125 } else if ( checkD( str[last] ) ) { // double ?126 size = 1;127 } else if ( checkL( str[last] ) ) { // long double ?128 size = 2;129 } // if130 if ( ! complx && checkI( str[last - 1] ) ) { // imaginary ?131 complx = true;132 } // if133 134 return new ConstantNode( new ConstantExpr( Constant( new BasicType( emptyQualifiers, kind[complx][size] ), str ), nullptr ) );135 } // makeConstantFloat136 137 ConstantNode *makeConstantChar( std::string & str ) {138 return new ConstantNode( new ConstantExpr( Constant( new BasicType( emptyQualifiers, BasicType::Char ), str ), nullptr ) );139 } // makeConstantChar140 141 ConstantNode *makeConstantStr( std::string & str ) {142 // string should probably be a primitive type143 ArrayType *at = new ArrayType( emptyQualifiers, new BasicType( emptyQualifiers, BasicType::Char ),144 new ConstantExpr(145 Constant( new BasicType( emptyQualifiers, BasicType::UnsignedInt ),146 toString( str.size()+1-2 ) ) ), // +1 for '\0' and -2 for '"'147 false, false );148 return new ConstantNode( new ConstantExpr( Constant( at, str ), nullptr ) );149 } // makeConstantStr150 151 18 152 19 // Builder -
src/Parser/ParseNode.h
r35f9114 r7bf7fb9 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Aug 5 13:40:15201613 // Update Count : 3 0712 // Last Modified On : Sun Aug 7 09:37:16 2016 13 // Update Count : 333 14 14 // 15 15 … … 30 30 #include "SynTree/Label.h" 31 31 32 class ExpressionNode;33 class CompositeExprNode;34 class CommaExprNode;35 32 class StatementNode; 36 33 class CompoundStmtNode; … … 56 53 void set_name( const std::string &newValue ) { name = newValue; } 57 54 58 virtual void print( std::ostream & , int indent = 0 ) const;59 virtual void printList( std::ostream & , int indent = 0 ) const;55 virtual void print( std::ostream &os, int indent = 0 ) const; 56 virtual void printList( std::ostream &os, int indent = 0 ) const; 60 57 61 58 ParseNode &operator,( ParseNode &); … … 68 65 ParseNode *mkList( ParseNode & ); 69 66 67 //############################################################################## 68 70 69 class ExpressionNode : public ParseNode { 71 70 public: … … 73 72 ExpressionNode( const std::string * ); 74 73 ExpressionNode( const ExpressionNode &other ); 75 virtual ~ExpressionNode() { delete argName; } // cannot delete argName because it might be referenced elsewhere74 virtual ~ExpressionNode() { delete argName; } 76 75 77 76 virtual ExpressionNode *clone() const = 0; 78 79 // virtual CommaExprNode *add_to_list( ExpressionNode * );80 77 81 78 ExpressionNode *get_argName() const { return argName; } … … 85 82 ExpressionNode *set_extension( bool exten ) { extension = exten; return this; } 86 83 87 virtual void print( std::ostream & , int indent = 0) const = 0;88 virtual void printOneLine( std::ostream & , int indent = 0) const = 0;84 virtual void print( std::ostream &os, int indent = 0) const = 0; 85 virtual void printOneLine( std::ostream &os, int indent = 0) const = 0; 89 86 90 87 virtual Expression *build() const = 0; 91 88 protected: 92 void printDesignation ( std::ostream & , int indent = 0) const;89 void printDesignation ( std::ostream &os, int indent = 0) const; 93 90 private: 94 91 ExpressionNode *argName = 0; … … 109 106 }; 110 107 108 //############################################################################## 109 111 110 // NullExprNode is used in tuples as a place-holder where a tuple component is omitted e.g., [ 2, , 3 ] 112 111 class NullExprNode : public ExpressionNode { … … 116 115 virtual NullExprNode *clone() const; 117 116 118 virtual void print( std::ostream & , int indent = 0) const;119 virtual void printOneLine( std::ostream & , int indent = 0) const;117 virtual void print( std::ostream &os, int indent = 0) const; 118 virtual void printOneLine( std::ostream &os, int indent = 0) const; 120 119 121 120 virtual Expression *build() const; 122 121 }; 123 122 123 //############################################################################## 124 124 125 class ConstantNode : public ExpressionNode { 125 126 public: 126 enum Type { Integer, Float, Character, String }; 127 128 ConstantNode( ConstantExpr * ); 129 ConstantNode( const ConstantNode &other ) : expr( other.expr->clone() ) {}; 130 ~ConstantNode() { delete expr; } 131 132 virtual ConstantNode *clone() const { return new ConstantNode( *this ); } 133 virtual void print( std::ostream &, int indent = 0) const; 134 virtual void printOneLine( std::ostream &, int indent = 0) const; 135 136 ConstantNode *appendstr( const std::string *newValue ); 137 138 Expression *build() const; 127 ConstantNode( ConstantExpr *expr ) : expr( expr ) {} 128 ConstantNode( const ConstantNode &other ) : expr( other.expr->clone() ) {} 129 virtual ~ConstantNode() {} 130 131 virtual ConstantNode *clone() const { assert( false ); return new ConstantNode( *this ); } 132 133 ConstantExpr *get_expr() const { return expr; } 134 135 virtual void print( std::ostream &os, int indent = 0 ) const {} 136 virtual void printOneLine( std::ostream &os, int indent = 0 ) const {} 137 138 Expression *build() const { return expr; } 139 139 private: 140 140 ConstantExpr *expr; 141 141 }; 142 142 143 ConstantNode *makeConstantInteger( std::string & ); 144 ConstantNode *makeConstantFloat( std::string & ); 145 ConstantNode *makeConstantChar( std::string & ); 146 ConstantNode *makeConstantStr( std::string & ); 143 ConstantNode *build_constantInteger( std::string &str ); 144 ConstantNode *build_constantFloat( std::string &str ); 145 ConstantNode *build_constantChar( std::string &str ); 146 ConstantNode *build_constantStr( std::string &str ); 147 148 //############################################################################## 147 149 148 150 class VarRefNode : public ExpressionNode { 149 151 public: 150 VarRefNode();151 152 VarRefNode( const std::string *, bool isLabel = false ); 152 153 VarRefNode( const VarRefNode &other ); … … 156 157 virtual VarRefNode *clone() const { return new VarRefNode( *this ); } 157 158 158 virtual void print( std::ostream & , int indent = 0 ) const;159 virtual void printOneLine( std::ostream & , int indent = 0 ) const;159 virtual void print( std::ostream &os, int indent = 0 ) const; 160 virtual void printOneLine( std::ostream &os, int indent = 0 ) const; 160 161 private: 161 162 bool isLabel; 162 163 }; 164 165 //############################################################################## 163 166 164 167 class DesignatorNode : public ExpressionNode { … … 170 173 virtual DesignatorNode *clone() const { return new DesignatorNode( *this ); } 171 174 172 virtual void print( std::ostream & , int indent = 0 ) const;173 virtual void printOneLine( std::ostream & , int indent = 0 ) const;175 virtual void print( std::ostream &os, int indent = 0 ) const; 176 virtual void printOneLine( std::ostream &os, int indent = 0 ) const; 174 177 private: 175 178 bool isArrayIndex; 176 179 }; 180 181 //############################################################################## 177 182 178 183 class TypeValueNode : public ExpressionNode { … … 187 192 virtual TypeValueNode *clone() const { return new TypeValueNode( *this ); } 188 193 189 virtual void print( std::ostream & , int indent = 0) const;190 virtual void printOneLine( std::ostream & , int indent = 0) const;194 virtual void print( std::ostream &os, int indent = 0) const; 195 virtual void printOneLine( std::ostream &os, int indent = 0) const; 191 196 private: 192 197 DeclarationNode *decl; 198 }; 199 200 //############################################################################## 201 202 class CompositeExprNode : public ExpressionNode { 203 public: 204 CompositeExprNode( Expression *expr ) : expr( expr ) {} 205 CompositeExprNode( const CompositeExprNode &other ) : expr( other.expr->clone() ) {} 206 virtual ~CompositeExprNode() {} 207 208 CompositeExprNode *clone() const { assert( false ); return new CompositeExprNode( *this ); } 209 210 Expression *build() const { return expr; } 211 212 void print( std::ostream &os, int indent = 0 ) const {} 213 void printOneLine( std::ostream &os, int indent = 0 ) const {} 214 private: 215 Expression *expr; 193 216 }; 194 217 195 218 enum class OperKinds { 196 219 // diadic 197 SizeOf, AlignOf, OffsetOf, Attr,Plus, Minus, Mul, Div, Mod, Or, And,220 SizeOf, AlignOf, OffsetOf, Plus, Minus, Mul, Div, Mod, Or, And, 198 221 BitOr, BitAnd, Xor, Cast, LShift, RShift, LThan, GThan, LEThan, GEThan, Eq, Neq, 199 222 Assign, MulAssn, DivAssn, ModAssn, PlusAssn, MinusAssn, LSAssn, RSAssn, AndAssn, ERAssn, OrAssn, … … 224 247 Expression *build_range( ExpressionNode * low, ExpressionNode *high ); 225 248 226 class CompositeExprNode : public ExpressionNode { 227 public: 228 CompositeExprNode( Expression *expr ); 229 CompositeExprNode( const CompositeExprNode &other ); 230 virtual ~CompositeExprNode(); 231 232 virtual CompositeExprNode *clone() const { return new CompositeExprNode( *this ); } 233 virtual Expression *build() const { return expr->clone(); } 234 235 virtual void print( std::ostream &, int indent = 0) const; 236 virtual void printOneLine( std::ostream &, int indent = 0) const; 237 private: 238 Expression *expr; 239 }; 249 //############################################################################## 240 250 241 251 class AsmExprNode : public ExpressionNode { … … 248 258 virtual Expression *build() const; 249 259 250 virtual void print( std::ostream & , int indent = 0) const;251 virtual void printOneLine( std::ostream & , int indent = 0) const;260 virtual void print( std::ostream &os, int indent = 0) const; 261 virtual void printOneLine( std::ostream &os, int indent = 0) const; 252 262 253 263 ExpressionNode *get_inout() const { return inout; }; … … 265 275 }; 266 276 277 //############################################################################## 278 267 279 class LabelNode : public ExpressionNode { 268 280 public: … … 270 282 virtual LabelNode *clone() const { return new LabelNode( *this ); } 271 283 272 virtual void print( std::ostream & , int indent = 0) const;273 virtual void printOneLine( std::ostream & , int indent = 0) const;284 virtual void print( std::ostream &os, int indent = 0) const; 285 virtual void printOneLine( std::ostream &os, int indent = 0) const; 274 286 275 287 const std::list< Label > &get_labels() const { return labels; }; … … 278 290 std::list< Label > labels; 279 291 }; 292 293 //############################################################################## 280 294 281 295 class ForCtlExprNode : public ExpressionNode { … … 292 306 virtual Expression *build() const; 293 307 294 virtual void print( std::ostream & , int indent = 0 ) const;295 virtual void printOneLine( std::ostream & , int indent = 0 ) const;308 virtual void print( std::ostream &os, int indent = 0 ) const; 309 virtual void printOneLine( std::ostream &os, int indent = 0 ) const; 296 310 private: 297 311 StatementNode *init; … … 299 313 ExpressionNode *change; 300 314 }; 315 316 //############################################################################## 301 317 302 318 class ValofExprNode : public ExpressionNode { … … 310 326 311 327 StatementNode *get_body() const { return body; } 312 void print( std::ostream & , int indent = 0 ) const;313 void printOneLine( std::ostream & , int indent = 0 ) const;328 void print( std::ostream &os, int indent = 0 ) const; 329 void printOneLine( std::ostream &os, int indent = 0 ) const; 314 330 Expression *build() const; 315 331 … … 317 333 StatementNode *body; 318 334 }; 335 336 //############################################################################## 319 337 320 338 class TypeData; … … 391 409 392 410 DeclarationNode *clone() const; 393 void print( std::ostream & , int indent = 0 ) const;394 void printList( std::ostream & , int indent = 0 ) const;411 void print( std::ostream &os, int indent = 0 ) const; 412 void printList( std::ostream &os, int indent = 0 ) const; 395 413 396 414 Declaration *build() const; … … 426 444 }; // DeclarationNode 427 445 446 //############################################################################## 447 428 448 class StatementNode : public ParseNode { 429 449 public: … … 465 485 StatementNode *append_last_case( StatementNode * ); 466 486 467 void print( std::ostream & , int indent = 0) const;487 void print( std::ostream &os, int indent = 0) const; 468 488 virtual StatementNode *clone() const; 469 489 virtual Statement *build() const; … … 479 499 }; // StatementNode 480 500 501 //############################################################################## 502 481 503 class CompoundStmtNode : public StatementNode { 482 504 public: … … 488 510 void add_statement( StatementNode * ); 489 511 490 void print( std::ostream & , int indent = 0 ) const;512 void print( std::ostream &os, int indent = 0 ) const; 491 513 virtual Statement *build() const; 492 514 private: 493 515 StatementNode *first, *last; 494 516 }; 517 518 //############################################################################## 495 519 496 520 class AsmStmtNode : public StatementNode { … … 499 523 ~AsmStmtNode(); 500 524 501 void print( std::ostream & , int indent = 0 ) const;525 void print( std::ostream &os, int indent = 0 ) const; 502 526 Statement *build() const; 503 527 private: … … 509 533 }; 510 534 535 //############################################################################## 536 511 537 class InitializerNode : public ParseNode { 512 538 public: … … 525 551 InitializerNode *next_init() const { return kids; } 526 552 527 void print( std::ostream & , int indent = 0 ) const;553 void print( std::ostream &os, int indent = 0 ) const; 528 554 void printOneLine( std::ostream & ) const; 529 555 … … 537 563 }; 538 564 565 //############################################################################## 566 539 567 class CompoundLiteralNode : public ExpressionNode { 540 568 public: … … 551 579 CompoundLiteralNode *set_initializer( InitializerNode *k ) { kids = k; return this; } 552 580 553 void print( std::ostream & , int indent = 0 ) const;554 void printOneLine( std::ostream & , int indent = 0 ) const;581 void print( std::ostream &os, int indent = 0 ) const; 582 void printOneLine( std::ostream &os, int indent = 0 ) const; 555 583 556 584 virtual Expression *build() const; -
src/Parser/StatementNode.cc
r35f9114 r7bf7fb9 10 10 // Created On : Sat May 16 14:59:41 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 12 17:21:02201613 // Update Count : 13 312 // Last Modified On : Sun Aug 7 06:42:38 2016 13 // Update Count : 135 14 14 // 15 15 … … 106 106 return this; 107 107 } 108 109 // StatementNode *StatementNode::add_controlexp( ExpressionNode *e ) {110 // if ( control && e )111 // control->add_to_list( e ); // xxx - check this112 // return this;113 // }114 108 115 109 StatementNode *StatementNode::append_block( StatementNode *stmt ) { … … 176 170 } // if 177 171 if ( block ) { 178 os << string( indent + ParseNode::indent_by, ' ' ) << " Branches of execution: " << endl;172 os << string( indent + ParseNode::indent_by, ' ' ) << "Cases: " << endl; 179 173 block->printList( os, indent + 2 * ParseNode::indent_by ); 180 174 } // if -
src/Parser/TypeData.cc
r35f9114 r7bf7fb9 10 10 // Created On : Sat May 16 15:12:51 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jul 13 18:03:29201613 // Update Count : 5 612 // Last Modified On : Sun Aug 7 07:51:48 2016 13 // Update Count : 58 14 14 // 15 15 … … 182 182 break; 183 183 case Array: 184 newtype->array->dimension = maybeClone( array->dimension ); 184 //PAB newtype->array->dimension = maybeClone( array->dimension ); 185 newtype->array->dimension = array->dimension; 185 186 newtype->array->isVarLen = array->isVarLen; 186 187 newtype->array->isStatic = array->isStatic; -
src/Parser/parser.cc
r35f9114 r7bf7fb9 89 89 TypedefTable typedefTable; 90 90 91 void appendStr( std::string &to, std::string *from ) { 92 // "abc" "def" "ghi" => "abcdefghi", remove new text from quotes and insert before last quote in old string. 93 to.insert( to.length() - 1, from->substr( 1, from->length() - 2 ) ); 94 } // appendStr 95 91 96 92 97 /* Line 268 of yacc.c */ 93 #line 9 4"Parser/parser.cc"98 #line 99 "Parser/parser.cc" 94 99 95 100 /* Enabling traces. */ … … 342 347 343 348 /* Line 293 of yacc.c */ 344 #line 11 0"parser.yy"349 #line 115 "parser.yy" 345 350 346 351 Token tok; … … 360 365 361 366 /* Line 293 of yacc.c */ 362 #line 36 3"Parser/parser.cc"367 #line 368 "Parser/parser.cc" 363 368 } YYSTYPE; 364 369 # define YYSTYPE_IS_TRIVIAL 1 … … 372 377 373 378 /* Line 343 of yacc.c */ 374 #line 3 75"Parser/parser.cc"379 #line 380 "Parser/parser.cc" 375 380 376 381 #ifdef short … … 1016 1021 static const yytype_uint16 yyrline[] = 1017 1022 { 1018 0, 29 1, 291, 297, 306, 307, 308, 312, 313, 314,1019 3 18, 319, 323, 324, 328, 329, 333, 334, 340, 342,1020 3 44, 346, 351, 352, 358, 362, 364, 365, 367, 368,1021 3 70, 372, 374, 383, 384, 390, 391, 392, 397, 399,1022 4 04, 405, 409, 413, 415, 417, 419, 424, 427, 429,1023 4 31, 436, 449, 451, 453, 455, 457, 459, 461, 463,1024 4 65, 467, 469, 476, 477, 483, 484, 485, 486, 490,1025 491, 493, 498, 499, 501, 503, 508, 509, 511, 516,1026 5 17, 519, 524, 525, 527, 529, 531, 536, 537, 539,1027 5 44, 545, 550, 551, 556, 557, 562, 563, 568, 569,1028 5 74, 575, 578, 580, 585, 590, 591, 593, 599, 600,1029 6 04, 605, 606, 607, 608, 609, 610, 611, 612, 613,1030 6 14, 620, 622, 624, 626, 631, 632, 637, 638, 644,1031 6 45, 651, 652, 653, 654, 655, 656, 657, 658, 659,1032 6 69, 676, 678, 688, 689, 694, 696, 702, 704, 708,1033 7 09, 714, 719, 722, 724, 726, 736, 738, 749, 750,1034 7 52, 756, 758, 762, 763, 768, 769, 773, 778, 779,1035 7 83, 785, 791, 792, 796, 798, 800, 802, 808, 809,1036 8 13, 815, 820, 822, 824, 829, 831, 836, 838, 842,1037 8 45, 849, 852, 856, 858, 862, 864, 871, 873, 875,1038 8 84, 886, 888, 890, 892, 897, 899, 901, 903, 908,1039 9 21, 922, 927, 929, 934, 938, 940, 942, 944, 946,1040 9 52, 953, 959, 960, 964, 965, 970, 972, 978, 979,1041 9 81, 986, 988, 995, 997, 1001, 1002, 1007, 1009, 1013,1042 10 14, 1018, 1020, 1024, 1025, 1029, 1030, 1034, 1035, 1050,1043 10 51, 1052, 1053, 1054, 1058, 1063, 1070, 1080, 1085, 1090,1044 1 098, 1103, 1108, 1113, 1118, 1126, 1148, 1153, 1160, 1162,1045 11 69, 1174, 1179, 1190, 1195, 1200, 1205, 1210, 1219, 1224,1046 12 32, 1233, 1234, 1235, 1241, 1246, 1254, 1255, 1256, 1257,1047 12 61, 1262, 1263, 1264, 1269, 1270, 1279, 1280, 1285, 1286,1048 1 291, 1293, 1295, 1297, 1299, 1302, 1301, 1313, 1314, 1316,1049 13 26, 1327, 1332, 1336, 1338, 1340, 1342, 1344, 1346, 1348,1050 13 50, 1355, 1357, 1359, 1361, 1363, 1365, 1367, 1369, 1371,1051 13 73, 1375, 1377, 1379, 1385, 1386, 1388, 1390, 1392, 1397,1052 1 398, 1404, 1405, 1407, 1409, 1414, 1416, 1418, 1420, 1425,1053 14 26, 1428, 1430, 1435, 1436, 1438, 1443, 1444, 1446, 1448,1054 14 53, 1455, 1457, 1462, 1463, 1467, 1469, 1475, 1474, 1478,1055 14 80, 1485, 1487, 1493, 1494, 1499, 1500, 1502, 1503, 1512,1056 15 13, 1515, 1517, 1522, 1524, 1530, 1531, 1533, 1536, 1539,1057 15 44, 1545, 1550, 1555, 1559, 1561, 1567, 1566, 1573, 1575,1058 15 81, 1582, 1590, 1591, 1595, 1596, 1597, 1599, 1601, 1608,1059 16 09, 1611, 1613, 1618, 1619, 1625, 1626, 1630, 1631, 1636,1060 16 37, 1638, 1640, 1648, 1649, 1651, 1654, 1656, 1660, 1661,1061 16 62, 1664, 1666, 1670, 1675, 1683, 1684, 1693, 1695, 1700,1062 17 01, 1702, 1706, 1707, 1708, 1712, 1713, 1714, 1718, 1719,1063 17 20, 1725, 1726, 1727, 1728, 1734, 1735, 1737, 1742, 1743,1064 17 48, 1749, 1750, 1751, 1752, 1767, 1768, 1773, 1774, 1782,1065 17 84, 1786, 1789, 1791, 1793, 1816, 1817, 1819, 1821, 1826,1066 18 27, 1829, 1834, 1839, 1840, 1846, 1845, 1849, 1853, 1855,1067 18 57, 1863, 1864, 1869, 1874, 1876, 1881, 1883, 1884, 1886,1068 1 891, 1893, 1895, 1900, 1902, 1907, 1912, 1920, 1926, 1925,1069 19 39, 1940, 1945, 1946, 1950, 1955, 1960, 1968, 1973, 1984,1070 19 85, 1996, 1997, 2003, 2004, 2008, 2009, 2010, 2013, 2012,1071 20 23, 2032, 2038, 2044, 2053, 2059, 2065, 2071, 2077, 2085,1072 2 091, 2099, 2105, 2114, 2115, 2116, 2120, 2124, 2126, 2131,1073 21 32, 2136, 2137, 2142, 2148, 2149, 2152, 2154, 2155, 2159,1074 21 60, 2161, 2162, 2196, 2198, 2199, 2201, 2206, 2211, 2216,1075 22 18, 2220, 2225, 2227, 2229, 2231, 2236, 2238, 2247, 2249,1076 22 50, 2255, 2257, 2259, 2264, 2266, 2268, 2273, 2275, 2277,1077 22 86, 2287, 2288, 2292, 2294, 2296, 2301, 2303, 2305, 2310,1078 23 12, 2314, 2329, 2331, 2332, 2334, 2339, 2340, 2345, 2347,1079 23 49, 2354, 2356, 2358, 2360, 2365, 2367, 2369, 2379, 2381,1080 23 82, 2384, 2389, 2391, 2393, 2398, 2400, 2402, 2404, 2409,1081 24 11, 2413, 2444, 2446, 2447, 2449, 2454, 2459, 2467, 2469,1082 24 71, 2476, 2478, 2483, 2485, 2499, 2500, 2502, 2507, 2509,1083 25 11, 2513, 2515, 2520, 2521, 2523, 2525, 2530, 2532, 2534,1084 25 40, 2542, 2544, 2548, 2550, 2552, 2554, 2568, 2569, 2571,1085 25 76, 2578, 2580, 2582, 2584, 2589, 2590, 2592, 2594, 2599,1086 26 01, 2603, 2609, 2610, 2612, 2621, 2624, 2626, 2629, 2631,1087 26 33, 2646, 2647, 2649, 2654, 2656, 2658, 2660, 2662, 2667,1088 26 68, 2670, 2672, 2677, 2679, 2687, 2688, 2689, 2694, 2695,1089 2 699, 2701, 2703, 2705, 2707, 2709, 2716, 2718, 2720, 2722,1090 27 24, 2726, 2728, 2730, 2732, 2734, 2739, 2741, 2743, 2748,1091 27 74, 2775, 2777, 2781, 2782, 2786, 2788, 2790, 2792, 2794,1092 2 796, 2803, 2805, 2807, 2809, 2811, 2813, 2818, 2823, 2825,1093 28 27, 2845, 2847, 2852, 28531023 0, 296, 296, 302, 311, 312, 313, 317, 318, 319, 1024 323, 324, 328, 329, 333, 334, 338, 339, 350, 352, 1025 354, 356, 361, 362, 368, 372, 374, 375, 377, 378, 1026 380, 382, 384, 393, 394, 400, 401, 402, 407, 409, 1027 414, 415, 419, 423, 425, 427, 429, 434, 437, 439, 1028 441, 446, 459, 461, 463, 465, 467, 469, 471, 473, 1029 475, 477, 479, 486, 487, 493, 494, 495, 496, 500, 1030 501, 503, 508, 509, 511, 513, 518, 519, 521, 526, 1031 527, 529, 534, 535, 537, 539, 541, 546, 547, 549, 1032 554, 555, 560, 561, 566, 567, 572, 573, 578, 579, 1033 584, 585, 588, 590, 595, 600, 601, 603, 609, 610, 1034 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 1035 624, 630, 632, 634, 636, 641, 642, 647, 648, 654, 1036 655, 661, 662, 663, 664, 665, 666, 667, 668, 669, 1037 679, 686, 688, 698, 699, 704, 706, 712, 714, 718, 1038 719, 724, 729, 732, 734, 736, 746, 748, 759, 760, 1039 762, 766, 768, 772, 773, 778, 779, 783, 788, 789, 1040 793, 795, 801, 802, 806, 808, 810, 812, 818, 819, 1041 823, 825, 830, 832, 834, 839, 841, 846, 848, 852, 1042 855, 859, 862, 866, 868, 872, 874, 881, 883, 885, 1043 894, 896, 898, 900, 902, 907, 909, 911, 913, 918, 1044 931, 932, 937, 939, 944, 948, 950, 952, 954, 956, 1045 962, 963, 969, 970, 974, 975, 980, 982, 988, 989, 1046 991, 996, 998, 1005, 1007, 1011, 1012, 1017, 1019, 1023, 1047 1024, 1028, 1030, 1034, 1035, 1039, 1040, 1044, 1045, 1060, 1048 1061, 1062, 1063, 1064, 1068, 1073, 1080, 1090, 1095, 1100, 1049 1108, 1113, 1118, 1123, 1128, 1136, 1158, 1163, 1170, 1172, 1050 1179, 1184, 1189, 1200, 1205, 1210, 1215, 1220, 1229, 1234, 1051 1242, 1243, 1244, 1245, 1251, 1256, 1264, 1265, 1266, 1267, 1052 1271, 1272, 1273, 1274, 1279, 1280, 1289, 1290, 1295, 1296, 1053 1301, 1303, 1305, 1307, 1309, 1312, 1311, 1323, 1324, 1326, 1054 1336, 1337, 1342, 1346, 1348, 1350, 1352, 1354, 1356, 1358, 1055 1360, 1365, 1367, 1369, 1371, 1373, 1375, 1377, 1379, 1381, 1056 1383, 1385, 1387, 1389, 1395, 1396, 1398, 1400, 1402, 1407, 1057 1408, 1414, 1415, 1417, 1419, 1424, 1426, 1428, 1430, 1435, 1058 1436, 1438, 1440, 1445, 1446, 1448, 1453, 1454, 1456, 1458, 1059 1463, 1465, 1467, 1472, 1473, 1477, 1479, 1485, 1484, 1488, 1060 1490, 1495, 1497, 1503, 1504, 1509, 1510, 1512, 1513, 1522, 1061 1523, 1525, 1527, 1532, 1534, 1540, 1541, 1543, 1546, 1549, 1062 1554, 1555, 1560, 1565, 1569, 1571, 1577, 1576, 1583, 1585, 1063 1591, 1592, 1600, 1601, 1605, 1606, 1607, 1609, 1611, 1618, 1064 1619, 1621, 1623, 1628, 1629, 1635, 1636, 1640, 1641, 1646, 1065 1647, 1648, 1650, 1658, 1659, 1661, 1664, 1666, 1670, 1671, 1066 1672, 1674, 1676, 1680, 1685, 1693, 1694, 1703, 1705, 1710, 1067 1711, 1712, 1716, 1717, 1718, 1722, 1723, 1724, 1728, 1729, 1068 1730, 1735, 1736, 1737, 1738, 1744, 1745, 1747, 1752, 1753, 1069 1758, 1759, 1760, 1761, 1762, 1777, 1778, 1783, 1784, 1792, 1070 1794, 1796, 1799, 1801, 1803, 1826, 1827, 1829, 1831, 1836, 1071 1837, 1839, 1844, 1849, 1850, 1856, 1855, 1859, 1863, 1865, 1072 1867, 1873, 1874, 1879, 1884, 1886, 1891, 1893, 1894, 1896, 1073 1901, 1903, 1905, 1910, 1912, 1917, 1922, 1930, 1936, 1935, 1074 1949, 1950, 1955, 1956, 1960, 1965, 1970, 1978, 1983, 1994, 1075 1995, 2006, 2007, 2013, 2014, 2018, 2019, 2020, 2023, 2022, 1076 2033, 2042, 2048, 2054, 2063, 2069, 2075, 2081, 2087, 2095, 1077 2101, 2109, 2115, 2124, 2125, 2126, 2130, 2134, 2136, 2141, 1078 2142, 2146, 2147, 2152, 2158, 2159, 2162, 2164, 2165, 2169, 1079 2170, 2171, 2172, 2206, 2208, 2209, 2211, 2216, 2221, 2226, 1080 2228, 2230, 2235, 2237, 2239, 2241, 2246, 2248, 2257, 2259, 1081 2260, 2265, 2267, 2269, 2274, 2276, 2278, 2283, 2285, 2287, 1082 2296, 2297, 2298, 2302, 2304, 2306, 2311, 2313, 2315, 2320, 1083 2322, 2324, 2339, 2341, 2342, 2344, 2349, 2350, 2355, 2357, 1084 2359, 2364, 2366, 2368, 2370, 2375, 2377, 2379, 2389, 2391, 1085 2392, 2394, 2399, 2401, 2403, 2408, 2410, 2412, 2414, 2419, 1086 2421, 2423, 2454, 2456, 2457, 2459, 2464, 2469, 2477, 2479, 1087 2481, 2486, 2488, 2493, 2495, 2509, 2510, 2512, 2517, 2519, 1088 2521, 2523, 2525, 2530, 2531, 2533, 2535, 2540, 2542, 2544, 1089 2550, 2552, 2554, 2558, 2560, 2562, 2564, 2578, 2579, 2581, 1090 2586, 2588, 2590, 2592, 2594, 2599, 2600, 2602, 2604, 2609, 1091 2611, 2613, 2619, 2620, 2622, 2631, 2634, 2636, 2639, 2641, 1092 2643, 2656, 2657, 2659, 2664, 2666, 2668, 2670, 2672, 2677, 1093 2678, 2680, 2682, 2687, 2689, 2697, 2698, 2699, 2704, 2705, 1094 2709, 2711, 2713, 2715, 2717, 2719, 2726, 2728, 2730, 2732, 1095 2734, 2736, 2738, 2740, 2742, 2744, 2749, 2751, 2753, 2758, 1096 2784, 2785, 2787, 2791, 2792, 2796, 2798, 2800, 2802, 2804, 1097 2806, 2813, 2815, 2817, 2819, 2821, 2823, 2828, 2833, 2835, 1098 2837, 2855, 2857, 2862, 2863 1094 1099 }; 1095 1100 #endif … … 4992 4997 4993 4998 /* Line 1806 of yacc.c */ 4994 #line 29 1"parser.yy"4999 #line 296 "parser.yy" 4995 5000 { 4996 5001 typedefTable.enterScope(); … … 5001 5006 5002 5007 /* Line 1806 of yacc.c */ 5003 #line 297"parser.yy"5008 #line 302 "parser.yy" 5004 5009 { 5005 5010 typedefTable.leaveScope(); … … 5010 5015 5011 5016 /* Line 1806 of yacc.c */ 5012 #line 3 06"parser.yy"5013 { (yyval.constant) = makeConstantInteger( *(yyvsp[(1) - (1)].tok) ); }5017 #line 311 "parser.yy" 5018 { (yyval.constant) = build_constantInteger( *(yyvsp[(1) - (1)].tok) ); } 5014 5019 break; 5015 5020 … … 5017 5022 5018 5023 /* Line 1806 of yacc.c */ 5019 #line 3 07"parser.yy"5020 { (yyval.constant) = makeConstantFloat( *(yyvsp[(1) - (1)].tok) ); }5024 #line 312 "parser.yy" 5025 { (yyval.constant) = build_constantFloat( *(yyvsp[(1) - (1)].tok) ); } 5021 5026 break; 5022 5027 … … 5024 5029 5025 5030 /* Line 1806 of yacc.c */ 5026 #line 3 08"parser.yy"5027 { (yyval.constant) = makeConstantChar( *(yyvsp[(1) - (1)].tok) ); }5031 #line 313 "parser.yy" 5032 { (yyval.constant) = build_constantChar( *(yyvsp[(1) - (1)].tok) ); } 5028 5033 break; 5029 5034 … … 5031 5036 5032 5037 /* Line 1806 of yacc.c */ 5033 #line 33 3"parser.yy"5034 { (yyval.constant) = makeConstantStr( *(yyvsp[(1) - (1)].tok) ); }5038 #line 338 "parser.yy" 5039 { (yyval.constant) = build_constantStr( *(yyvsp[(1) - (1)].tok) ); } 5035 5040 break; 5036 5041 … … 5038 5043 5039 5044 /* Line 1806 of yacc.c */ 5040 #line 334 "parser.yy" 5041 { (yyval.constant) = (yyvsp[(1) - (2)].constant)->appendstr( (yyvsp[(2) - (2)].tok) ); } 5045 #line 340 "parser.yy" 5046 { 5047 appendStr( (yyvsp[(1) - (2)].constant)->get_expr()->get_constant()->get_value(), (yyvsp[(2) - (2)].tok) ); 5048 delete (yyvsp[(2) - (2)].tok); // allocated by lexer 5049 (yyval.constant) = (yyvsp[(1) - (2)].constant); 5050 } 5042 5051 break; 5043 5052 … … 5045 5054 5046 5055 /* Line 1806 of yacc.c */ 5047 #line 3 41 "parser.yy"5056 #line 351 "parser.yy" 5048 5057 { (yyval.en) = new VarRefNode( (yyvsp[(1) - (1)].tok) ); } 5049 5058 break; … … 5052 5061 5053 5062 /* Line 1806 of yacc.c */ 5054 #line 3 43 "parser.yy"5063 #line 353 "parser.yy" 5055 5064 { (yyval.en) = new VarRefNode( (yyvsp[(1) - (1)].tok) ); } 5056 5065 break; … … 5059 5068 5060 5069 /* Line 1806 of yacc.c */ 5061 #line 3 45 "parser.yy"5070 #line 355 "parser.yy" 5062 5071 { (yyval.en) = (yyvsp[(2) - (3)].en); } 5063 5072 break; … … 5066 5075 5067 5076 /* Line 1806 of yacc.c */ 5068 #line 3 47 "parser.yy"5077 #line 357 "parser.yy" 5069 5078 { (yyval.en) = new ValofExprNode( (yyvsp[(2) - (3)].sn) ); } 5070 5079 break; … … 5073 5082 5074 5083 /* Line 1806 of yacc.c */ 5075 #line 3 57 "parser.yy"5084 #line 367 "parser.yy" 5076 5085 { (yyval.en) = new CompositeExprNode( build_binary_val( OperKinds::Index, (yyvsp[(1) - (6)].en), (yyvsp[(4) - (6)].en) ) ); } 5077 5086 break; … … 5080 5089 5081 5090 /* Line 1806 of yacc.c */ 5082 #line 3 59 "parser.yy"5091 #line 369 "parser.yy" 5083 5092 { (yyval.en) = new CompositeExprNode( build_func( (yyvsp[(1) - (4)].en), (yyvsp[(3) - (4)].en) ) ); } 5084 5093 break; … … 5087 5096 5088 5097 /* Line 1806 of yacc.c */ 5089 #line 3 63 "parser.yy"5098 #line 373 "parser.yy" 5090 5099 { (yyval.en) = new CompositeExprNode( build_fieldSel( (yyvsp[(1) - (3)].en), new VarRefNode( (yyvsp[(3) - (3)].tok) ) ) ); } 5091 5100 break; … … 5094 5103 5095 5104 /* Line 1806 of yacc.c */ 5096 #line 3 66 "parser.yy"5105 #line 376 "parser.yy" 5097 5106 { (yyval.en) = new CompositeExprNode( build_pfieldSel( (yyvsp[(1) - (3)].en), new VarRefNode( (yyvsp[(3) - (3)].tok) ) ) ); } 5098 5107 break; … … 5101 5110 5102 5111 /* Line 1806 of yacc.c */ 5103 #line 3 69 "parser.yy"5112 #line 379 "parser.yy" 5104 5113 { (yyval.en) = new CompositeExprNode( build_unary_ptr( OperKinds::IncrPost, (yyvsp[(1) - (2)].en) ) ); } 5105 5114 break; … … 5108 5117 5109 5118 /* Line 1806 of yacc.c */ 5110 #line 3 71 "parser.yy"5119 #line 381 "parser.yy" 5111 5120 { (yyval.en) = new CompositeExprNode( build_unary_ptr( OperKinds::DecrPost, (yyvsp[(1) - (2)].en) ) ); } 5112 5121 break; … … 5115 5124 5116 5125 /* Line 1806 of yacc.c */ 5117 #line 3 73 "parser.yy"5126 #line 383 "parser.yy" 5118 5127 { (yyval.en) = new CompoundLiteralNode( (yyvsp[(2) - (7)].decl), new InitializerNode( (yyvsp[(5) - (7)].in), true ) ); } 5119 5128 break; … … 5122 5131 5123 5132 /* Line 1806 of yacc.c */ 5124 #line 3 75 "parser.yy"5133 #line 385 "parser.yy" 5125 5134 { 5126 5135 Token fn; … … 5133 5142 5134 5143 /* Line 1806 of yacc.c */ 5135 #line 3 85 "parser.yy"5144 #line 395 "parser.yy" 5136 5145 { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_link( (yyvsp[(3) - (3)].en) )); } 5137 5146 break; … … 5140 5149 5141 5150 /* Line 1806 of yacc.c */ 5142 #line 390 "parser.yy"5151 #line 400 "parser.yy" 5143 5152 { (yyval.en) = 0; } 5144 5153 break; … … 5147 5156 5148 5157 /* Line 1806 of yacc.c */ 5149 #line 393 "parser.yy"5158 #line 403 "parser.yy" 5150 5159 { (yyval.en) = (yyvsp[(3) - (3)].en)->set_argName( (yyvsp[(1) - (3)].tok) ); } 5151 5160 break; … … 5154 5163 5155 5164 /* Line 1806 of yacc.c */ 5156 #line 398 "parser.yy"5165 #line 408 "parser.yy" 5157 5166 { (yyval.en) = (yyvsp[(7) - (7)].en)->set_argName( (yyvsp[(3) - (7)].en) ); } 5158 5167 break; … … 5161 5170 5162 5171 /* Line 1806 of yacc.c */ 5163 #line 4 00 "parser.yy"5172 #line 410 "parser.yy" 5164 5173 { (yyval.en) = (yyvsp[(9) - (9)].en)->set_argName( new CompositeExprNode( build_tuple( (ExpressionNode *)(yyvsp[(3) - (9)].en)->set_link( (yyvsp[(5) - (9)].en) ) ) ) ); } 5165 5174 break; … … 5168 5177 5169 5178 /* Line 1806 of yacc.c */ 5170 #line 4 05 "parser.yy"5179 #line 415 "parser.yy" 5171 5180 { (yyval.en) = (ExpressionNode *)(yyvsp[(1) - (3)].en)->set_link( (yyvsp[(3) - (3)].en) ); } 5172 5181 break; … … 5175 5184 5176 5185 /* Line 1806 of yacc.c */ 5177 #line 4 10 "parser.yy"5186 #line 420 "parser.yy" 5178 5187 { (yyval.en) = new VarRefNode( (yyvsp[(1) - (1)].tok) ); } 5179 5188 break; … … 5182 5191 5183 5192 /* Line 1806 of yacc.c */ 5184 #line 4 14 "parser.yy"5193 #line 424 "parser.yy" 5185 5194 { (yyval.en) = new CompositeExprNode( build_fieldSel( (yyvsp[(3) - (3)].en), new VarRefNode( (yyvsp[(1) - (3)].tok) ) ) ); } 5186 5195 break; … … 5189 5198 5190 5199 /* Line 1806 of yacc.c */ 5191 #line 4 16 "parser.yy"5200 #line 426 "parser.yy" 5192 5201 { (yyval.en) = new CompositeExprNode( build_fieldSel( (yyvsp[(5) - (7)].en), new VarRefNode( (yyvsp[(1) - (7)].tok) ) ) ); } 5193 5202 break; … … 5196 5205 5197 5206 /* Line 1806 of yacc.c */ 5198 #line 4 18 "parser.yy"5207 #line 428 "parser.yy" 5199 5208 { (yyval.en) = new CompositeExprNode( build_pfieldSel( (yyvsp[(3) - (3)].en), new VarRefNode( (yyvsp[(1) - (3)].tok) ) ) ); } 5200 5209 break; … … 5203 5212 5204 5213 /* Line 1806 of yacc.c */ 5205 #line 4 20 "parser.yy"5214 #line 430 "parser.yy" 5206 5215 { (yyval.en) = new CompositeExprNode( build_pfieldSel( (yyvsp[(5) - (7)].en), new VarRefNode( (yyvsp[(1) - (7)].tok) ) ) ); } 5207 5216 break; … … 5210 5219 5211 5220 /* Line 1806 of yacc.c */ 5212 #line 4 28 "parser.yy"5221 #line 438 "parser.yy" 5213 5222 { (yyval.en) = (yyvsp[(1) - (1)].constant); } 5214 5223 break; … … 5217 5226 5218 5227 /* Line 1806 of yacc.c */ 5219 #line 4 30 "parser.yy"5228 #line 440 "parser.yy" 5220 5229 { (yyval.en) = (yyvsp[(1) - (1)].constant); } 5221 5230 break; … … 5224 5233 5225 5234 /* Line 1806 of yacc.c */ 5226 #line 4 32 "parser.yy"5235 #line 442 "parser.yy" 5227 5236 { (yyval.en) = (yyvsp[(2) - (2)].en)->set_extension( true ); } 5228 5237 break; … … 5231 5240 5232 5241 /* Line 1806 of yacc.c */ 5233 #line 4 37 "parser.yy"5242 #line 447 "parser.yy" 5234 5243 { 5235 5244 switch ( (yyvsp[(1) - (2)].op) ) { … … 5249 5258 5250 5259 /* Line 1806 of yacc.c */ 5251 #line 4 50 "parser.yy"5260 #line 460 "parser.yy" 5252 5261 { (yyval.en) = new CompositeExprNode( build_unary_val( (yyvsp[(1) - (2)].op), (yyvsp[(2) - (2)].en) ) ); } 5253 5262 break; … … 5256 5265 5257 5266 /* Line 1806 of yacc.c */ 5258 #line 4 52 "parser.yy"5267 #line 462 "parser.yy" 5259 5268 { (yyval.en) = new CompositeExprNode( build_unary_ptr( OperKinds::Incr, (yyvsp[(2) - (2)].en) ) ); } 5260 5269 break; … … 5263 5272 5264 5273 /* Line 1806 of yacc.c */ 5265 #line 4 54 "parser.yy"5274 #line 464 "parser.yy" 5266 5275 { (yyval.en) = new CompositeExprNode( build_unary_ptr( OperKinds::Decr, (yyvsp[(2) - (2)].en) ) ); } 5267 5276 break; … … 5270 5279 5271 5280 /* Line 1806 of yacc.c */ 5272 #line 4 56 "parser.yy"5281 #line 466 "parser.yy" 5273 5282 { (yyval.en) = new CompositeExprNode( build_sizeOf( (yyvsp[(2) - (2)].en) ) ); } 5274 5283 break; … … 5277 5286 5278 5287 /* Line 1806 of yacc.c */ 5279 #line 4 58 "parser.yy"5288 #line 468 "parser.yy" 5280 5289 { (yyval.en) = new CompositeExprNode( build_sizeOf( new TypeValueNode( (yyvsp[(3) - (4)].decl) ) ) ); } 5281 5290 break; … … 5284 5293 5285 5294 /* Line 1806 of yacc.c */ 5286 #line 4 60 "parser.yy"5295 #line 470 "parser.yy" 5287 5296 { (yyval.en) = new CompositeExprNode( build_offsetOf( new TypeValueNode( (yyvsp[(3) - (6)].decl) ), new VarRefNode( (yyvsp[(5) - (6)].tok) ) ) ); } 5288 5297 break; … … 5291 5300 5292 5301 /* Line 1806 of yacc.c */ 5293 #line 4 62 "parser.yy"5302 #line 472 "parser.yy" 5294 5303 { (yyval.en) = new CompositeExprNode( build_attr( new VarRefNode( (yyvsp[(1) - (1)].tok) ) ) ); } 5295 5304 break; … … 5298 5307 5299 5308 /* Line 1806 of yacc.c */ 5300 #line 4 64 "parser.yy"5309 #line 474 "parser.yy" 5301 5310 { (yyval.en) = new CompositeExprNode( build_attr( new VarRefNode( (yyvsp[(1) - (4)].tok) ), new TypeValueNode( (yyvsp[(3) - (4)].decl) ) ) ); } 5302 5311 break; … … 5305 5314 5306 5315 /* Line 1806 of yacc.c */ 5307 #line 4 66 "parser.yy"5316 #line 476 "parser.yy" 5308 5317 { (yyval.en) = new CompositeExprNode( build_attr( new VarRefNode( (yyvsp[(1) - (4)].tok) ), (yyvsp[(3) - (4)].en) ) ); } 5309 5318 break; … … 5312 5321 5313 5322 /* Line 1806 of yacc.c */ 5314 #line 4 68 "parser.yy"5323 #line 478 "parser.yy" 5315 5324 { (yyval.en) = new CompositeExprNode( build_alignOf( (yyvsp[(2) - (2)].en) ) ); } 5316 5325 break; … … 5319 5328 5320 5329 /* Line 1806 of yacc.c */ 5321 #line 4 70 "parser.yy"5330 #line 480 "parser.yy" 5322 5331 { (yyval.en) = new CompositeExprNode( build_alignOf( new TypeValueNode( (yyvsp[(3) - (4)].decl) ) ) ); } 5323 5332 break; … … 5326 5335 5327 5336 /* Line 1806 of yacc.c */ 5328 #line 4 76 "parser.yy"5337 #line 486 "parser.yy" 5329 5338 { (yyval.op) = OperKinds::PointTo; } 5330 5339 break; … … 5333 5342 5334 5343 /* Line 1806 of yacc.c */ 5335 #line 4 77 "parser.yy"5344 #line 487 "parser.yy" 5336 5345 { (yyval.op) = OperKinds::AddressOf; } 5337 5346 break; … … 5340 5349 5341 5350 /* Line 1806 of yacc.c */ 5342 #line 4 83 "parser.yy"5351 #line 493 "parser.yy" 5343 5352 { (yyval.op) = OperKinds::UnPlus; } 5344 5353 break; … … 5347 5356 5348 5357 /* Line 1806 of yacc.c */ 5349 #line 4 84 "parser.yy"5358 #line 494 "parser.yy" 5350 5359 { (yyval.op) = OperKinds::UnMinus; } 5351 5360 break; … … 5354 5363 5355 5364 /* Line 1806 of yacc.c */ 5356 #line 4 85 "parser.yy"5365 #line 495 "parser.yy" 5357 5366 { (yyval.op) = OperKinds::Neg; } 5358 5367 break; … … 5361 5370 5362 5371 /* Line 1806 of yacc.c */ 5363 #line 4 86 "parser.yy"5372 #line 496 "parser.yy" 5364 5373 { (yyval.op) = OperKinds::BitNeg; } 5365 5374 break; … … 5368 5377 5369 5378 /* Line 1806 of yacc.c */ 5370 #line 492 "parser.yy"5379 #line 502 "parser.yy" 5371 5380 { (yyval.en) = new CompositeExprNode( build_cast( new TypeValueNode( (yyvsp[(2) - (4)].decl) ), (yyvsp[(4) - (4)].en) ) ); } 5372 5381 break; … … 5375 5384 5376 5385 /* Line 1806 of yacc.c */ 5377 #line 494 "parser.yy"5386 #line 504 "parser.yy" 5378 5387 { (yyval.en) = new CompositeExprNode( build_cast( new TypeValueNode( (yyvsp[(2) - (4)].decl) ), (yyvsp[(4) - (4)].en) ) ); } 5379 5388 break; … … 5382 5391 5383 5392 /* Line 1806 of yacc.c */ 5384 #line 5 00 "parser.yy"5393 #line 510 "parser.yy" 5385 5394 { (yyval.en) = new CompositeExprNode( build_binary_val( OperKinds::Mul, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5386 5395 break; … … 5389 5398 5390 5399 /* Line 1806 of yacc.c */ 5391 #line 5 02 "parser.yy"5400 #line 512 "parser.yy" 5392 5401 { (yyval.en) = new CompositeExprNode( build_binary_val( OperKinds::Div, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5393 5402 break; … … 5396 5405 5397 5406 /* Line 1806 of yacc.c */ 5398 #line 5 04 "parser.yy"5407 #line 514 "parser.yy" 5399 5408 { (yyval.en) = new CompositeExprNode( build_binary_val( OperKinds::Mod, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5400 5409 break; … … 5403 5412 5404 5413 /* Line 1806 of yacc.c */ 5405 #line 5 10 "parser.yy"5414 #line 520 "parser.yy" 5406 5415 { (yyval.en) = new CompositeExprNode( build_binary_val( OperKinds::Plus, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5407 5416 break; … … 5410 5419 5411 5420 /* Line 1806 of yacc.c */ 5412 #line 5 12 "parser.yy"5421 #line 522 "parser.yy" 5413 5422 { (yyval.en) = new CompositeExprNode( build_binary_val( OperKinds::Minus, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5414 5423 break; … … 5417 5426 5418 5427 /* Line 1806 of yacc.c */ 5419 #line 5 18 "parser.yy"5428 #line 528 "parser.yy" 5420 5429 { (yyval.en) = new CompositeExprNode( build_binary_val( OperKinds::LShift, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5421 5430 break; … … 5424 5433 5425 5434 /* Line 1806 of yacc.c */ 5426 #line 5 20 "parser.yy"5435 #line 530 "parser.yy" 5427 5436 { (yyval.en) = new CompositeExprNode( build_binary_val( OperKinds::RShift, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5428 5437 break; … … 5431 5440 5432 5441 /* Line 1806 of yacc.c */ 5433 #line 5 26 "parser.yy"5442 #line 536 "parser.yy" 5434 5443 { (yyval.en) = new CompositeExprNode( build_binary_val( OperKinds::LThan, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5435 5444 break; … … 5438 5447 5439 5448 /* Line 1806 of yacc.c */ 5440 #line 5 28 "parser.yy"5449 #line 538 "parser.yy" 5441 5450 { (yyval.en) = new CompositeExprNode( build_binary_val( OperKinds::GThan, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5442 5451 break; … … 5445 5454 5446 5455 /* Line 1806 of yacc.c */ 5447 #line 5 30 "parser.yy"5456 #line 540 "parser.yy" 5448 5457 { (yyval.en) = new CompositeExprNode( build_binary_val( OperKinds::LEThan, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5449 5458 break; … … 5452 5461 5453 5462 /* Line 1806 of yacc.c */ 5454 #line 5 32 "parser.yy"5463 #line 542 "parser.yy" 5455 5464 { (yyval.en) = new CompositeExprNode( build_binary_val( OperKinds::GEThan, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5456 5465 break; … … 5459 5468 5460 5469 /* Line 1806 of yacc.c */ 5461 #line 5 38 "parser.yy"5470 #line 548 "parser.yy" 5462 5471 { (yyval.en) = new CompositeExprNode( build_binary_val( OperKinds::Eq, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5463 5472 break; … … 5466 5475 5467 5476 /* Line 1806 of yacc.c */ 5468 #line 5 40 "parser.yy"5477 #line 550 "parser.yy" 5469 5478 { (yyval.en) = new CompositeExprNode( build_binary_val( OperKinds::Neq, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5470 5479 break; … … 5473 5482 5474 5483 /* Line 1806 of yacc.c */ 5475 #line 5 46 "parser.yy"5484 #line 556 "parser.yy" 5476 5485 { (yyval.en) = new CompositeExprNode( build_binary_val( OperKinds::BitAnd, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5477 5486 break; … … 5480 5489 5481 5490 /* Line 1806 of yacc.c */ 5482 #line 5 52 "parser.yy"5491 #line 562 "parser.yy" 5483 5492 { (yyval.en) = new CompositeExprNode( build_binary_val( OperKinds::Xor, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5484 5493 break; … … 5487 5496 5488 5497 /* Line 1806 of yacc.c */ 5489 #line 5 58 "parser.yy"5498 #line 568 "parser.yy" 5490 5499 { (yyval.en) = new CompositeExprNode( build_binary_val( OperKinds::BitOr, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5491 5500 break; … … 5494 5503 5495 5504 /* Line 1806 of yacc.c */ 5496 #line 5 64 "parser.yy"5505 #line 574 "parser.yy" 5497 5506 { (yyval.en) = new CompositeExprNode( build_and_or( (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en), true ) ); } 5498 5507 break; … … 5501 5510 5502 5511 /* Line 1806 of yacc.c */ 5503 #line 5 70 "parser.yy"5512 #line 580 "parser.yy" 5504 5513 { (yyval.en) = new CompositeExprNode( build_and_or( (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en), false ) ); } 5505 5514 break; … … 5508 5517 5509 5518 /* Line 1806 of yacc.c */ 5510 #line 5 76 "parser.yy"5519 #line 586 "parser.yy" 5511 5520 { (yyval.en) = new CompositeExprNode( build_cond( (yyvsp[(1) - (5)].en), (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].en) ) ); } 5512 5521 break; … … 5515 5524 5516 5525 /* Line 1806 of yacc.c */ 5517 #line 5 79 "parser.yy"5526 #line 589 "parser.yy" 5518 5527 { (yyval.en) = new CompositeExprNode( build_cond( (yyvsp[(1) - (4)].en), (yyvsp[(1) - (4)].en), (yyvsp[(4) - (4)].en) ) ); } 5519 5528 break; … … 5522 5531 5523 5532 /* Line 1806 of yacc.c */ 5524 #line 5 81 "parser.yy"5533 #line 591 "parser.yy" 5525 5534 { (yyval.en) = new CompositeExprNode( build_cond( (yyvsp[(1) - (5)].en), (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].en) ) ); } 5526 5535 break; … … 5529 5538 5530 5539 /* Line 1806 of yacc.c */ 5531 #line 592 "parser.yy"5540 #line 602 "parser.yy" 5532 5541 { (yyval.en) = new CompositeExprNode( build_binary_ptr( (yyvsp[(2) - (3)].op), (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5533 5542 break; … … 5536 5545 5537 5546 /* Line 1806 of yacc.c */ 5538 #line 594 "parser.yy"5547 #line 604 "parser.yy" 5539 5548 { (yyval.en) = ( (yyvsp[(2) - (2)].en) == 0 ) ? (yyvsp[(1) - (2)].en) : new CompositeExprNode( build_binary_ptr( OperKinds::Assign, (yyvsp[(1) - (2)].en), (yyvsp[(2) - (2)].en) ) ); } 5540 5549 break; … … 5543 5552 5544 5553 /* Line 1806 of yacc.c */ 5545 #line 599 "parser.yy"5554 #line 609 "parser.yy" 5546 5555 { (yyval.en) = new NullExprNode; } 5547 5556 break; … … 5550 5559 5551 5560 /* Line 1806 of yacc.c */ 5552 #line 6 04 "parser.yy"5561 #line 614 "parser.yy" 5553 5562 { (yyval.op) = OperKinds::Assign; } 5554 5563 break; … … 5557 5566 5558 5567 /* Line 1806 of yacc.c */ 5559 #line 6 05 "parser.yy"5568 #line 615 "parser.yy" 5560 5569 { (yyval.op) = OperKinds::MulAssn; } 5561 5570 break; … … 5564 5573 5565 5574 /* Line 1806 of yacc.c */ 5566 #line 6 06 "parser.yy"5575 #line 616 "parser.yy" 5567 5576 { (yyval.op) = OperKinds::DivAssn; } 5568 5577 break; … … 5571 5580 5572 5581 /* Line 1806 of yacc.c */ 5573 #line 6 07 "parser.yy"5582 #line 617 "parser.yy" 5574 5583 { (yyval.op) = OperKinds::ModAssn; } 5575 5584 break; … … 5578 5587 5579 5588 /* Line 1806 of yacc.c */ 5580 #line 6 08 "parser.yy"5589 #line 618 "parser.yy" 5581 5590 { (yyval.op) = OperKinds::PlusAssn; } 5582 5591 break; … … 5585 5594 5586 5595 /* Line 1806 of yacc.c */ 5587 #line 6 09 "parser.yy"5596 #line 619 "parser.yy" 5588 5597 { (yyval.op) = OperKinds::MinusAssn; } 5589 5598 break; … … 5592 5601 5593 5602 /* Line 1806 of yacc.c */ 5594 #line 6 10 "parser.yy"5603 #line 620 "parser.yy" 5595 5604 { (yyval.op) = OperKinds::LSAssn; } 5596 5605 break; … … 5599 5608 5600 5609 /* Line 1806 of yacc.c */ 5601 #line 6 11 "parser.yy"5610 #line 621 "parser.yy" 5602 5611 { (yyval.op) = OperKinds::RSAssn; } 5603 5612 break; … … 5606 5615 5607 5616 /* Line 1806 of yacc.c */ 5608 #line 6 12 "parser.yy"5617 #line 622 "parser.yy" 5609 5618 { (yyval.op) = OperKinds::AndAssn; } 5610 5619 break; … … 5613 5622 5614 5623 /* Line 1806 of yacc.c */ 5615 #line 6 13 "parser.yy"5624 #line 623 "parser.yy" 5616 5625 { (yyval.op) = OperKinds::ERAssn; } 5617 5626 break; … … 5620 5629 5621 5630 /* Line 1806 of yacc.c */ 5622 #line 6 14 "parser.yy"5631 #line 624 "parser.yy" 5623 5632 { (yyval.op) = OperKinds::OrAssn; } 5624 5633 break; … … 5627 5636 5628 5637 /* Line 1806 of yacc.c */ 5629 #line 6 21 "parser.yy"5638 #line 631 "parser.yy" 5630 5639 { (yyval.en) = new CompositeExprNode( build_tuple() ); } 5631 5640 break; … … 5634 5643 5635 5644 /* Line 1806 of yacc.c */ 5636 #line 6 23 "parser.yy"5645 #line 633 "parser.yy" 5637 5646 { (yyval.en) = new CompositeExprNode( build_tuple( (yyvsp[(3) - (5)].en) ) ); } 5638 5647 break; … … 5641 5650 5642 5651 /* Line 1806 of yacc.c */ 5643 #line 6 25 "parser.yy"5652 #line 635 "parser.yy" 5644 5653 { (yyval.en) = new CompositeExprNode( build_tuple( (ExpressionNode *)(new NullExprNode)->set_link( (yyvsp[(4) - (6)].en) ) ) ); } 5645 5654 break; … … 5648 5657 5649 5658 /* Line 1806 of yacc.c */ 5650 #line 6 27 "parser.yy"5659 #line 637 "parser.yy" 5651 5660 { (yyval.en) = new CompositeExprNode( build_tuple( (ExpressionNode *)(yyvsp[(3) - (7)].en)->set_link( (yyvsp[(5) - (7)].en) ) ) ); } 5652 5661 break; … … 5655 5664 5656 5665 /* Line 1806 of yacc.c */ 5657 #line 6 33 "parser.yy"5666 #line 643 "parser.yy" 5658 5667 { (yyval.en) = (ExpressionNode *)(yyvsp[(1) - (3)].en)->set_link( (yyvsp[(3) - (3)].en) ); } 5659 5668 break; … … 5662 5671 5663 5672 /* Line 1806 of yacc.c */ 5664 #line 6 39 "parser.yy"5673 #line 649 "parser.yy" 5665 5674 { (yyval.en) = new CompositeExprNode( build_comma( (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5666 5675 break; … … 5669 5678 5670 5679 /* Line 1806 of yacc.c */ 5671 #line 6 44 "parser.yy"5680 #line 654 "parser.yy" 5672 5681 { (yyval.en) = 0; } 5673 5682 break; … … 5676 5685 5677 5686 /* Line 1806 of yacc.c */ 5678 #line 6 53 "parser.yy"5687 #line 663 "parser.yy" 5679 5688 { (yyval.sn) = (yyvsp[(1) - (1)].sn); } 5680 5689 break; … … 5683 5692 5684 5693 /* Line 1806 of yacc.c */ 5685 #line 6 60 "parser.yy"5694 #line 670 "parser.yy" 5686 5695 { 5687 5696 Token fn; … … 5694 5703 5695 5704 /* Line 1806 of yacc.c */ 5696 #line 6 70 "parser.yy"5705 #line 680 "parser.yy" 5697 5706 { 5698 5707 (yyval.sn) = (yyvsp[(4) - (4)].sn)->add_label( (yyvsp[(1) - (4)].tok) ); … … 5703 5712 5704 5713 /* Line 1806 of yacc.c */ 5705 #line 6 77 "parser.yy"5714 #line 687 "parser.yy" 5706 5715 { (yyval.sn) = new CompoundStmtNode( (StatementNode *)0 ); } 5707 5716 break; … … 5710 5719 5711 5720 /* Line 1806 of yacc.c */ 5712 #line 6 84 "parser.yy"5721 #line 694 "parser.yy" 5713 5722 { (yyval.sn) = new CompoundStmtNode( (yyvsp[(5) - (7)].sn) ); } 5714 5723 break; … … 5717 5726 5718 5727 /* Line 1806 of yacc.c */ 5719 #line 690 "parser.yy"5728 #line 700 "parser.yy" 5720 5729 { if ( (yyvsp[(1) - (3)].sn) != 0 ) { (yyvsp[(1) - (3)].sn)->set_link( (yyvsp[(3) - (3)].sn) ); (yyval.sn) = (yyvsp[(1) - (3)].sn); } } 5721 5730 break; … … 5724 5733 5725 5734 /* Line 1806 of yacc.c */ 5726 #line 695 "parser.yy"5735 #line 705 "parser.yy" 5727 5736 { (yyval.sn) = new StatementNode( (yyvsp[(1) - (1)].decl) ); } 5728 5737 break; … … 5731 5740 5732 5741 /* Line 1806 of yacc.c */ 5733 #line 697 "parser.yy"5742 #line 707 "parser.yy" 5734 5743 { // mark all fields in list 5735 5744 for ( DeclarationNode *iter = (yyvsp[(2) - (2)].decl); iter != NULL; iter = (DeclarationNode *)iter->get_link() ) … … 5742 5751 5743 5752 /* Line 1806 of yacc.c */ 5744 #line 7 03 "parser.yy"5753 #line 713 "parser.yy" 5745 5754 { (yyval.sn) = new StatementNode( (yyvsp[(1) - (1)].decl) ); } 5746 5755 break; … … 5749 5758 5750 5759 /* Line 1806 of yacc.c */ 5751 #line 7 10 "parser.yy"5760 #line 720 "parser.yy" 5752 5761 { if ( (yyvsp[(1) - (2)].sn) != 0 ) { (yyvsp[(1) - (2)].sn)->set_link( (yyvsp[(2) - (2)].sn) ); (yyval.sn) = (yyvsp[(1) - (2)].sn); } } 5753 5762 break; … … 5756 5765 5757 5766 /* Line 1806 of yacc.c */ 5758 #line 7 15 "parser.yy"5767 #line 725 "parser.yy" 5759 5768 { (yyval.sn) = new StatementNode( StatementNode::Exp, (yyvsp[(1) - (2)].en), 0 ); } 5760 5769 break; … … 5763 5772 5764 5773 /* Line 1806 of yacc.c */ 5765 #line 7 21 "parser.yy"5774 #line 731 "parser.yy" 5766 5775 { (yyval.sn) = new StatementNode( StatementNode::If, (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ); } 5767 5776 break; … … 5770 5779 5771 5780 /* Line 1806 of yacc.c */ 5772 #line 7 23 "parser.yy"5781 #line 733 "parser.yy" 5773 5782 { (yyval.sn) = new StatementNode( StatementNode::If, (yyvsp[(3) - (7)].en), (StatementNode *)mkList((*(yyvsp[(5) - (7)].sn), *(yyvsp[(7) - (7)].sn) )) ); } 5774 5783 break; … … 5777 5786 5778 5787 /* Line 1806 of yacc.c */ 5779 #line 7 25 "parser.yy"5788 #line 735 "parser.yy" 5780 5789 { (yyval.sn) = new StatementNode( StatementNode::Switch, (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ); } 5781 5790 break; … … 5784 5793 5785 5794 /* Line 1806 of yacc.c */ 5786 #line 7 27 "parser.yy"5795 #line 737 "parser.yy" 5787 5796 { 5788 5797 StatementNode *sw = new StatementNode( StatementNode::Switch, (yyvsp[(3) - (9)].en), (yyvsp[(8) - (9)].sn) ); … … 5799 5808 5800 5809 /* Line 1806 of yacc.c */ 5801 #line 7 37 "parser.yy"5810 #line 747 "parser.yy" 5802 5811 { (yyval.sn) = new StatementNode( StatementNode::Switch, (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ); } 5803 5812 break; … … 5806 5815 5807 5816 /* Line 1806 of yacc.c */ 5808 #line 7 39 "parser.yy"5817 #line 749 "parser.yy" 5809 5818 { 5810 5819 StatementNode *sw = new StatementNode( StatementNode::Switch, (yyvsp[(3) - (9)].en), (yyvsp[(8) - (9)].sn) ); … … 5816 5825 5817 5826 /* Line 1806 of yacc.c */ 5818 #line 7 49 "parser.yy"5827 #line 759 "parser.yy" 5819 5828 { (yyval.en) = (yyvsp[(1) - (1)].en); } 5820 5829 break; … … 5823 5832 5824 5833 /* Line 1806 of yacc.c */ 5825 #line 7 51 "parser.yy"5834 #line 761 "parser.yy" 5826 5835 { (yyval.en) = new CompositeExprNode( build_range( (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 5827 5836 break; … … 5830 5839 5831 5840 /* Line 1806 of yacc.c */ 5832 #line 7 56 "parser.yy"5841 #line 766 "parser.yy" 5833 5842 { (yyval.sn) = new StatementNode( StatementNode::Case, (yyvsp[(1) - (1)].en), 0 ); } 5834 5843 break; … … 5837 5846 5838 5847 /* Line 1806 of yacc.c */ 5839 #line 7 58 "parser.yy"5848 #line 768 "parser.yy" 5840 5849 { (yyval.sn) = (StatementNode *)((yyvsp[(1) - (3)].sn)->set_link( new StatementNode( StatementNode::Case, (yyvsp[(3) - (3)].en), 0 ) ) ); } 5841 5850 break; … … 5844 5853 5845 5854 /* Line 1806 of yacc.c */ 5846 #line 7 62 "parser.yy"5855 #line 772 "parser.yy" 5847 5856 { (yyval.sn) = (yyvsp[(2) - (3)].sn); } 5848 5857 break; … … 5851 5860 5852 5861 /* Line 1806 of yacc.c */ 5853 #line 7 63 "parser.yy"5862 #line 773 "parser.yy" 5854 5863 { (yyval.sn) = new StatementNode( StatementNode::Default ); } 5855 5864 break; … … 5858 5867 5859 5868 /* Line 1806 of yacc.c */ 5860 #line 7 69 "parser.yy"5869 #line 779 "parser.yy" 5861 5870 { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (2)].sn)->set_link( (yyvsp[(2) - (2)].sn) )); } 5862 5871 break; … … 5865 5874 5866 5875 /* Line 1806 of yacc.c */ 5867 #line 7 73 "parser.yy"5876 #line 783 "parser.yy" 5868 5877 { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( new CompoundStmtNode( (yyvsp[(2) - (2)].sn) ) ); } 5869 5878 break; … … 5872 5881 5873 5882 /* Line 1806 of yacc.c */ 5874 #line 7 78 "parser.yy"5883 #line 788 "parser.yy" 5875 5884 { (yyval.sn) = 0; } 5876 5885 break; … … 5879 5888 5880 5889 /* Line 1806 of yacc.c */ 5881 #line 7 84 "parser.yy"5890 #line 794 "parser.yy" 5882 5891 { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( new CompoundStmtNode( (yyvsp[(2) - (2)].sn) ) ); } 5883 5892 break; … … 5886 5895 5887 5896 /* Line 1806 of yacc.c */ 5888 #line 7 86 "parser.yy"5897 #line 796 "parser.yy" 5889 5898 { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (3)].sn)->set_link( (yyvsp[(2) - (3)].sn)->append_last_case( new CompoundStmtNode( (yyvsp[(3) - (3)].sn) ) ) ) ); } 5890 5899 break; … … 5893 5902 5894 5903 /* Line 1806 of yacc.c */ 5895 #line 791 "parser.yy"5904 #line 801 "parser.yy" 5896 5905 { (yyval.sn) = 0; } 5897 5906 break; … … 5900 5909 5901 5910 /* Line 1806 of yacc.c */ 5902 #line 797 "parser.yy"5911 #line 807 "parser.yy" 5903 5912 { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( (yyvsp[(2) - (2)].sn) ); } 5904 5913 break; … … 5907 5916 5908 5917 /* Line 1806 of yacc.c */ 5909 #line 799 "parser.yy"5918 #line 809 "parser.yy" 5910 5919 { (yyval.sn) = (yyvsp[(1) - (3)].sn)->append_last_case( new CompoundStmtNode( (StatementNode *)mkList( (*(yyvsp[(2) - (3)].sn), *(yyvsp[(3) - (3)].sn) ) ) ) ); } 5911 5920 break; … … 5914 5923 5915 5924 /* Line 1806 of yacc.c */ 5916 #line 8 01 "parser.yy"5925 #line 811 "parser.yy" 5917 5926 { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (3)].sn)->set_link( (yyvsp[(2) - (3)].sn)->append_last_case( (yyvsp[(3) - (3)].sn) ))); } 5918 5927 break; … … 5921 5930 5922 5931 /* Line 1806 of yacc.c */ 5923 #line 8 03 "parser.yy"5932 #line 813 "parser.yy" 5924 5933 { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (4)].sn)->set_link( (yyvsp[(2) - (4)].sn)->append_last_case( new CompoundStmtNode( (StatementNode *)mkList( (*(yyvsp[(3) - (4)].sn), *(yyvsp[(4) - (4)].sn) ) ) ) ) ) ); } 5925 5934 break; … … 5928 5937 5929 5938 /* Line 1806 of yacc.c */ 5930 #line 8 08 "parser.yy"5939 #line 818 "parser.yy" 5931 5940 { (yyval.sn) = new StatementNode( StatementNode::Break ); } 5932 5941 break; … … 5935 5944 5936 5945 /* Line 1806 of yacc.c */ 5937 #line 8 14 "parser.yy"5946 #line 824 "parser.yy" 5938 5947 { (yyval.sn) = 0; } 5939 5948 break; … … 5942 5951 5943 5952 /* Line 1806 of yacc.c */ 5944 #line 8 16 "parser.yy"5953 #line 826 "parser.yy" 5945 5954 { (yyval.sn) = 0; } 5946 5955 break; … … 5949 5958 5950 5959 /* Line 1806 of yacc.c */ 5951 #line 8 21 "parser.yy"5960 #line 831 "parser.yy" 5952 5961 { (yyval.sn) = new StatementNode( StatementNode::While, (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ); } 5953 5962 break; … … 5956 5965 5957 5966 /* Line 1806 of yacc.c */ 5958 #line 8 23 "parser.yy"5967 #line 833 "parser.yy" 5959 5968 { (yyval.sn) = new StatementNode( StatementNode::Do, (yyvsp[(5) - (7)].en), (yyvsp[(2) - (7)].sn) ); } 5960 5969 break; … … 5963 5972 5964 5973 /* Line 1806 of yacc.c */ 5965 #line 8 25 "parser.yy"5974 #line 835 "parser.yy" 5966 5975 { (yyval.sn) = new StatementNode( StatementNode::For, (yyvsp[(4) - (6)].en), (yyvsp[(6) - (6)].sn) ); } 5967 5976 break; … … 5970 5979 5971 5980 /* Line 1806 of yacc.c */ 5972 #line 8 30 "parser.yy"5981 #line 840 "parser.yy" 5973 5982 { (yyval.en) = new ForCtlExprNode( (yyvsp[(1) - (6)].en), (yyvsp[(4) - (6)].en), (yyvsp[(6) - (6)].en) ); } 5974 5983 break; … … 5977 5986 5978 5987 /* Line 1806 of yacc.c */ 5979 #line 8 32 "parser.yy"5988 #line 842 "parser.yy" 5980 5989 { (yyval.en) = new ForCtlExprNode( (yyvsp[(1) - (4)].decl), (yyvsp[(2) - (4)].en), (yyvsp[(4) - (4)].en) ); } 5981 5990 break; … … 5984 5993 5985 5994 /* Line 1806 of yacc.c */ 5986 #line 8 37 "parser.yy"5995 #line 847 "parser.yy" 5987 5996 { (yyval.sn) = new StatementNode( StatementNode::Goto, (yyvsp[(2) - (3)].tok) ); } 5988 5997 break; … … 5991 6000 5992 6001 /* Line 1806 of yacc.c */ 5993 #line 8 41 "parser.yy"6002 #line 851 "parser.yy" 5994 6003 { (yyval.sn) = new StatementNode( StatementNode::Goto, (yyvsp[(3) - (4)].en) ); } 5995 6004 break; … … 5998 6007 5999 6008 /* Line 1806 of yacc.c */ 6000 #line 8 44 "parser.yy"6009 #line 854 "parser.yy" 6001 6010 { (yyval.sn) = new StatementNode( StatementNode::Continue ); } 6002 6011 break; … … 6005 6014 6006 6015 /* Line 1806 of yacc.c */ 6007 #line 8 48 "parser.yy"6016 #line 858 "parser.yy" 6008 6017 { (yyval.sn) = new StatementNode( StatementNode::Continue, (yyvsp[(2) - (3)].tok) ); } 6009 6018 break; … … 6012 6021 6013 6022 /* Line 1806 of yacc.c */ 6014 #line 8 51 "parser.yy"6023 #line 861 "parser.yy" 6015 6024 { (yyval.sn) = new StatementNode( StatementNode::Break ); } 6016 6025 break; … … 6019 6028 6020 6029 /* Line 1806 of yacc.c */ 6021 #line 8 55 "parser.yy"6030 #line 865 "parser.yy" 6022 6031 { (yyval.sn) = new StatementNode( StatementNode::Break, (yyvsp[(2) - (3)].tok) ); } 6023 6032 break; … … 6026 6035 6027 6036 /* Line 1806 of yacc.c */ 6028 #line 8 57 "parser.yy"6037 #line 867 "parser.yy" 6029 6038 { (yyval.sn) = new StatementNode( StatementNode::Return, (yyvsp[(2) - (3)].en), 0 ); } 6030 6039 break; … … 6033 6042 6034 6043 /* Line 1806 of yacc.c */ 6035 #line 8 59 "parser.yy"6044 #line 869 "parser.yy" 6036 6045 { (yyval.sn) = new StatementNode( StatementNode::Throw, (yyvsp[(2) - (3)].en), 0 ); } 6037 6046 break; … … 6040 6049 6041 6050 /* Line 1806 of yacc.c */ 6042 #line 8 63 "parser.yy"6051 #line 873 "parser.yy" 6043 6052 { (yyval.sn) = new StatementNode( StatementNode::Throw, (yyvsp[(2) - (3)].en), 0 ); } 6044 6053 break; … … 6047 6056 6048 6057 /* Line 1806 of yacc.c */ 6049 #line 8 65 "parser.yy"6058 #line 875 "parser.yy" 6050 6059 { (yyval.sn) = new StatementNode( StatementNode::Throw, (yyvsp[(2) - (5)].en), 0 ); } 6051 6060 break; … … 6054 6063 6055 6064 /* Line 1806 of yacc.c */ 6056 #line 8 72 "parser.yy"6065 #line 882 "parser.yy" 6057 6066 { (yyval.sn) = new StatementNode( StatementNode::Try, 0,(StatementNode *)(mkList((*(yyvsp[(2) - (3)].sn),*(yyvsp[(3) - (3)].pn) )))); } 6058 6067 break; … … 6061 6070 6062 6071 /* Line 1806 of yacc.c */ 6063 #line 8 74 "parser.yy"6072 #line 884 "parser.yy" 6064 6073 { (yyval.sn) = new StatementNode( StatementNode::Try, 0,(StatementNode *)(mkList((*(yyvsp[(2) - (3)].sn),*(yyvsp[(3) - (3)].pn) )))); } 6065 6074 break; … … 6068 6077 6069 6078 /* Line 1806 of yacc.c */ 6070 #line 8 76 "parser.yy"6079 #line 886 "parser.yy" 6071 6080 { 6072 6081 (yyvsp[(3) - (4)].pn)->set_link( (yyvsp[(4) - (4)].pn) ); … … 6078 6087 6079 6088 /* Line 1806 of yacc.c */ 6080 #line 8 87 "parser.yy"6089 #line 897 "parser.yy" 6081 6090 { (yyval.pn) = StatementNode::newCatchStmt( 0, (yyvsp[(5) - (5)].sn), true ); } 6082 6091 break; … … 6085 6094 6086 6095 /* Line 1806 of yacc.c */ 6087 #line 8 89 "parser.yy"6096 #line 899 "parser.yy" 6088 6097 { (yyval.pn) = (yyvsp[(1) - (6)].pn)->set_link( StatementNode::newCatchStmt( 0, (yyvsp[(6) - (6)].sn), true ) ); } 6089 6098 break; … … 6092 6101 6093 6102 /* Line 1806 of yacc.c */ 6094 #line 891 "parser.yy"6103 #line 901 "parser.yy" 6095 6104 { (yyval.pn) = StatementNode::newCatchStmt( 0, (yyvsp[(5) - (5)].sn), true ); } 6096 6105 break; … … 6099 6108 6100 6109 /* Line 1806 of yacc.c */ 6101 #line 893 "parser.yy"6110 #line 903 "parser.yy" 6102 6111 { (yyval.pn) = (yyvsp[(1) - (6)].pn)->set_link( StatementNode::newCatchStmt( 0, (yyvsp[(6) - (6)].sn), true ) ); } 6103 6112 break; … … 6106 6115 6107 6116 /* Line 1806 of yacc.c */ 6108 #line 898 "parser.yy"6117 #line 908 "parser.yy" 6109 6118 { (yyval.pn) = StatementNode::newCatchStmt( (yyvsp[(5) - (9)].decl), (yyvsp[(8) - (9)].sn) ); } 6110 6119 break; … … 6113 6122 6114 6123 /* Line 1806 of yacc.c */ 6115 #line 9 00 "parser.yy"6124 #line 910 "parser.yy" 6116 6125 { (yyval.pn) = (yyvsp[(1) - (10)].pn)->set_link( StatementNode::newCatchStmt( (yyvsp[(6) - (10)].decl), (yyvsp[(9) - (10)].sn) ) ); } 6117 6126 break; … … 6120 6129 6121 6130 /* Line 1806 of yacc.c */ 6122 #line 9 02 "parser.yy"6131 #line 912 "parser.yy" 6123 6132 { (yyval.pn) = StatementNode::newCatchStmt( (yyvsp[(5) - (9)].decl), (yyvsp[(8) - (9)].sn) ); } 6124 6133 break; … … 6127 6136 6128 6137 /* Line 1806 of yacc.c */ 6129 #line 9 04 "parser.yy"6138 #line 914 "parser.yy" 6130 6139 { (yyval.pn) = (yyvsp[(1) - (10)].pn)->set_link( StatementNode::newCatchStmt( (yyvsp[(6) - (10)].decl), (yyvsp[(9) - (10)].sn) ) ); } 6131 6140 break; … … 6134 6143 6135 6144 /* Line 1806 of yacc.c */ 6136 #line 9 09 "parser.yy"6145 #line 919 "parser.yy" 6137 6146 { 6138 6147 (yyval.pn) = new StatementNode( StatementNode::Finally, 0, (yyvsp[(2) - (2)].sn) ); … … 6144 6153 6145 6154 /* Line 1806 of yacc.c */ 6146 #line 9 23 "parser.yy"6155 #line 933 "parser.yy" 6147 6156 { 6148 6157 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6154 6163 6155 6164 /* Line 1806 of yacc.c */ 6156 #line 9 28 "parser.yy"6165 #line 938 "parser.yy" 6157 6166 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); } 6158 6167 break; … … 6161 6170 6162 6171 /* Line 1806 of yacc.c */ 6163 #line 9 30 "parser.yy"6172 #line 940 "parser.yy" 6164 6173 { 6165 6174 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6171 6180 6172 6181 /* Line 1806 of yacc.c */ 6173 #line 9 39 "parser.yy"6182 #line 949 "parser.yy" 6174 6183 { (yyval.sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (6)].flag), (yyvsp[(4) - (6)].constant), 0 ); } 6175 6184 break; … … 6178 6187 6179 6188 /* Line 1806 of yacc.c */ 6180 #line 9 41 "parser.yy"6189 #line 951 "parser.yy" 6181 6190 { (yyval.sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (8)].flag), (yyvsp[(4) - (8)].constant), (yyvsp[(6) - (8)].en) ); } 6182 6191 break; … … 6185 6194 6186 6195 /* Line 1806 of yacc.c */ 6187 #line 9 43 "parser.yy"6196 #line 953 "parser.yy" 6188 6197 { (yyval.sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (10)].flag), (yyvsp[(4) - (10)].constant), (yyvsp[(6) - (10)].en), (yyvsp[(8) - (10)].en) ); } 6189 6198 break; … … 6192 6201 6193 6202 /* Line 1806 of yacc.c */ 6194 #line 9 45 "parser.yy"6203 #line 955 "parser.yy" 6195 6204 { (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) ); } 6196 6205 break; … … 6199 6208 6200 6209 /* Line 1806 of yacc.c */ 6201 #line 9 47 "parser.yy"6210 #line 957 "parser.yy" 6202 6211 { (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) ); } 6203 6212 break; … … 6206 6215 6207 6216 /* Line 1806 of yacc.c */ 6208 #line 9 52 "parser.yy"6217 #line 962 "parser.yy" 6209 6218 { (yyval.flag) = false; } 6210 6219 break; … … 6213 6222 6214 6223 /* Line 1806 of yacc.c */ 6215 #line 9 54 "parser.yy"6224 #line 964 "parser.yy" 6216 6225 { (yyval.flag) = true; } 6217 6226 break; … … 6220 6229 6221 6230 /* Line 1806 of yacc.c */ 6222 #line 9 59 "parser.yy"6231 #line 969 "parser.yy" 6223 6232 { (yyval.en) = 0; } 6224 6233 break; … … 6227 6236 6228 6237 /* Line 1806 of yacc.c */ 6229 #line 9 66 "parser.yy"6238 #line 976 "parser.yy" 6230 6239 { (yyval.en) = (ExpressionNode *)(yyvsp[(1) - (3)].en)->set_link( (yyvsp[(3) - (3)].en) ); } 6231 6240 break; … … 6234 6243 6235 6244 /* Line 1806 of yacc.c */ 6236 #line 9 71 "parser.yy"6245 #line 981 "parser.yy" 6237 6246 { (yyval.en) = new AsmExprNode( 0, (yyvsp[(1) - (4)].constant), (yyvsp[(3) - (4)].en) ); } 6238 6247 break; … … 6241 6250 6242 6251 /* Line 1806 of yacc.c */ 6243 #line 9 73 "parser.yy"6252 #line 983 "parser.yy" 6244 6253 { (yyval.en) = new AsmExprNode( (yyvsp[(2) - (7)].en), (yyvsp[(4) - (7)].constant), (yyvsp[(6) - (7)].en) ); } 6245 6254 break; … … 6248 6257 6249 6258 /* Line 1806 of yacc.c */ 6250 #line 9 78 "parser.yy"6259 #line 988 "parser.yy" 6251 6260 { (yyval.constant) = 0; } 6252 6261 break; … … 6255 6264 6256 6265 /* Line 1806 of yacc.c */ 6257 #line 9 80 "parser.yy"6266 #line 990 "parser.yy" 6258 6267 { (yyval.constant) = (yyvsp[(1) - (1)].constant); } 6259 6268 break; … … 6262 6271 6263 6272 /* Line 1806 of yacc.c */ 6264 #line 9 82 "parser.yy"6273 #line 992 "parser.yy" 6265 6274 { (yyval.constant) = (ConstantNode *)(yyvsp[(1) - (3)].constant)->set_link( (yyvsp[(3) - (3)].constant) ); } 6266 6275 break; … … 6269 6278 6270 6279 /* Line 1806 of yacc.c */ 6271 #line 9 87 "parser.yy"6280 #line 997 "parser.yy" 6272 6281 { (yyval.label) = new LabelNode(); (yyval.label)->append_label( (yyvsp[(1) - (1)].tok) ); } 6273 6282 break; … … 6276 6285 6277 6286 /* Line 1806 of yacc.c */ 6278 #line 9 89 "parser.yy"6287 #line 999 "parser.yy" 6279 6288 { (yyval.label) = (yyvsp[(1) - (3)].label); (yyvsp[(1) - (3)].label)->append_label( (yyvsp[(3) - (3)].tok) ); } 6280 6289 break; … … 6283 6292 6284 6293 /* Line 1806 of yacc.c */ 6285 #line 996 "parser.yy"6294 #line 1006 "parser.yy" 6286 6295 { (yyval.decl) = 0; } 6287 6296 break; … … 6290 6299 6291 6300 /* Line 1806 of yacc.c */ 6292 #line 10 03 "parser.yy"6301 #line 1013 "parser.yy" 6293 6302 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ); } 6294 6303 break; … … 6297 6306 6298 6307 /* Line 1806 of yacc.c */ 6299 #line 10 08 "parser.yy"6308 #line 1018 "parser.yy" 6300 6309 { (yyval.decl) = 0; } 6301 6310 break; … … 6304 6313 6305 6314 /* Line 1806 of yacc.c */ 6306 #line 10 15 "parser.yy"6315 #line 1025 "parser.yy" 6307 6316 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ); } 6308 6317 break; … … 6311 6320 6312 6321 /* Line 1806 of yacc.c */ 6313 #line 10 29 "parser.yy"6322 #line 1039 "parser.yy" 6314 6323 {} 6315 6324 break; … … 6318 6327 6319 6328 /* Line 1806 of yacc.c */ 6320 #line 10 30 "parser.yy"6329 #line 1040 "parser.yy" 6321 6330 {} 6322 6331 break; … … 6325 6334 6326 6335 /* Line 1806 of yacc.c */ 6327 #line 10 59 "parser.yy"6336 #line 1069 "parser.yy" 6328 6337 { 6329 6338 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6335 6344 6336 6345 /* Line 1806 of yacc.c */ 6337 #line 10 66 "parser.yy"6346 #line 1076 "parser.yy" 6338 6347 { 6339 6348 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6345 6354 6346 6355 /* Line 1806 of yacc.c */ 6347 #line 10 71 "parser.yy"6356 #line 1081 "parser.yy" 6348 6357 { 6349 6358 typedefTable.addToEnclosingScope( *(yyvsp[(5) - (6)].tok), TypedefTable::ID ); … … 6355 6364 6356 6365 /* Line 1806 of yacc.c */ 6357 #line 10 81 "parser.yy"6366 #line 1091 "parser.yy" 6358 6367 { 6359 6368 typedefTable.setNextIdentifier( *(yyvsp[(2) - (3)].tok) ); … … 6365 6374 6366 6375 /* Line 1806 of yacc.c */ 6367 #line 10 86 "parser.yy"6376 #line 1096 "parser.yy" 6368 6377 { 6369 6378 typedefTable.setNextIdentifier( *(yyvsp[(2) - (3)].tok) ); … … 6375 6384 6376 6385 /* Line 1806 of yacc.c */ 6377 #line 1 091 "parser.yy"6386 #line 1101 "parser.yy" 6378 6387 { 6379 6388 typedefTable.setNextIdentifier( *(yyvsp[(3) - (4)].tok) ); … … 6385 6394 6386 6395 /* Line 1806 of yacc.c */ 6387 #line 1 099 "parser.yy"6396 #line 1109 "parser.yy" 6388 6397 { 6389 6398 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6395 6404 6396 6405 /* Line 1806 of yacc.c */ 6397 #line 11 04 "parser.yy"6406 #line 1114 "parser.yy" 6398 6407 { 6399 6408 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6405 6414 6406 6415 /* Line 1806 of yacc.c */ 6407 #line 11 09 "parser.yy"6416 #line 1119 "parser.yy" 6408 6417 { 6409 6418 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6415 6424 6416 6425 /* Line 1806 of yacc.c */ 6417 #line 11 14 "parser.yy"6426 #line 1124 "parser.yy" 6418 6427 { 6419 6428 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6425 6434 6426 6435 /* Line 1806 of yacc.c */ 6427 #line 11 19 "parser.yy"6436 #line 1129 "parser.yy" 6428 6437 { 6429 6438 typedefTable.addToEnclosingScope( *(yyvsp[(5) - (5)].tok), TypedefTable::ID ); … … 6435 6444 6436 6445 /* Line 1806 of yacc.c */ 6437 #line 11 27 "parser.yy"6446 #line 1137 "parser.yy" 6438 6447 { 6439 6448 (yyval.decl) = DeclarationNode::newFunction( (yyvsp[(3) - (8)].tok), DeclarationNode::newTuple( 0 ), (yyvsp[(6) - (8)].decl), 0, true ); … … 6444 6453 6445 6454 /* Line 1806 of yacc.c */ 6446 #line 11 50 "parser.yy"6455 #line 1160 "parser.yy" 6447 6456 { 6448 6457 (yyval.decl) = DeclarationNode::newFunction( (yyvsp[(2) - (7)].tok), (yyvsp[(1) - (7)].decl), (yyvsp[(5) - (7)].decl), 0, true ); … … 6453 6462 6454 6463 /* Line 1806 of yacc.c */ 6455 #line 11 54 "parser.yy"6464 #line 1164 "parser.yy" 6456 6465 { 6457 6466 (yyval.decl) = DeclarationNode::newFunction( (yyvsp[(2) - (7)].tok), (yyvsp[(1) - (7)].decl), (yyvsp[(5) - (7)].decl), 0, true ); … … 6462 6471 6463 6472 /* Line 1806 of yacc.c */ 6464 #line 11 61 "parser.yy"6473 #line 1171 "parser.yy" 6465 6474 { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (5)].decl) ); } 6466 6475 break; … … 6469 6478 6470 6479 /* Line 1806 of yacc.c */ 6471 #line 11 65 "parser.yy"6480 #line 1175 "parser.yy" 6472 6481 { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (9)].decl)->appendList( (yyvsp[(7) - (9)].decl) ) ); } 6473 6482 break; … … 6476 6485 6477 6486 /* Line 1806 of yacc.c */ 6478 #line 11 70 "parser.yy"6487 #line 1180 "parser.yy" 6479 6488 { 6480 6489 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6486 6495 6487 6496 /* Line 1806 of yacc.c */ 6488 #line 11 75 "parser.yy"6497 #line 1185 "parser.yy" 6489 6498 { 6490 6499 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6496 6505 6497 6506 /* Line 1806 of yacc.c */ 6498 #line 11 80 "parser.yy"6507 #line 1190 "parser.yy" 6499 6508 { 6500 6509 typedefTable.addToEnclosingScope( *(yyvsp[(5) - (5)].tok), TypedefTable::TD ); … … 6506 6515 6507 6516 /* Line 1806 of yacc.c */ 6508 #line 1 191 "parser.yy"6517 #line 1201 "parser.yy" 6509 6518 { 6510 6519 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6516 6525 6517 6526 /* Line 1806 of yacc.c */ 6518 #line 1 196 "parser.yy"6527 #line 1206 "parser.yy" 6519 6528 { 6520 6529 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6526 6535 6527 6536 /* Line 1806 of yacc.c */ 6528 #line 12 01 "parser.yy"6537 #line 1211 "parser.yy" 6529 6538 { 6530 6539 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6536 6545 6537 6546 /* Line 1806 of yacc.c */ 6538 #line 12 06 "parser.yy"6547 #line 1216 "parser.yy" 6539 6548 { 6540 6549 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6546 6555 6547 6556 /* Line 1806 of yacc.c */ 6548 #line 12 11 "parser.yy"6557 #line 1221 "parser.yy" 6549 6558 { 6550 6559 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6556 6565 6557 6566 /* Line 1806 of yacc.c */ 6558 #line 12 20 "parser.yy"6567 #line 1230 "parser.yy" 6559 6568 { 6560 6569 typedefTable.addToEnclosingScope( *(yyvsp[(2) - (4)].tok), TypedefTable::TD ); … … 6566 6575 6567 6576 /* Line 1806 of yacc.c */ 6568 #line 12 25 "parser.yy"6577 #line 1235 "parser.yy" 6569 6578 { 6570 6579 typedefTable.addToEnclosingScope( *(yyvsp[(5) - (7)].tok), TypedefTable::TD ); … … 6576 6585 6577 6586 /* Line 1806 of yacc.c */ 6578 #line 12 42 "parser.yy"6587 #line 1252 "parser.yy" 6579 6588 { 6580 6589 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6586 6595 6587 6596 /* Line 1806 of yacc.c */ 6588 #line 12 47 "parser.yy"6597 #line 1257 "parser.yy" 6589 6598 { 6590 6599 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6596 6605 6597 6606 /* Line 1806 of yacc.c */ 6598 #line 12 69 "parser.yy"6607 #line 1279 "parser.yy" 6599 6608 { (yyval.decl) = 0; } 6600 6609 break; … … 6603 6612 6604 6613 /* Line 1806 of yacc.c */ 6605 #line 12 81 "parser.yy"6614 #line 1291 "parser.yy" 6606 6615 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 6607 6616 break; … … 6610 6619 6611 6620 /* Line 1806 of yacc.c */ 6612 #line 1 292 "parser.yy"6621 #line 1302 "parser.yy" 6613 6622 { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Const ); } 6614 6623 break; … … 6617 6626 6618 6627 /* Line 1806 of yacc.c */ 6619 #line 1 294 "parser.yy"6628 #line 1304 "parser.yy" 6620 6629 { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Restrict ); } 6621 6630 break; … … 6624 6633 6625 6634 /* Line 1806 of yacc.c */ 6626 #line 1 296 "parser.yy"6635 #line 1306 "parser.yy" 6627 6636 { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Volatile ); } 6628 6637 break; … … 6631 6640 6632 6641 /* Line 1806 of yacc.c */ 6633 #line 1 298 "parser.yy"6642 #line 1308 "parser.yy" 6634 6643 { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Lvalue ); } 6635 6644 break; … … 6638 6647 6639 6648 /* Line 1806 of yacc.c */ 6640 #line 13 00 "parser.yy"6649 #line 1310 "parser.yy" 6641 6650 { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Atomic ); } 6642 6651 break; … … 6645 6654 6646 6655 /* Line 1806 of yacc.c */ 6647 #line 13 02 "parser.yy"6656 #line 1312 "parser.yy" 6648 6657 { 6649 6658 typedefTable.enterScope(); … … 6654 6663 6655 6664 /* Line 1806 of yacc.c */ 6656 #line 13 06 "parser.yy"6665 #line 1316 "parser.yy" 6657 6666 { 6658 6667 typedefTable.leaveScope(); … … 6664 6673 6665 6674 /* Line 1806 of yacc.c */ 6666 #line 13 15 "parser.yy"6675 #line 1325 "parser.yy" 6667 6676 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 6668 6677 break; … … 6671 6680 6672 6681 /* Line 1806 of yacc.c */ 6673 #line 13 17 "parser.yy"6682 #line 1327 "parser.yy" 6674 6683 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 6675 6684 break; … … 6678 6687 6679 6688 /* Line 1806 of yacc.c */ 6680 #line 13 28 "parser.yy"6689 #line 1338 "parser.yy" 6681 6690 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 6682 6691 break; … … 6685 6694 6686 6695 /* Line 1806 of yacc.c */ 6687 #line 13 37 "parser.yy"6696 #line 1347 "parser.yy" 6688 6697 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Extern ); } 6689 6698 break; … … 6692 6701 6693 6702 /* Line 1806 of yacc.c */ 6694 #line 13 39 "parser.yy"6703 #line 1349 "parser.yy" 6695 6704 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Static ); } 6696 6705 break; … … 6699 6708 6700 6709 /* Line 1806 of yacc.c */ 6701 #line 13 41 "parser.yy"6710 #line 1351 "parser.yy" 6702 6711 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Auto ); } 6703 6712 break; … … 6706 6715 6707 6716 /* Line 1806 of yacc.c */ 6708 #line 13 43 "parser.yy"6717 #line 1353 "parser.yy" 6709 6718 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Register ); } 6710 6719 break; … … 6713 6722 6714 6723 /* Line 1806 of yacc.c */ 6715 #line 13 45 "parser.yy"6724 #line 1355 "parser.yy" 6716 6725 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Inline ); } 6717 6726 break; … … 6720 6729 6721 6730 /* Line 1806 of yacc.c */ 6722 #line 13 47 "parser.yy"6731 #line 1357 "parser.yy" 6723 6732 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Fortran ); } 6724 6733 break; … … 6727 6736 6728 6737 /* Line 1806 of yacc.c */ 6729 #line 13 49 "parser.yy"6738 #line 1359 "parser.yy" 6730 6739 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Noreturn ); } 6731 6740 break; … … 6734 6743 6735 6744 /* Line 1806 of yacc.c */ 6736 #line 13 51 "parser.yy"6745 #line 1361 "parser.yy" 6737 6746 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Threadlocal ); } 6738 6747 break; … … 6741 6750 6742 6751 /* Line 1806 of yacc.c */ 6743 #line 13 56 "parser.yy"6752 #line 1366 "parser.yy" 6744 6753 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Char ); } 6745 6754 break; … … 6748 6757 6749 6758 /* Line 1806 of yacc.c */ 6750 #line 13 58 "parser.yy"6759 #line 1368 "parser.yy" 6751 6760 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Double ); } 6752 6761 break; … … 6755 6764 6756 6765 /* Line 1806 of yacc.c */ 6757 #line 13 60 "parser.yy"6766 #line 1370 "parser.yy" 6758 6767 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Float ); } 6759 6768 break; … … 6762 6771 6763 6772 /* Line 1806 of yacc.c */ 6764 #line 13 62 "parser.yy"6773 #line 1372 "parser.yy" 6765 6774 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Int ); } 6766 6775 break; … … 6769 6778 6770 6779 /* Line 1806 of yacc.c */ 6771 #line 13 64 "parser.yy"6780 #line 1374 "parser.yy" 6772 6781 { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Long ); } 6773 6782 break; … … 6776 6785 6777 6786 /* Line 1806 of yacc.c */ 6778 #line 13 66 "parser.yy"6787 #line 1376 "parser.yy" 6779 6788 { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Short ); } 6780 6789 break; … … 6783 6792 6784 6793 /* Line 1806 of yacc.c */ 6785 #line 13 68 "parser.yy"6794 #line 1378 "parser.yy" 6786 6795 { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Signed ); } 6787 6796 break; … … 6790 6799 6791 6800 /* Line 1806 of yacc.c */ 6792 #line 13 70 "parser.yy"6801 #line 1380 "parser.yy" 6793 6802 { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Unsigned ); } 6794 6803 break; … … 6797 6806 6798 6807 /* Line 1806 of yacc.c */ 6799 #line 13 72 "parser.yy"6808 #line 1382 "parser.yy" 6800 6809 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Void ); } 6801 6810 break; … … 6804 6813 6805 6814 /* Line 1806 of yacc.c */ 6806 #line 13 74 "parser.yy"6815 #line 1384 "parser.yy" 6807 6816 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Bool ); } 6808 6817 break; … … 6811 6820 6812 6821 /* Line 1806 of yacc.c */ 6813 #line 13 76 "parser.yy"6822 #line 1386 "parser.yy" 6814 6823 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Complex ); } 6815 6824 break; … … 6818 6827 6819 6828 /* Line 1806 of yacc.c */ 6820 #line 13 78 "parser.yy"6829 #line 1388 "parser.yy" 6821 6830 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Imaginary ); } 6822 6831 break; … … 6825 6834 6826 6835 /* Line 1806 of yacc.c */ 6827 #line 13 80 "parser.yy"6836 #line 1390 "parser.yy" 6828 6837 { (yyval.decl) = DeclarationNode::newBuiltinType( DeclarationNode::Valist ); } 6829 6838 break; … … 6832 6841 6833 6842 /* Line 1806 of yacc.c */ 6834 #line 13 87 "parser.yy"6843 #line 1397 "parser.yy" 6835 6844 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 6836 6845 break; … … 6839 6848 6840 6849 /* Line 1806 of yacc.c */ 6841 #line 13 89 "parser.yy"6850 #line 1399 "parser.yy" 6842 6851 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 6843 6852 break; … … 6846 6855 6847 6856 /* Line 1806 of yacc.c */ 6848 #line 1 391 "parser.yy"6857 #line 1401 "parser.yy" 6849 6858 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 6850 6859 break; … … 6853 6862 6854 6863 /* Line 1806 of yacc.c */ 6855 #line 1 393 "parser.yy"6864 #line 1403 "parser.yy" 6856 6865 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addType( (yyvsp[(1) - (3)].decl) ); } 6857 6866 break; … … 6860 6869 6861 6870 /* Line 1806 of yacc.c */ 6862 #line 1 399 "parser.yy"6871 #line 1409 "parser.yy" 6863 6872 { (yyval.decl) = (yyvsp[(2) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 6864 6873 break; … … 6867 6876 6868 6877 /* Line 1806 of yacc.c */ 6869 #line 14 06 "parser.yy"6878 #line 1416 "parser.yy" 6870 6879 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 6871 6880 break; … … 6874 6883 6875 6884 /* Line 1806 of yacc.c */ 6876 #line 14 08 "parser.yy"6885 #line 1418 "parser.yy" 6877 6886 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 6878 6887 break; … … 6881 6890 6882 6891 /* Line 1806 of yacc.c */ 6883 #line 14 10 "parser.yy"6892 #line 1420 "parser.yy" 6884 6893 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addType( (yyvsp[(2) - (2)].decl) ); } 6885 6894 break; … … 6888 6897 6889 6898 /* Line 1806 of yacc.c */ 6890 #line 14 15 "parser.yy"6899 #line 1425 "parser.yy" 6891 6900 { (yyval.decl) = (yyvsp[(3) - (4)].decl); } 6892 6901 break; … … 6895 6904 6896 6905 /* Line 1806 of yacc.c */ 6897 #line 14 17 "parser.yy"6906 #line 1427 "parser.yy" 6898 6907 { (yyval.decl) = DeclarationNode::newTypeof( (yyvsp[(3) - (4)].en) ); } 6899 6908 break; … … 6902 6911 6903 6912 /* Line 1806 of yacc.c */ 6904 #line 14 19 "parser.yy"6913 #line 1429 "parser.yy" 6905 6914 { (yyval.decl) = DeclarationNode::newAttr( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].decl) ); } 6906 6915 break; … … 6909 6918 6910 6919 /* Line 1806 of yacc.c */ 6911 #line 14 21 "parser.yy"6920 #line 1431 "parser.yy" 6912 6921 { (yyval.decl) = DeclarationNode::newAttr( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].en) ); } 6913 6922 break; 6914 6923 6915 6924 case 350: 6916 6917 /* Line 1806 of yacc.c */6918 #line 1427 "parser.yy"6919 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }6920 break;6921 6922 case 351:6923 6924 /* Line 1806 of yacc.c */6925 #line 1429 "parser.yy"6926 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }6927 break;6928 6929 case 352:6930 6931 /* Line 1806 of yacc.c */6932 #line 1431 "parser.yy"6933 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }6934 break;6935 6936 case 354:6937 6925 6938 6926 /* Line 1806 of yacc.c */ … … 6941 6929 break; 6942 6930 6943 case 35 5:6931 case 351: 6944 6932 6945 6933 /* Line 1806 of yacc.c */ … … 6948 6936 break; 6949 6937 6938 case 352: 6939 6940 /* Line 1806 of yacc.c */ 6941 #line 1441 "parser.yy" 6942 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 6943 break; 6944 6945 case 354: 6946 6947 /* Line 1806 of yacc.c */ 6948 #line 1447 "parser.yy" 6949 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 6950 break; 6951 6952 case 355: 6953 6954 /* Line 1806 of yacc.c */ 6955 #line 1449 "parser.yy" 6956 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 6957 break; 6958 6950 6959 case 357: 6951 6960 6952 6961 /* Line 1806 of yacc.c */ 6953 #line 14 45 "parser.yy"6962 #line 1455 "parser.yy" 6954 6963 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 6955 6964 break; … … 6958 6967 6959 6968 /* Line 1806 of yacc.c */ 6960 #line 14 47 "parser.yy"6969 #line 1457 "parser.yy" 6961 6970 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 6962 6971 break; … … 6965 6974 6966 6975 /* Line 1806 of yacc.c */ 6967 #line 14 49 "parser.yy"6976 #line 1459 "parser.yy" 6968 6977 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 6969 6978 break; … … 6972 6981 6973 6982 /* Line 1806 of yacc.c */ 6974 #line 14 54 "parser.yy"6983 #line 1464 "parser.yy" 6975 6984 { (yyval.decl) = DeclarationNode::newFromTypedef( (yyvsp[(1) - (1)].tok) ); } 6976 6985 break; … … 6979 6988 6980 6989 /* Line 1806 of yacc.c */ 6981 #line 14 56 "parser.yy"6990 #line 1466 "parser.yy" 6982 6991 { (yyval.decl) = DeclarationNode::newFromTypedef( (yyvsp[(2) - (2)].tok) )->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 6983 6992 break; … … 6986 6995 6987 6996 /* Line 1806 of yacc.c */ 6988 #line 14 58 "parser.yy"6997 #line 1468 "parser.yy" 6989 6998 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 6990 6999 break; … … 6993 7002 6994 7003 /* Line 1806 of yacc.c */ 6995 #line 14 68 "parser.yy"7004 #line 1478 "parser.yy" 6996 7005 { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (4)].aggKey), 0, 0, (yyvsp[(3) - (4)].decl), true ); } 6997 7006 break; … … 7000 7009 7001 7010 /* Line 1806 of yacc.c */ 7002 #line 14 70 "parser.yy"7011 #line 1480 "parser.yy" 7003 7012 { 7004 7013 typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) ); … … 7010 7019 7011 7020 /* Line 1806 of yacc.c */ 7012 #line 14 75 "parser.yy"7021 #line 1485 "parser.yy" 7013 7022 { typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) ); } 7014 7023 break; … … 7017 7026 7018 7027 /* Line 1806 of yacc.c */ 7019 #line 14 77 "parser.yy"7028 #line 1487 "parser.yy" 7020 7029 { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (6)].aggKey), (yyvsp[(2) - (6)].tok), 0, (yyvsp[(5) - (6)].decl), true ); } 7021 7030 break; … … 7024 7033 7025 7034 /* Line 1806 of yacc.c */ 7026 #line 14 79 "parser.yy"7035 #line 1489 "parser.yy" 7027 7036 { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (7)].aggKey), 0, (yyvsp[(3) - (7)].en), (yyvsp[(6) - (7)].decl), false ); } 7028 7037 break; … … 7031 7040 7032 7041 /* Line 1806 of yacc.c */ 7033 #line 14 81 "parser.yy"7042 #line 1491 "parser.yy" 7034 7043 { (yyval.decl) = (yyvsp[(2) - (2)].decl); } 7035 7044 break; … … 7038 7047 7039 7048 /* Line 1806 of yacc.c */ 7040 #line 14 86 "parser.yy"7049 #line 1496 "parser.yy" 7041 7050 { (yyval.aggKey) = DeclarationNode::Struct; } 7042 7051 break; … … 7045 7054 7046 7055 /* Line 1806 of yacc.c */ 7047 #line 14 88 "parser.yy"7056 #line 1498 "parser.yy" 7048 7057 { (yyval.aggKey) = DeclarationNode::Union; } 7049 7058 break; … … 7052 7061 7053 7062 /* Line 1806 of yacc.c */ 7054 #line 1 493 "parser.yy"7063 #line 1503 "parser.yy" 7055 7064 { (yyval.decl) = 0; } 7056 7065 break; … … 7059 7068 7060 7069 /* Line 1806 of yacc.c */ 7061 #line 1 495 "parser.yy"7070 #line 1505 "parser.yy" 7062 7071 { (yyval.decl) = (yyvsp[(1) - (2)].decl) != 0 ? (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(2) - (2)].decl) ) : (yyvsp[(2) - (2)].decl); } 7063 7072 break; … … 7066 7075 7067 7076 /* Line 1806 of yacc.c */ 7068 #line 15 01 "parser.yy"7077 #line 1511 "parser.yy" 7069 7078 { (yyval.decl) = (yyvsp[(2) - (3)].decl)->set_extension( true ); } 7070 7079 break; … … 7073 7082 7074 7083 /* Line 1806 of yacc.c */ 7075 #line 15 04 "parser.yy"7084 #line 1514 "parser.yy" 7076 7085 { // mark all fields in list 7077 7086 for ( DeclarationNode *iter = (yyvsp[(2) - (3)].decl); iter != NULL; iter = (DeclarationNode *)iter->get_link() ) … … 7084 7093 7085 7094 /* Line 1806 of yacc.c */ 7086 #line 15 14 "parser.yy"7095 #line 1524 "parser.yy" 7087 7096 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addName( (yyvsp[(2) - (2)].tok) ); } 7088 7097 break; … … 7091 7100 7092 7101 /* Line 1806 of yacc.c */ 7093 #line 15 16 "parser.yy"7102 #line 1526 "parser.yy" 7094 7103 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(1) - (3)].decl)->cloneType( (yyvsp[(3) - (3)].tok) ) ); } 7095 7104 break; … … 7098 7107 7099 7108 /* Line 1806 of yacc.c */ 7100 #line 15 18 "parser.yy"7109 #line 1528 "parser.yy" 7101 7110 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(1) - (2)].decl)->cloneType( 0 ) ); } 7102 7111 break; … … 7105 7114 7106 7115 /* Line 1806 of yacc.c */ 7107 #line 15 23 "parser.yy"7116 #line 1533 "parser.yy" 7108 7117 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); } 7109 7118 break; … … 7112 7121 7113 7122 /* Line 1806 of yacc.c */ 7114 #line 15 25 "parser.yy"7123 #line 1535 "parser.yy" 7115 7124 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( (yyvsp[(1) - (4)].decl)->cloneBaseType( (yyvsp[(4) - (4)].decl) ) ); } 7116 7125 break; … … 7119 7128 7120 7129 /* Line 1806 of yacc.c */ 7121 #line 15 30 "parser.yy"7130 #line 1540 "parser.yy" 7122 7131 { (yyval.decl) = DeclarationNode::newName( 0 ); /* XXX */ } 7123 7132 break; … … 7126 7135 7127 7136 /* Line 1806 of yacc.c */ 7128 #line 15 32 "parser.yy"7137 #line 1542 "parser.yy" 7129 7138 { (yyval.decl) = DeclarationNode::newBitfield( (yyvsp[(1) - (1)].en) ); } 7130 7139 break; … … 7133 7142 7134 7143 /* Line 1806 of yacc.c */ 7135 #line 15 35 "parser.yy"7144 #line 1545 "parser.yy" 7136 7145 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addBitfield( (yyvsp[(2) - (2)].en) ); } 7137 7146 break; … … 7140 7149 7141 7150 /* Line 1806 of yacc.c */ 7142 #line 15 38 "parser.yy"7151 #line 1548 "parser.yy" 7143 7152 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addBitfield( (yyvsp[(2) - (2)].en) ); } 7144 7153 break; … … 7147 7156 7148 7157 /* Line 1806 of yacc.c */ 7149 #line 15 44 "parser.yy"7158 #line 1554 "parser.yy" 7150 7159 { (yyval.en) = 0; } 7151 7160 break; … … 7154 7163 7155 7164 /* Line 1806 of yacc.c */ 7156 #line 15 46 "parser.yy"7165 #line 1556 "parser.yy" 7157 7166 { (yyval.en) = (yyvsp[(1) - (1)].en); } 7158 7167 break; … … 7161 7170 7162 7171 /* Line 1806 of yacc.c */ 7163 #line 15 51 "parser.yy"7172 #line 1561 "parser.yy" 7164 7173 { (yyval.en) = (yyvsp[(2) - (2)].en); } 7165 7174 break; … … 7168 7177 7169 7178 /* Line 1806 of yacc.c */ 7170 #line 15 60 "parser.yy"7179 #line 1570 "parser.yy" 7171 7180 { (yyval.decl) = DeclarationNode::newEnum( 0, (yyvsp[(3) - (5)].decl) ); } 7172 7181 break; … … 7175 7184 7176 7185 /* Line 1806 of yacc.c */ 7177 #line 15 62 "parser.yy"7186 #line 1572 "parser.yy" 7178 7187 { 7179 7188 typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) ); … … 7185 7194 7186 7195 /* Line 1806 of yacc.c */ 7187 #line 15 67 "parser.yy"7196 #line 1577 "parser.yy" 7188 7197 { typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) ); } 7189 7198 break; … … 7192 7201 7193 7202 /* Line 1806 of yacc.c */ 7194 #line 15 69 "parser.yy"7203 #line 1579 "parser.yy" 7195 7204 { (yyval.decl) = DeclarationNode::newEnum( (yyvsp[(2) - (7)].tok), (yyvsp[(5) - (7)].decl) ); } 7196 7205 break; … … 7199 7208 7200 7209 /* Line 1806 of yacc.c */ 7201 #line 15 74 "parser.yy"7210 #line 1584 "parser.yy" 7202 7211 { (yyval.decl) = DeclarationNode::newEnumConstant( (yyvsp[(1) - (2)].tok), (yyvsp[(2) - (2)].en) ); } 7203 7212 break; … … 7206 7215 7207 7216 /* Line 1806 of yacc.c */ 7208 #line 15 76 "parser.yy"7217 #line 1586 "parser.yy" 7209 7218 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( DeclarationNode::newEnumConstant( (yyvsp[(3) - (4)].tok), (yyvsp[(4) - (4)].en) ) ); } 7210 7219 break; … … 7213 7222 7214 7223 /* Line 1806 of yacc.c */ 7215 #line 15 81 "parser.yy"7224 #line 1591 "parser.yy" 7216 7225 { (yyval.en) = 0; } 7217 7226 break; … … 7220 7229 7221 7230 /* Line 1806 of yacc.c */ 7222 #line 15 83 "parser.yy"7231 #line 1593 "parser.yy" 7223 7232 { (yyval.en) = (yyvsp[(2) - (2)].en); } 7224 7233 break; … … 7227 7236 7228 7237 /* Line 1806 of yacc.c */ 7229 #line 1 590 "parser.yy"7238 #line 1600 "parser.yy" 7230 7239 { (yyval.decl) = 0; } 7231 7240 break; … … 7234 7243 7235 7244 /* Line 1806 of yacc.c */ 7236 #line 1 598 "parser.yy"7245 #line 1608 "parser.yy" 7237 7246 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); } 7238 7247 break; … … 7241 7250 7242 7251 /* Line 1806 of yacc.c */ 7243 #line 16 00 "parser.yy"7252 #line 1610 "parser.yy" 7244 7253 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); } 7245 7254 break; … … 7248 7257 7249 7258 /* Line 1806 of yacc.c */ 7250 #line 16 02 "parser.yy"7259 #line 1612 "parser.yy" 7251 7260 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); } 7252 7261 break; 7253 7262 7254 7263 case 410: 7255 7256 /* Line 1806 of yacc.c */7257 #line 1610 "parser.yy"7258 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }7259 break;7260 7261 case 411:7262 7263 /* Line 1806 of yacc.c */7264 #line 1612 "parser.yy"7265 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }7266 break;7267 7268 case 412:7269 7270 /* Line 1806 of yacc.c */7271 #line 1614 "parser.yy"7272 { (yyval.decl) = (yyvsp[(1) - (9)].decl)->appendList( (yyvsp[(5) - (9)].decl) )->appendList( (yyvsp[(9) - (9)].decl) ); }7273 break;7274 7275 case 414:7276 7264 7277 7265 /* Line 1806 of yacc.c */ … … 7280 7268 break; 7281 7269 7270 case 411: 7271 7272 /* Line 1806 of yacc.c */ 7273 #line 1622 "parser.yy" 7274 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); } 7275 break; 7276 7277 case 412: 7278 7279 /* Line 1806 of yacc.c */ 7280 #line 1624 "parser.yy" 7281 { (yyval.decl) = (yyvsp[(1) - (9)].decl)->appendList( (yyvsp[(5) - (9)].decl) )->appendList( (yyvsp[(9) - (9)].decl) ); } 7282 break; 7283 7284 case 414: 7285 7286 /* Line 1806 of yacc.c */ 7287 #line 1630 "parser.yy" 7288 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); } 7289 break; 7290 7282 7291 case 415: 7283 7292 7284 7293 /* Line 1806 of yacc.c */ 7285 #line 16 25 "parser.yy"7294 #line 1635 "parser.yy" 7286 7295 { (yyval.decl) = 0; } 7287 7296 break; … … 7290 7299 7291 7300 /* Line 1806 of yacc.c */ 7292 #line 16 32 "parser.yy"7301 #line 1642 "parser.yy" 7293 7302 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); } 7294 7303 break; … … 7297 7306 7298 7307 /* Line 1806 of yacc.c */ 7299 #line 16 39 "parser.yy"7308 #line 1649 "parser.yy" 7300 7309 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); } 7301 7310 break; … … 7304 7313 7305 7314 /* Line 1806 of yacc.c */ 7306 #line 16 41 "parser.yy"7315 #line 1651 "parser.yy" 7307 7316 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); } 7308 7317 break; … … 7311 7320 7312 7321 /* Line 1806 of yacc.c */ 7313 #line 16 50 "parser.yy"7322 #line 1660 "parser.yy" 7314 7323 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addName( (yyvsp[(2) - (3)].tok) ); } 7315 7324 break; … … 7318 7327 7319 7328 /* Line 1806 of yacc.c */ 7320 #line 16 53 "parser.yy"7329 #line 1663 "parser.yy" 7321 7330 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addName( (yyvsp[(2) - (3)].tok) ); } 7322 7331 break; … … 7325 7334 7326 7335 /* Line 1806 of yacc.c */ 7327 #line 16 55 "parser.yy"7336 #line 1665 "parser.yy" 7328 7337 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addName( (yyvsp[(3) - (4)].tok) )->addQualifiers( (yyvsp[(1) - (4)].decl) ); } 7329 7338 break; … … 7332 7341 7333 7342 /* Line 1806 of yacc.c */ 7334 #line 16 65 "parser.yy"7343 #line 1675 "parser.yy" 7335 7344 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7336 7345 break; … … 7339 7348 7340 7349 /* Line 1806 of yacc.c */ 7341 #line 16 71 "parser.yy"7350 #line 1681 "parser.yy" 7342 7351 { 7343 7352 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7349 7358 7350 7359 /* Line 1806 of yacc.c */ 7351 #line 16 76 "parser.yy"7360 #line 1686 "parser.yy" 7352 7361 { 7353 7362 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7359 7368 7360 7369 /* Line 1806 of yacc.c */ 7361 #line 16 85 "parser.yy"7370 #line 1695 "parser.yy" 7362 7371 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); } 7363 7372 break; … … 7366 7375 7367 7376 /* Line 1806 of yacc.c */ 7368 #line 1 694 "parser.yy"7377 #line 1704 "parser.yy" 7369 7378 { (yyval.decl) = DeclarationNode::newName( (yyvsp[(1) - (1)].tok) ); } 7370 7379 break; … … 7373 7382 7374 7383 /* Line 1806 of yacc.c */ 7375 #line 1 696 "parser.yy"7384 #line 1706 "parser.yy" 7376 7385 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( DeclarationNode::newName( (yyvsp[(3) - (3)].tok) ) ); } 7377 7386 break; … … 7380 7389 7381 7390 /* Line 1806 of yacc.c */ 7382 #line 17 21 "parser.yy"7391 #line 1731 "parser.yy" 7383 7392 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); } 7384 7393 break; … … 7387 7396 7388 7397 /* Line 1806 of yacc.c */ 7389 #line 17 29 "parser.yy"7398 #line 1739 "parser.yy" 7390 7399 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); } 7391 7400 break; … … 7394 7403 7395 7404 /* Line 1806 of yacc.c */ 7396 #line 17 34 "parser.yy"7405 #line 1744 "parser.yy" 7397 7406 { (yyval.in) = 0; } 7398 7407 break; … … 7401 7410 7402 7411 /* Line 1806 of yacc.c */ 7403 #line 17 36 "parser.yy"7412 #line 1746 "parser.yy" 7404 7413 { (yyval.in) = (yyvsp[(2) - (2)].in); } 7405 7414 break; … … 7408 7417 7409 7418 /* Line 1806 of yacc.c */ 7410 #line 17 38 "parser.yy"7419 #line 1748 "parser.yy" 7411 7420 { (yyval.in) = (yyvsp[(2) - (2)].in)->set_maybeConstructed( false ); } 7412 7421 break; … … 7415 7424 7416 7425 /* Line 1806 of yacc.c */ 7417 #line 17 42 "parser.yy"7426 #line 1752 "parser.yy" 7418 7427 { (yyval.in) = new InitializerNode( (yyvsp[(1) - (1)].en) ); } 7419 7428 break; … … 7422 7431 7423 7432 /* Line 1806 of yacc.c */ 7424 #line 17 43 "parser.yy"7433 #line 1753 "parser.yy" 7425 7434 { (yyval.in) = new InitializerNode( (yyvsp[(2) - (4)].in), true ); } 7426 7435 break; … … 7429 7438 7430 7439 /* Line 1806 of yacc.c */ 7431 #line 17 48 "parser.yy"7440 #line 1758 "parser.yy" 7432 7441 { (yyval.in) = 0; } 7433 7442 break; … … 7436 7445 7437 7446 /* Line 1806 of yacc.c */ 7438 #line 17 50 "parser.yy"7447 #line 1760 "parser.yy" 7439 7448 { (yyval.in) = (yyvsp[(2) - (2)].in)->set_designators( (yyvsp[(1) - (2)].en) ); } 7440 7449 break; … … 7443 7452 7444 7453 /* Line 1806 of yacc.c */ 7445 #line 17 51 "parser.yy"7454 #line 1761 "parser.yy" 7446 7455 { (yyval.in) = (InitializerNode *)( (yyvsp[(1) - (3)].in)->set_link( (yyvsp[(3) - (3)].in) ) ); } 7447 7456 break; … … 7450 7459 7451 7460 /* Line 1806 of yacc.c */ 7452 #line 17 53 "parser.yy"7461 #line 1763 "parser.yy" 7453 7462 { (yyval.in) = (InitializerNode *)( (yyvsp[(1) - (4)].in)->set_link( (yyvsp[(4) - (4)].in)->set_designators( (yyvsp[(3) - (4)].en) ) ) ); } 7454 7463 break; … … 7457 7466 7458 7467 /* Line 1806 of yacc.c */ 7459 #line 17 69 "parser.yy"7468 #line 1779 "parser.yy" 7460 7469 { (yyval.en) = new VarRefNode( (yyvsp[(1) - (2)].tok) ); } 7461 7470 break; … … 7464 7473 7465 7474 /* Line 1806 of yacc.c */ 7466 #line 17 75 "parser.yy"7475 #line 1785 "parser.yy" 7467 7476 { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (2)].en)->set_link( (yyvsp[(2) - (2)].en) )); } 7468 7477 break; … … 7471 7480 7472 7481 /* Line 1806 of yacc.c */ 7473 #line 17 83 "parser.yy"7482 #line 1793 "parser.yy" 7474 7483 { (yyval.en) = new DesignatorNode( new VarRefNode( (yyvsp[(1) - (1)].tok) ) ); } 7475 7484 break; … … 7478 7487 7479 7488 /* Line 1806 of yacc.c */ 7480 #line 17 85 "parser.yy"7489 #line 1795 "parser.yy" 7481 7490 { (yyval.en) = new DesignatorNode( new VarRefNode( (yyvsp[(2) - (2)].tok) ) ); } 7482 7491 break; … … 7485 7494 7486 7495 /* Line 1806 of yacc.c */ 7487 #line 17 88 "parser.yy"7496 #line 1798 "parser.yy" 7488 7497 { (yyval.en) = new DesignatorNode( (yyvsp[(3) - (5)].en), true ); } 7489 7498 break; … … 7492 7501 7493 7502 /* Line 1806 of yacc.c */ 7494 #line 1 790 "parser.yy"7503 #line 1800 "parser.yy" 7495 7504 { (yyval.en) = new DesignatorNode( (yyvsp[(3) - (5)].en), true ); } 7496 7505 break; … … 7499 7508 7500 7509 /* Line 1806 of yacc.c */ 7501 #line 1 792 "parser.yy"7510 #line 1802 "parser.yy" 7502 7511 { (yyval.en) = new DesignatorNode( new CompositeExprNode( build_range( (yyvsp[(3) - (7)].en), (yyvsp[(5) - (7)].en) ) ), true ); } 7503 7512 break; … … 7506 7515 7507 7516 /* Line 1806 of yacc.c */ 7508 #line 1 794 "parser.yy"7517 #line 1804 "parser.yy" 7509 7518 { (yyval.en) = new DesignatorNode( (yyvsp[(4) - (6)].en) ); } 7510 7519 break; 7511 7520 7512 7521 case 476: 7513 7514 /* Line 1806 of yacc.c */7515 #line 1818 "parser.yy"7516 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }7517 break;7518 7519 case 477:7520 7521 /* Line 1806 of yacc.c */7522 #line 1820 "parser.yy"7523 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }7524 break;7525 7526 case 478:7527 7528 /* Line 1806 of yacc.c */7529 #line 1822 "parser.yy"7530 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }7531 break;7532 7533 case 480:7534 7522 7535 7523 /* Line 1806 of yacc.c */ … … 7538 7526 break; 7539 7527 7540 case 4 81:7528 case 477: 7541 7529 7542 7530 /* Line 1806 of yacc.c */ … … 7545 7533 break; 7546 7534 7535 case 478: 7536 7537 /* Line 1806 of yacc.c */ 7538 #line 1832 "parser.yy" 7539 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 7540 break; 7541 7542 case 480: 7543 7544 /* Line 1806 of yacc.c */ 7545 #line 1838 "parser.yy" 7546 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7547 break; 7548 7549 case 481: 7550 7551 /* Line 1806 of yacc.c */ 7552 #line 1840 "parser.yy" 7553 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 7554 break; 7555 7547 7556 case 482: 7548 7557 7549 7558 /* Line 1806 of yacc.c */ 7550 #line 18 35 "parser.yy"7559 #line 1845 "parser.yy" 7551 7560 { (yyval.decl) = DeclarationNode::newFromTypeGen( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].en) ); } 7552 7561 break; … … 7555 7564 7556 7565 /* Line 1806 of yacc.c */ 7557 #line 18 41 "parser.yy"7566 #line 1851 "parser.yy" 7558 7567 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( (yyvsp[(3) - (4)].decl) ); } 7559 7568 break; … … 7562 7571 7563 7572 /* Line 1806 of yacc.c */ 7564 #line 18 46 "parser.yy"7573 #line 1856 "parser.yy" 7565 7574 { typedefTable.addToEnclosingScope( *(yyvsp[(2) - (2)].tok), TypedefTable::TD ); } 7566 7575 break; … … 7569 7578 7570 7579 /* Line 1806 of yacc.c */ 7571 #line 18 48 "parser.yy"7580 #line 1858 "parser.yy" 7572 7581 { (yyval.decl) = DeclarationNode::newTypeParam( (yyvsp[(1) - (4)].tclass), (yyvsp[(2) - (4)].tok) )->addAssertions( (yyvsp[(4) - (4)].decl) ); } 7573 7582 break; … … 7576 7585 7577 7586 /* Line 1806 of yacc.c */ 7578 #line 18 54 "parser.yy"7587 #line 1864 "parser.yy" 7579 7588 { (yyval.tclass) = DeclarationNode::Type; } 7580 7589 break; … … 7583 7592 7584 7593 /* Line 1806 of yacc.c */ 7585 #line 18 56 "parser.yy"7594 #line 1866 "parser.yy" 7586 7595 { (yyval.tclass) = DeclarationNode::Ftype; } 7587 7596 break; … … 7590 7599 7591 7600 /* Line 1806 of yacc.c */ 7592 #line 18 58 "parser.yy"7601 #line 1868 "parser.yy" 7593 7602 { (yyval.tclass) = DeclarationNode::Dtype; } 7594 7603 break; … … 7597 7606 7598 7607 /* Line 1806 of yacc.c */ 7599 #line 18 63 "parser.yy"7608 #line 1873 "parser.yy" 7600 7609 { (yyval.decl) = 0; } 7601 7610 break; … … 7604 7613 7605 7614 /* Line 1806 of yacc.c */ 7606 #line 18 65 "parser.yy"7615 #line 1875 "parser.yy" 7607 7616 { (yyval.decl) = (yyvsp[(1) - (2)].decl) != 0 ? (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(2) - (2)].decl) ) : (yyvsp[(2) - (2)].decl); } 7608 7617 break; … … 7611 7620 7612 7621 /* Line 1806 of yacc.c */ 7613 #line 18 70 "parser.yy"7622 #line 1880 "parser.yy" 7614 7623 { 7615 7624 typedefTable.openTrait( *(yyvsp[(2) - (5)].tok) ); … … 7621 7630 7622 7631 /* Line 1806 of yacc.c */ 7623 #line 18 75 "parser.yy"7632 #line 1885 "parser.yy" 7624 7633 { (yyval.decl) = (yyvsp[(4) - (5)].decl); } 7625 7634 break; … … 7628 7637 7629 7638 /* Line 1806 of yacc.c */ 7630 #line 18 77 "parser.yy"7639 #line 1887 "parser.yy" 7631 7640 { (yyval.decl) = 0; } 7632 7641 break; … … 7635 7644 7636 7645 /* Line 1806 of yacc.c */ 7637 #line 18 82 "parser.yy"7646 #line 1892 "parser.yy" 7638 7647 { (yyval.en) = new TypeValueNode( (yyvsp[(1) - (1)].decl) ); } 7639 7648 break; … … 7642 7651 7643 7652 /* Line 1806 of yacc.c */ 7644 #line 18 85 "parser.yy"7653 #line 1895 "parser.yy" 7645 7654 { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_link( new TypeValueNode( (yyvsp[(3) - (3)].decl) ))); } 7646 7655 break; … … 7649 7658 7650 7659 /* Line 1806 of yacc.c */ 7651 #line 18 87 "parser.yy"7660 #line 1897 "parser.yy" 7652 7661 { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_link( (yyvsp[(3) - (3)].en) )); } 7653 7662 break; … … 7656 7665 7657 7666 /* Line 1806 of yacc.c */ 7658 #line 1 892 "parser.yy"7667 #line 1902 "parser.yy" 7659 7668 { (yyval.decl) = (yyvsp[(2) - (2)].decl); } 7660 7669 break; … … 7663 7672 7664 7673 /* Line 1806 of yacc.c */ 7665 #line 1 894 "parser.yy"7674 #line 1904 "parser.yy" 7666 7675 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) ); } 7667 7676 break; … … 7670 7679 7671 7680 /* Line 1806 of yacc.c */ 7672 #line 1 896 "parser.yy"7681 #line 1906 "parser.yy" 7673 7682 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl)->copyStorageClasses( (yyvsp[(1) - (3)].decl) ) ); } 7674 7683 break; … … 7677 7686 7678 7687 /* Line 1806 of yacc.c */ 7679 #line 19 01 "parser.yy"7688 #line 1911 "parser.yy" 7680 7689 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addAssertions( (yyvsp[(2) - (2)].decl) ); } 7681 7690 break; … … 7684 7693 7685 7694 /* Line 1806 of yacc.c */ 7686 #line 19 03 "parser.yy"7695 #line 1913 "parser.yy" 7687 7696 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->addAssertions( (yyvsp[(2) - (4)].decl) )->addType( (yyvsp[(4) - (4)].decl) ); } 7688 7697 break; … … 7691 7700 7692 7701 /* Line 1806 of yacc.c */ 7693 #line 19 08 "parser.yy"7702 #line 1918 "parser.yy" 7694 7703 { 7695 7704 typedefTable.addToEnclosingScope( *(yyvsp[(1) - (1)].tok), TypedefTable::TD ); … … 7701 7710 7702 7711 /* Line 1806 of yacc.c */ 7703 #line 19 13 "parser.yy"7712 #line 1923 "parser.yy" 7704 7713 { 7705 7714 typedefTable.addToEnclosingScope( *(yyvsp[(1) - (6)].tok), TypedefTable::TG ); … … 7711 7720 7712 7721 /* Line 1806 of yacc.c */ 7713 #line 19 21 "parser.yy"7722 #line 1931 "parser.yy" 7714 7723 { 7715 7724 typedefTable.addToEnclosingScope( *(yyvsp[(2) - (9)].tok), TypedefTable::ID ); … … 7721 7730 7722 7731 /* Line 1806 of yacc.c */ 7723 #line 19 26 "parser.yy"7732 #line 1936 "parser.yy" 7724 7733 { 7725 7734 typedefTable.enterTrait( *(yyvsp[(2) - (8)].tok) ); … … 7731 7740 7732 7741 /* Line 1806 of yacc.c */ 7733 #line 19 31 "parser.yy"7742 #line 1941 "parser.yy" 7734 7743 { 7735 7744 typedefTable.leaveTrait(); … … 7742 7751 7743 7752 /* Line 1806 of yacc.c */ 7744 #line 19 41 "parser.yy"7753 #line 1951 "parser.yy" 7745 7754 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ); } 7746 7755 break; … … 7749 7758 7750 7759 /* Line 1806 of yacc.c */ 7751 #line 19 51 "parser.yy"7760 #line 1961 "parser.yy" 7752 7761 { 7753 7762 typedefTable.addToEnclosingScope2( TypedefTable::ID ); … … 7759 7768 7760 7769 /* Line 1806 of yacc.c */ 7761 #line 19 56 "parser.yy"7770 #line 1966 "parser.yy" 7762 7771 { 7763 7772 typedefTable.addToEnclosingScope2( TypedefTable::ID ); … … 7769 7778 7770 7779 /* Line 1806 of yacc.c */ 7771 #line 19 61 "parser.yy"7780 #line 1971 "parser.yy" 7772 7781 { 7773 7782 typedefTable.addToEnclosingScope2( *(yyvsp[(5) - (5)].tok), TypedefTable::ID ); … … 7779 7788 7780 7789 /* Line 1806 of yacc.c */ 7781 #line 19 69 "parser.yy"7790 #line 1979 "parser.yy" 7782 7791 { 7783 7792 typedefTable.addToEnclosingScope2( TypedefTable::ID ); … … 7789 7798 7790 7799 /* Line 1806 of yacc.c */ 7791 #line 19 74 "parser.yy"7800 #line 1984 "parser.yy" 7792 7801 { 7793 7802 typedefTable.addToEnclosingScope2( TypedefTable::ID ); … … 7799 7808 7800 7809 /* Line 1806 of yacc.c */ 7801 #line 19 84 "parser.yy"7810 #line 1994 "parser.yy" 7802 7811 {} 7803 7812 break; … … 7806 7815 7807 7816 /* Line 1806 of yacc.c */ 7808 #line 19 86 "parser.yy"7817 #line 1996 "parser.yy" 7809 7818 { 7810 7819 if ( theTree ) { … … 7819 7828 7820 7829 /* Line 1806 of yacc.c */ 7821 #line 1998 "parser.yy"7830 #line 2008 "parser.yy" 7822 7831 { (yyval.decl) = ( (yyvsp[(1) - (3)].decl) != NULL ) ? (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ) : (yyvsp[(3) - (3)].decl); } 7823 7832 break; … … 7826 7835 7827 7836 /* Line 1806 of yacc.c */ 7828 #line 20 03 "parser.yy"7837 #line 2013 "parser.yy" 7829 7838 { (yyval.decl) = 0; } 7830 7839 break; … … 7833 7842 7834 7843 /* Line 1806 of yacc.c */ 7835 #line 20 11 "parser.yy"7844 #line 2021 "parser.yy" 7836 7845 {} 7837 7846 break; … … 7840 7849 7841 7850 /* Line 1806 of yacc.c */ 7842 #line 20 13 "parser.yy"7851 #line 2023 "parser.yy" 7843 7852 { 7844 7853 linkageStack.push( linkage ); … … 7850 7859 7851 7860 /* Line 1806 of yacc.c */ 7852 #line 20 18 "parser.yy"7861 #line 2028 "parser.yy" 7853 7862 { 7854 7863 linkage = linkageStack.top(); … … 7861 7870 7862 7871 /* Line 1806 of yacc.c */ 7863 #line 20 24 "parser.yy"7872 #line 2034 "parser.yy" 7864 7873 { // mark all fields in list 7865 7874 for ( DeclarationNode *iter = (yyvsp[(2) - (2)].decl); iter != NULL; iter = (DeclarationNode *)iter->get_link() ) … … 7872 7881 7873 7882 /* Line 1806 of yacc.c */ 7874 #line 20 39 "parser.yy"7883 #line 2049 "parser.yy" 7875 7884 { 7876 7885 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7883 7892 7884 7893 /* Line 1806 of yacc.c */ 7885 #line 20 45 "parser.yy"7894 #line 2055 "parser.yy" 7886 7895 { 7887 7896 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7894 7903 7895 7904 /* Line 1806 of yacc.c */ 7896 #line 20 54 "parser.yy"7905 #line 2064 "parser.yy" 7897 7906 { 7898 7907 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7905 7914 7906 7915 /* Line 1806 of yacc.c */ 7907 #line 20 60 "parser.yy"7916 #line 2070 "parser.yy" 7908 7917 { 7909 7918 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7916 7925 7917 7926 /* Line 1806 of yacc.c */ 7918 #line 20 66 "parser.yy"7927 #line 2076 "parser.yy" 7919 7928 { 7920 7929 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7927 7936 7928 7937 /* Line 1806 of yacc.c */ 7929 #line 20 72 "parser.yy"7938 #line 2082 "parser.yy" 7930 7939 { 7931 7940 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7938 7947 7939 7948 /* Line 1806 of yacc.c */ 7940 #line 20 78 "parser.yy"7949 #line 2088 "parser.yy" 7941 7950 { 7942 7951 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7949 7958 7950 7959 /* Line 1806 of yacc.c */ 7951 #line 20 86 "parser.yy"7960 #line 2096 "parser.yy" 7952 7961 { 7953 7962 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7960 7969 7961 7970 /* Line 1806 of yacc.c */ 7962 #line 2 092 "parser.yy"7971 #line 2102 "parser.yy" 7963 7972 { 7964 7973 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7971 7980 7972 7981 /* Line 1806 of yacc.c */ 7973 #line 21 00 "parser.yy"7982 #line 2110 "parser.yy" 7974 7983 { 7975 7984 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7982 7991 7983 7992 /* Line 1806 of yacc.c */ 7984 #line 21 06 "parser.yy"7993 #line 2116 "parser.yy" 7985 7994 { 7986 7995 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7993 8002 7994 8003 /* Line 1806 of yacc.c */ 7995 #line 21 21 "parser.yy"8004 #line 2131 "parser.yy" 7996 8005 { (yyval.en) = new CompositeExprNode( build_range( (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 7997 8006 break; … … 8000 8009 8001 8010 /* Line 1806 of yacc.c */ 8002 #line 21 31 "parser.yy"8011 #line 2141 "parser.yy" 8003 8012 { (yyval.decl) = 0; } 8004 8013 break; … … 8007 8016 8008 8017 /* Line 1806 of yacc.c */ 8009 #line 21 38 "parser.yy"8018 #line 2148 "parser.yy" 8010 8019 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 8011 8020 break; … … 8014 8023 8015 8024 /* Line 1806 of yacc.c */ 8016 #line 21 44 "parser.yy"8025 #line 2154 "parser.yy" 8017 8026 { (yyval.decl) = 0; } 8018 8027 break; … … 8021 8030 8022 8031 /* Line 1806 of yacc.c */ 8023 #line 21 59 "parser.yy"8032 #line 2169 "parser.yy" 8024 8033 {} 8025 8034 break; … … 8028 8037 8029 8038 /* Line 1806 of yacc.c */ 8030 #line 21 60 "parser.yy"8039 #line 2170 "parser.yy" 8031 8040 {} 8032 8041 break; … … 8035 8044 8036 8045 /* Line 1806 of yacc.c */ 8037 #line 21 61 "parser.yy"8046 #line 2171 "parser.yy" 8038 8047 {} 8039 8048 break; … … 8042 8051 8043 8052 /* Line 1806 of yacc.c */ 8044 #line 21 62 "parser.yy"8053 #line 2172 "parser.yy" 8045 8054 {} 8046 8055 break; … … 8049 8058 8050 8059 /* Line 1806 of yacc.c */ 8051 #line 2 197 "parser.yy"8060 #line 2207 "parser.yy" 8052 8061 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8053 8062 break; … … 8056 8065 8057 8066 /* Line 1806 of yacc.c */ 8058 #line 22 00 "parser.yy"8067 #line 2210 "parser.yy" 8059 8068 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8060 8069 break; … … 8063 8072 8064 8073 /* Line 1806 of yacc.c */ 8065 #line 22 02 "parser.yy"8074 #line 2212 "parser.yy" 8066 8075 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8067 8076 break; … … 8070 8079 8071 8080 /* Line 1806 of yacc.c */ 8072 #line 22 07 "parser.yy"8081 #line 2217 "parser.yy" 8073 8082 { 8074 8083 typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) ); … … 8080 8089 8081 8090 /* Line 1806 of yacc.c */ 8082 #line 22 12 "parser.yy"8091 #line 2222 "parser.yy" 8083 8092 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8084 8093 break; … … 8087 8096 8088 8097 /* Line 1806 of yacc.c */ 8089 #line 22 17 "parser.yy"8098 #line 2227 "parser.yy" 8090 8099 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8091 8100 break; … … 8094 8103 8095 8104 /* Line 1806 of yacc.c */ 8096 #line 22 19 "parser.yy"8105 #line 2229 "parser.yy" 8097 8106 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8098 8107 break; … … 8101 8110 8102 8111 /* Line 1806 of yacc.c */ 8103 #line 22 21 "parser.yy"8112 #line 2231 "parser.yy" 8104 8113 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8105 8114 break; … … 8108 8117 8109 8118 /* Line 1806 of yacc.c */ 8110 #line 22 26 "parser.yy"8119 #line 2236 "parser.yy" 8111 8120 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8112 8121 break; … … 8115 8124 8116 8125 /* Line 1806 of yacc.c */ 8117 #line 22 28 "parser.yy"8126 #line 2238 "parser.yy" 8118 8127 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8119 8128 break; … … 8122 8131 8123 8132 /* Line 1806 of yacc.c */ 8124 #line 22 30 "parser.yy"8133 #line 2240 "parser.yy" 8125 8134 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8126 8135 break; … … 8129 8138 8130 8139 /* Line 1806 of yacc.c */ 8131 #line 22 32 "parser.yy"8140 #line 2242 "parser.yy" 8132 8141 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8133 8142 break; … … 8136 8145 8137 8146 /* Line 1806 of yacc.c */ 8138 #line 22 37 "parser.yy"8147 #line 2247 "parser.yy" 8139 8148 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8140 8149 break; … … 8143 8152 8144 8153 /* Line 1806 of yacc.c */ 8145 #line 22 39 "parser.yy"8154 #line 2249 "parser.yy" 8146 8155 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8147 8156 break; … … 8150 8159 8151 8160 /* Line 1806 of yacc.c */ 8152 #line 22 48 "parser.yy"8161 #line 2258 "parser.yy" 8153 8162 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8154 8163 break; … … 8157 8166 8158 8167 /* Line 1806 of yacc.c */ 8159 #line 22 51 "parser.yy"8168 #line 2261 "parser.yy" 8160 8169 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8161 8170 break; … … 8164 8173 8165 8174 /* Line 1806 of yacc.c */ 8166 #line 22 56 "parser.yy"8175 #line 2266 "parser.yy" 8167 8176 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); } 8168 8177 break; … … 8171 8180 8172 8181 /* Line 1806 of yacc.c */ 8173 #line 22 58 "parser.yy"8182 #line 2268 "parser.yy" 8174 8183 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8175 8184 break; … … 8178 8187 8179 8188 /* Line 1806 of yacc.c */ 8180 #line 22 60 "parser.yy"8189 #line 2270 "parser.yy" 8181 8190 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8182 8191 break; … … 8185 8194 8186 8195 /* Line 1806 of yacc.c */ 8187 #line 22 65 "parser.yy"8196 #line 2275 "parser.yy" 8188 8197 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8189 8198 break; … … 8192 8201 8193 8202 /* Line 1806 of yacc.c */ 8194 #line 22 67 "parser.yy"8203 #line 2277 "parser.yy" 8195 8204 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8196 8205 break; … … 8199 8208 8200 8209 /* Line 1806 of yacc.c */ 8201 #line 22 69 "parser.yy"8210 #line 2279 "parser.yy" 8202 8211 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8203 8212 break; … … 8206 8215 8207 8216 /* Line 1806 of yacc.c */ 8208 #line 22 74 "parser.yy"8217 #line 2284 "parser.yy" 8209 8218 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8210 8219 break; … … 8213 8222 8214 8223 /* Line 1806 of yacc.c */ 8215 #line 22 76 "parser.yy"8224 #line 2286 "parser.yy" 8216 8225 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8217 8226 break; … … 8220 8229 8221 8230 /* Line 1806 of yacc.c */ 8222 #line 22 78 "parser.yy"8231 #line 2288 "parser.yy" 8223 8232 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8224 8233 break; … … 8227 8236 8228 8237 /* Line 1806 of yacc.c */ 8229 #line 2 293 "parser.yy"8238 #line 2303 "parser.yy" 8230 8239 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->addIdList( (yyvsp[(3) - (4)].decl) ); } 8231 8240 break; … … 8234 8243 8235 8244 /* Line 1806 of yacc.c */ 8236 #line 2 295 "parser.yy"8245 #line 2305 "parser.yy" 8237 8246 { (yyval.decl) = (yyvsp[(2) - (6)].decl)->addIdList( (yyvsp[(5) - (6)].decl) ); } 8238 8247 break; … … 8241 8250 8242 8251 /* Line 1806 of yacc.c */ 8243 #line 2 297 "parser.yy"8252 #line 2307 "parser.yy" 8244 8253 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8245 8254 break; … … 8248 8257 8249 8258 /* Line 1806 of yacc.c */ 8250 #line 23 02 "parser.yy"8259 #line 2312 "parser.yy" 8251 8260 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8252 8261 break; … … 8255 8264 8256 8265 /* Line 1806 of yacc.c */ 8257 #line 23 04 "parser.yy"8266 #line 2314 "parser.yy" 8258 8267 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8259 8268 break; … … 8262 8271 8263 8272 /* Line 1806 of yacc.c */ 8264 #line 23 06 "parser.yy"8273 #line 2316 "parser.yy" 8265 8274 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8266 8275 break; … … 8269 8278 8270 8279 /* Line 1806 of yacc.c */ 8271 #line 23 11 "parser.yy"8280 #line 2321 "parser.yy" 8272 8281 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8273 8282 break; … … 8276 8285 8277 8286 /* Line 1806 of yacc.c */ 8278 #line 23 13 "parser.yy"8287 #line 2323 "parser.yy" 8279 8288 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8280 8289 break; … … 8283 8292 8284 8293 /* Line 1806 of yacc.c */ 8285 #line 23 15 "parser.yy"8294 #line 2325 "parser.yy" 8286 8295 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8287 8296 break; … … 8290 8299 8291 8300 /* Line 1806 of yacc.c */ 8292 #line 23 30 "parser.yy"8301 #line 2340 "parser.yy" 8293 8302 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8294 8303 break; … … 8297 8306 8298 8307 /* Line 1806 of yacc.c */ 8299 #line 23 33 "parser.yy"8308 #line 2343 "parser.yy" 8300 8309 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8301 8310 break; … … 8304 8313 8305 8314 /* Line 1806 of yacc.c */ 8306 #line 23 35 "parser.yy"8315 #line 2345 "parser.yy" 8307 8316 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8308 8317 break; … … 8311 8320 8312 8321 /* Line 1806 of yacc.c */ 8313 #line 23 41 "parser.yy"8322 #line 2351 "parser.yy" 8314 8323 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8315 8324 break; … … 8318 8327 8319 8328 /* Line 1806 of yacc.c */ 8320 #line 23 46 "parser.yy"8329 #line 2356 "parser.yy" 8321 8330 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8322 8331 break; … … 8325 8334 8326 8335 /* Line 1806 of yacc.c */ 8327 #line 23 48 "parser.yy"8336 #line 2358 "parser.yy" 8328 8337 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8329 8338 break; … … 8332 8341 8333 8342 /* Line 1806 of yacc.c */ 8334 #line 23 50 "parser.yy"8343 #line 2360 "parser.yy" 8335 8344 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8336 8345 break; … … 8339 8348 8340 8349 /* Line 1806 of yacc.c */ 8341 #line 23 55 "parser.yy"8350 #line 2365 "parser.yy" 8342 8351 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8343 8352 break; … … 8346 8355 8347 8356 /* Line 1806 of yacc.c */ 8348 #line 23 57 "parser.yy"8357 #line 2367 "parser.yy" 8349 8358 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8350 8359 break; … … 8353 8362 8354 8363 /* Line 1806 of yacc.c */ 8355 #line 23 59 "parser.yy"8364 #line 2369 "parser.yy" 8356 8365 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8357 8366 break; … … 8360 8369 8361 8370 /* Line 1806 of yacc.c */ 8362 #line 23 61 "parser.yy"8371 #line 2371 "parser.yy" 8363 8372 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8364 8373 break; … … 8367 8376 8368 8377 /* Line 1806 of yacc.c */ 8369 #line 23 66 "parser.yy"8378 #line 2376 "parser.yy" 8370 8379 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); } 8371 8380 break; … … 8374 8383 8375 8384 /* Line 1806 of yacc.c */ 8376 #line 23 68 "parser.yy"8385 #line 2378 "parser.yy" 8377 8386 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8378 8387 break; … … 8381 8390 8382 8391 /* Line 1806 of yacc.c */ 8383 #line 23 70 "parser.yy"8392 #line 2380 "parser.yy" 8384 8393 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8385 8394 break; … … 8388 8397 8389 8398 /* Line 1806 of yacc.c */ 8390 #line 23 80 "parser.yy"8399 #line 2390 "parser.yy" 8391 8400 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8392 8401 break; … … 8395 8404 8396 8405 /* Line 1806 of yacc.c */ 8397 #line 23 83 "parser.yy"8406 #line 2393 "parser.yy" 8398 8407 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8399 8408 break; … … 8402 8411 8403 8412 /* Line 1806 of yacc.c */ 8404 #line 23 85 "parser.yy"8413 #line 2395 "parser.yy" 8405 8414 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8406 8415 break; … … 8409 8418 8410 8419 /* Line 1806 of yacc.c */ 8411 #line 2 390 "parser.yy"8420 #line 2400 "parser.yy" 8412 8421 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8413 8422 break; … … 8416 8425 8417 8426 /* Line 1806 of yacc.c */ 8418 #line 2 392 "parser.yy"8427 #line 2402 "parser.yy" 8419 8428 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8420 8429 break; … … 8423 8432 8424 8433 /* Line 1806 of yacc.c */ 8425 #line 2 394 "parser.yy"8434 #line 2404 "parser.yy" 8426 8435 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8427 8436 break; … … 8430 8439 8431 8440 /* Line 1806 of yacc.c */ 8432 #line 2 399 "parser.yy"8441 #line 2409 "parser.yy" 8433 8442 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8434 8443 break; … … 8437 8446 8438 8447 /* Line 1806 of yacc.c */ 8439 #line 24 01 "parser.yy"8448 #line 2411 "parser.yy" 8440 8449 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8441 8450 break; … … 8444 8453 8445 8454 /* Line 1806 of yacc.c */ 8446 #line 24 03 "parser.yy"8455 #line 2413 "parser.yy" 8447 8456 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8448 8457 break; … … 8451 8460 8452 8461 /* Line 1806 of yacc.c */ 8453 #line 24 05 "parser.yy"8462 #line 2415 "parser.yy" 8454 8463 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8455 8464 break; … … 8458 8467 8459 8468 /* Line 1806 of yacc.c */ 8460 #line 24 10 "parser.yy"8469 #line 2420 "parser.yy" 8461 8470 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); } 8462 8471 break; … … 8465 8474 8466 8475 /* Line 1806 of yacc.c */ 8467 #line 24 12 "parser.yy"8476 #line 2422 "parser.yy" 8468 8477 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8469 8478 break; … … 8472 8481 8473 8482 /* Line 1806 of yacc.c */ 8474 #line 24 14 "parser.yy"8483 #line 2424 "parser.yy" 8475 8484 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8476 8485 break; … … 8479 8488 8480 8489 /* Line 1806 of yacc.c */ 8481 #line 24 45 "parser.yy"8490 #line 2455 "parser.yy" 8482 8491 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8483 8492 break; … … 8486 8495 8487 8496 /* Line 1806 of yacc.c */ 8488 #line 24 48 "parser.yy"8497 #line 2458 "parser.yy" 8489 8498 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8490 8499 break; … … 8493 8502 8494 8503 /* Line 1806 of yacc.c */ 8495 #line 24 50 "parser.yy"8504 #line 2460 "parser.yy" 8496 8505 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8497 8506 break; … … 8500 8509 8501 8510 /* Line 1806 of yacc.c */ 8502 #line 24 55 "parser.yy"8511 #line 2465 "parser.yy" 8503 8512 { 8504 8513 typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) ); … … 8510 8519 8511 8520 /* Line 1806 of yacc.c */ 8512 #line 24 60 "parser.yy"8521 #line 2470 "parser.yy" 8513 8522 { 8514 8523 typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) ); … … 8520 8529 8521 8530 /* Line 1806 of yacc.c */ 8522 #line 24 68 "parser.yy"8531 #line 2478 "parser.yy" 8523 8532 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8524 8533 break; … … 8527 8536 8528 8537 /* Line 1806 of yacc.c */ 8529 #line 24 70 "parser.yy"8538 #line 2480 "parser.yy" 8530 8539 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8531 8540 break; … … 8534 8543 8535 8544 /* Line 1806 of yacc.c */ 8536 #line 24 72 "parser.yy"8545 #line 2482 "parser.yy" 8537 8546 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8538 8547 break; … … 8541 8550 8542 8551 /* Line 1806 of yacc.c */ 8543 #line 24 77 "parser.yy"8552 #line 2487 "parser.yy" 8544 8553 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8545 8554 break; … … 8548 8557 8549 8558 /* Line 1806 of yacc.c */ 8550 #line 24 79 "parser.yy"8559 #line 2489 "parser.yy" 8551 8560 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8552 8561 break; … … 8555 8564 8556 8565 /* Line 1806 of yacc.c */ 8557 #line 24 84 "parser.yy"8566 #line 2494 "parser.yy" 8558 8567 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); } 8559 8568 break; … … 8562 8571 8563 8572 /* Line 1806 of yacc.c */ 8564 #line 24 86 "parser.yy"8573 #line 2496 "parser.yy" 8565 8574 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8566 8575 break; … … 8569 8578 8570 8579 /* Line 1806 of yacc.c */ 8571 #line 25 01 "parser.yy"8580 #line 2511 "parser.yy" 8572 8581 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8573 8582 break; … … 8576 8585 8577 8586 /* Line 1806 of yacc.c */ 8578 #line 25 03 "parser.yy"8587 #line 2513 "parser.yy" 8579 8588 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8580 8589 break; … … 8583 8592 8584 8593 /* Line 1806 of yacc.c */ 8585 #line 25 08 "parser.yy"8594 #line 2518 "parser.yy" 8586 8595 { (yyval.decl) = DeclarationNode::newPointer( 0 ); } 8587 8596 break; … … 8590 8599 8591 8600 /* Line 1806 of yacc.c */ 8592 #line 25 10 "parser.yy"8601 #line 2520 "parser.yy" 8593 8602 { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); } 8594 8603 break; … … 8597 8606 8598 8607 /* Line 1806 of yacc.c */ 8599 #line 25 12 "parser.yy"8608 #line 2522 "parser.yy" 8600 8609 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8601 8610 break; … … 8604 8613 8605 8614 /* Line 1806 of yacc.c */ 8606 #line 25 14 "parser.yy"8615 #line 2524 "parser.yy" 8607 8616 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8608 8617 break; 8609 8618 8610 8619 case 652: 8611 8612 /* Line 1806 of yacc.c */8613 #line 2516 "parser.yy"8614 { (yyval.decl) = (yyvsp[(2) - (3)].decl); }8615 break;8616 8617 case 654:8618 8619 /* Line 1806 of yacc.c */8620 #line 2522 "parser.yy"8621 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }8622 break;8623 8624 case 655:8625 8626 /* Line 1806 of yacc.c */8627 #line 2524 "parser.yy"8628 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }8629 break;8630 8631 case 656:8632 8620 8633 8621 /* Line 1806 of yacc.c */ … … 8636 8624 break; 8637 8625 8626 case 654: 8627 8628 /* Line 1806 of yacc.c */ 8629 #line 2532 "parser.yy" 8630 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8631 break; 8632 8633 case 655: 8634 8635 /* Line 1806 of yacc.c */ 8636 #line 2534 "parser.yy" 8637 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8638 break; 8639 8640 case 656: 8641 8642 /* Line 1806 of yacc.c */ 8643 #line 2536 "parser.yy" 8644 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8645 break; 8646 8638 8647 case 657: 8639 8648 8640 8649 /* Line 1806 of yacc.c */ 8641 #line 25 31 "parser.yy"8650 #line 2541 "parser.yy" 8642 8651 { (yyval.decl) = DeclarationNode::newFunction( 0, 0, (yyvsp[(3) - (5)].decl), 0 ); } 8643 8652 break; … … 8646 8655 8647 8656 /* Line 1806 of yacc.c */ 8648 #line 25 33 "parser.yy"8657 #line 2543 "parser.yy" 8649 8658 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8650 8659 break; … … 8653 8662 8654 8663 /* Line 1806 of yacc.c */ 8655 #line 25 35 "parser.yy"8664 #line 2545 "parser.yy" 8656 8665 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8657 8666 break; … … 8660 8669 8661 8670 /* Line 1806 of yacc.c */ 8662 #line 25 41 "parser.yy"8671 #line 2551 "parser.yy" 8663 8672 { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); } 8664 8673 break; … … 8667 8676 8668 8677 /* Line 1806 of yacc.c */ 8669 #line 25 43 "parser.yy"8678 #line 2553 "parser.yy" 8670 8679 { (yyval.decl) = DeclarationNode::newArray( 0, 0, false )->addArray( (yyvsp[(3) - (3)].decl) ); } 8671 8680 break; … … 8674 8683 8675 8684 /* Line 1806 of yacc.c */ 8676 #line 25 49 "parser.yy"8685 #line 2559 "parser.yy" 8677 8686 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(3) - (5)].en), 0, false ); } 8678 8687 break; … … 8681 8690 8682 8691 /* Line 1806 of yacc.c */ 8683 #line 25 51 "parser.yy"8692 #line 2561 "parser.yy" 8684 8693 { (yyval.decl) = DeclarationNode::newVarArray( 0 ); } 8685 8694 break; … … 8688 8697 8689 8698 /* Line 1806 of yacc.c */ 8690 #line 25 53 "parser.yy"8699 #line 2563 "parser.yy" 8691 8700 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newArray( (yyvsp[(4) - (6)].en), 0, false ) ); } 8692 8701 break; … … 8695 8704 8696 8705 /* Line 1806 of yacc.c */ 8697 #line 25 55 "parser.yy"8706 #line 2565 "parser.yy" 8698 8707 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newVarArray( 0 ) ); } 8699 8708 break; … … 8702 8711 8703 8712 /* Line 1806 of yacc.c */ 8704 #line 25 70 "parser.yy"8713 #line 2580 "parser.yy" 8705 8714 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8706 8715 break; … … 8709 8718 8710 8719 /* Line 1806 of yacc.c */ 8711 #line 25 72 "parser.yy"8720 #line 2582 "parser.yy" 8712 8721 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8713 8722 break; … … 8716 8725 8717 8726 /* Line 1806 of yacc.c */ 8718 #line 25 77 "parser.yy"8727 #line 2587 "parser.yy" 8719 8728 { (yyval.decl) = DeclarationNode::newPointer( 0 ); } 8720 8729 break; … … 8723 8732 8724 8733 /* Line 1806 of yacc.c */ 8725 #line 25 79 "parser.yy"8734 #line 2589 "parser.yy" 8726 8735 { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); } 8727 8736 break; … … 8730 8739 8731 8740 /* Line 1806 of yacc.c */ 8732 #line 25 81 "parser.yy"8741 #line 2591 "parser.yy" 8733 8742 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8734 8743 break; … … 8737 8746 8738 8747 /* Line 1806 of yacc.c */ 8739 #line 25 83 "parser.yy"8748 #line 2593 "parser.yy" 8740 8749 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8741 8750 break; 8742 8751 8743 8752 case 674: 8744 8745 /* Line 1806 of yacc.c */8746 #line 2585 "parser.yy"8747 { (yyval.decl) = (yyvsp[(2) - (3)].decl); }8748 break;8749 8750 case 676:8751 8752 /* Line 1806 of yacc.c */8753 #line 2591 "parser.yy"8754 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }8755 break;8756 8757 case 677:8758 8759 /* Line 1806 of yacc.c */8760 #line 2593 "parser.yy"8761 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }8762 break;8763 8764 case 678:8765 8753 8766 8754 /* Line 1806 of yacc.c */ … … 8769 8757 break; 8770 8758 8759 case 676: 8760 8761 /* Line 1806 of yacc.c */ 8762 #line 2601 "parser.yy" 8763 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8764 break; 8765 8766 case 677: 8767 8768 /* Line 1806 of yacc.c */ 8769 #line 2603 "parser.yy" 8770 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8771 break; 8772 8773 case 678: 8774 8775 /* Line 1806 of yacc.c */ 8776 #line 2605 "parser.yy" 8777 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8778 break; 8779 8771 8780 case 679: 8772 8781 8773 8782 /* Line 1806 of yacc.c */ 8774 #line 26 00 "parser.yy"8783 #line 2610 "parser.yy" 8775 8784 { (yyval.decl) = DeclarationNode::newFunction( 0, 0, (yyvsp[(3) - (5)].decl), 0 ); } 8776 8785 break; … … 8779 8788 8780 8789 /* Line 1806 of yacc.c */ 8781 #line 26 02 "parser.yy"8790 #line 2612 "parser.yy" 8782 8791 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8783 8792 break; … … 8786 8795 8787 8796 /* Line 1806 of yacc.c */ 8788 #line 26 04 "parser.yy"8797 #line 2614 "parser.yy" 8789 8798 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8790 8799 break; … … 8793 8802 8794 8803 /* Line 1806 of yacc.c */ 8795 #line 26 11 "parser.yy"8804 #line 2621 "parser.yy" 8796 8805 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8797 8806 break; … … 8800 8809 8801 8810 /* Line 1806 of yacc.c */ 8802 #line 26 22 "parser.yy"8811 #line 2632 "parser.yy" 8803 8812 { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); } 8804 8813 break; … … 8807 8816 8808 8817 /* Line 1806 of yacc.c */ 8809 #line 26 25 "parser.yy"8818 #line 2635 "parser.yy" 8810 8819 { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); } 8811 8820 break; … … 8814 8823 8815 8824 /* Line 1806 of yacc.c */ 8816 #line 26 27 "parser.yy"8825 #line 2637 "parser.yy" 8817 8826 { (yyval.decl) = DeclarationNode::newArray( 0, (yyvsp[(3) - (5)].decl), false ); } 8818 8827 break; … … 8821 8830 8822 8831 /* Line 1806 of yacc.c */ 8823 #line 26 30 "parser.yy"8832 #line 2640 "parser.yy" 8824 8833 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); } 8825 8834 break; … … 8828 8837 8829 8838 /* Line 1806 of yacc.c */ 8830 #line 26 32 "parser.yy"8839 #line 2642 "parser.yy" 8831 8840 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl), true ); } 8832 8841 break; … … 8835 8844 8836 8845 /* Line 1806 of yacc.c */ 8837 #line 26 34 "parser.yy"8846 #line 2644 "parser.yy" 8838 8847 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(3) - (7)].decl), true ); } 8839 8848 break; … … 8842 8851 8843 8852 /* Line 1806 of yacc.c */ 8844 #line 26 48 "parser.yy"8853 #line 2658 "parser.yy" 8845 8854 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8846 8855 break; … … 8849 8858 8850 8859 /* Line 1806 of yacc.c */ 8851 #line 26 50 "parser.yy"8860 #line 2660 "parser.yy" 8852 8861 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8853 8862 break; … … 8856 8865 8857 8866 /* Line 1806 of yacc.c */ 8858 #line 26 55 "parser.yy"8867 #line 2665 "parser.yy" 8859 8868 { (yyval.decl) = DeclarationNode::newPointer( 0 ); } 8860 8869 break; … … 8863 8872 8864 8873 /* Line 1806 of yacc.c */ 8865 #line 26 57 "parser.yy"8874 #line 2667 "parser.yy" 8866 8875 { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); } 8867 8876 break; … … 8870 8879 8871 8880 /* Line 1806 of yacc.c */ 8872 #line 26 59 "parser.yy"8881 #line 2669 "parser.yy" 8873 8882 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8874 8883 break; … … 8877 8886 8878 8887 /* Line 1806 of yacc.c */ 8879 #line 26 61 "parser.yy"8888 #line 2671 "parser.yy" 8880 8889 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8881 8890 break; 8882 8891 8883 8892 case 698: 8884 8885 /* Line 1806 of yacc.c */8886 #line 2663 "parser.yy"8887 { (yyval.decl) = (yyvsp[(2) - (3)].decl); }8888 break;8889 8890 case 700:8891 8892 /* Line 1806 of yacc.c */8893 #line 2669 "parser.yy"8894 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }8895 break;8896 8897 case 701:8898 8899 /* Line 1806 of yacc.c */8900 #line 2671 "parser.yy"8901 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }8902 break;8903 8904 case 702:8905 8893 8906 8894 /* Line 1806 of yacc.c */ … … 8909 8897 break; 8910 8898 8899 case 700: 8900 8901 /* Line 1806 of yacc.c */ 8902 #line 2679 "parser.yy" 8903 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8904 break; 8905 8906 case 701: 8907 8908 /* Line 1806 of yacc.c */ 8909 #line 2681 "parser.yy" 8910 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8911 break; 8912 8913 case 702: 8914 8915 /* Line 1806 of yacc.c */ 8916 #line 2683 "parser.yy" 8917 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8918 break; 8919 8911 8920 case 703: 8912 8921 8913 8922 /* Line 1806 of yacc.c */ 8914 #line 26 78 "parser.yy"8923 #line 2688 "parser.yy" 8915 8924 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8916 8925 break; … … 8919 8928 8920 8929 /* Line 1806 of yacc.c */ 8921 #line 26 80 "parser.yy"8930 #line 2690 "parser.yy" 8922 8931 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8923 8932 break; … … 8926 8935 8927 8936 /* Line 1806 of yacc.c */ 8928 #line 2 690 "parser.yy"8937 #line 2700 "parser.yy" 8929 8938 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 8930 8939 break; … … 8933 8942 8934 8943 /* Line 1806 of yacc.c */ 8935 #line 27 00 "parser.yy"8944 #line 2710 "parser.yy" 8936 8945 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 8937 8946 break; … … 8940 8949 8941 8950 /* Line 1806 of yacc.c */ 8942 #line 27 02 "parser.yy"8951 #line 2712 "parser.yy" 8943 8952 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 8944 8953 break; … … 8947 8956 8948 8957 /* Line 1806 of yacc.c */ 8949 #line 27 04 "parser.yy"8958 #line 2714 "parser.yy" 8950 8959 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 8951 8960 break; … … 8954 8963 8955 8964 /* Line 1806 of yacc.c */ 8956 #line 27 06 "parser.yy"8965 #line 2716 "parser.yy" 8957 8966 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 8958 8967 break; … … 8961 8970 8962 8971 /* Line 1806 of yacc.c */ 8963 #line 27 08 "parser.yy"8972 #line 2718 "parser.yy" 8964 8973 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 8965 8974 break; … … 8968 8977 8969 8978 /* Line 1806 of yacc.c */ 8970 #line 27 10 "parser.yy"8979 #line 2720 "parser.yy" 8971 8980 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 8972 8981 break; 8973 8982 8974 8983 case 716: 8975 8976 /* Line 1806 of yacc.c */8977 #line 2717 "parser.yy"8978 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }8979 break;8980 8981 case 717:8982 8983 /* Line 1806 of yacc.c */8984 #line 2719 "parser.yy"8985 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }8986 break;8987 8988 case 718:8989 8990 /* Line 1806 of yacc.c */8991 #line 2721 "parser.yy"8992 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }8993 break;8994 8995 case 719:8996 8997 /* Line 1806 of yacc.c */8998 #line 2723 "parser.yy"8999 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); }9000 break;9001 9002 case 720:9003 9004 /* Line 1806 of yacc.c */9005 #line 2725 "parser.yy"9006 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }9007 break;9008 9009 case 721:9010 8984 9011 8985 /* Line 1806 of yacc.c */ … … 9014 8988 break; 9015 8989 9016 case 7 22:8990 case 717: 9017 8991 9018 8992 /* Line 1806 of yacc.c */ … … 9021 8995 break; 9022 8996 9023 case 7 23:8997 case 718: 9024 8998 9025 8999 /* Line 1806 of yacc.c */ … … 9028 9002 break; 9029 9003 9030 case 7 24:9004 case 719: 9031 9005 9032 9006 /* Line 1806 of yacc.c */ … … 9035 9009 break; 9036 9010 9037 case 72 5:9011 case 720: 9038 9012 9039 9013 /* Line 1806 of yacc.c */ … … 9042 9016 break; 9043 9017 9018 case 721: 9019 9020 /* Line 1806 of yacc.c */ 9021 #line 2737 "parser.yy" 9022 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9023 break; 9024 9025 case 722: 9026 9027 /* Line 1806 of yacc.c */ 9028 #line 2739 "parser.yy" 9029 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9030 break; 9031 9032 case 723: 9033 9034 /* Line 1806 of yacc.c */ 9035 #line 2741 "parser.yy" 9036 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9037 break; 9038 9039 case 724: 9040 9041 /* Line 1806 of yacc.c */ 9042 #line 2743 "parser.yy" 9043 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); } 9044 break; 9045 9046 case 725: 9047 9048 /* Line 1806 of yacc.c */ 9049 #line 2745 "parser.yy" 9050 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9051 break; 9052 9044 9053 case 726: 9045 9054 9046 9055 /* Line 1806 of yacc.c */ 9047 #line 27 40 "parser.yy"9056 #line 2750 "parser.yy" 9048 9057 { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); } 9049 9058 break; … … 9052 9061 9053 9062 /* Line 1806 of yacc.c */ 9054 #line 27 42 "parser.yy"9063 #line 2752 "parser.yy" 9055 9064 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); } 9056 9065 break; … … 9059 9068 9060 9069 /* Line 1806 of yacc.c */ 9061 #line 27 47 "parser.yy"9070 #line 2757 "parser.yy" 9062 9071 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), true ); } 9063 9072 break; … … 9066 9075 9067 9076 /* Line 1806 of yacc.c */ 9068 #line 27 49 "parser.yy"9077 #line 2759 "parser.yy" 9069 9078 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl)->addQualifiers( (yyvsp[(3) - (7)].decl) ), true ); } 9070 9079 break; … … 9073 9082 9074 9083 /* Line 1806 of yacc.c */ 9075 #line 27 76 "parser.yy"9084 #line 2786 "parser.yy" 9076 9085 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 9077 9086 break; … … 9080 9089 9081 9090 /* Line 1806 of yacc.c */ 9082 #line 27 87 "parser.yy"9091 #line 2797 "parser.yy" 9083 9092 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9084 9093 break; … … 9087 9096 9088 9097 /* Line 1806 of yacc.c */ 9089 #line 27 89 "parser.yy"9098 #line 2799 "parser.yy" 9090 9099 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9091 9100 break; … … 9094 9103 9095 9104 /* Line 1806 of yacc.c */ 9096 #line 2 791 "parser.yy"9105 #line 2801 "parser.yy" 9097 9106 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9098 9107 break; … … 9101 9110 9102 9111 /* Line 1806 of yacc.c */ 9103 #line 2 793 "parser.yy"9112 #line 2803 "parser.yy" 9104 9113 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9105 9114 break; … … 9108 9117 9109 9118 /* Line 1806 of yacc.c */ 9110 #line 2 795 "parser.yy"9119 #line 2805 "parser.yy" 9111 9120 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9112 9121 break; … … 9115 9124 9116 9125 /* Line 1806 of yacc.c */ 9117 #line 2 797 "parser.yy"9126 #line 2807 "parser.yy" 9118 9127 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9119 9128 break; … … 9122 9131 9123 9132 /* Line 1806 of yacc.c */ 9124 #line 28 04 "parser.yy"9133 #line 2814 "parser.yy" 9125 9134 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9126 9135 break; … … 9129 9138 9130 9139 /* Line 1806 of yacc.c */ 9131 #line 28 06 "parser.yy"9140 #line 2816 "parser.yy" 9132 9141 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9133 9142 break; … … 9136 9145 9137 9146 /* Line 1806 of yacc.c */ 9138 #line 28 08 "parser.yy"9147 #line 2818 "parser.yy" 9139 9148 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9140 9149 break; … … 9143 9152 9144 9153 /* Line 1806 of yacc.c */ 9145 #line 28 10 "parser.yy"9154 #line 2820 "parser.yy" 9146 9155 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9147 9156 break; … … 9150 9159 9151 9160 /* Line 1806 of yacc.c */ 9152 #line 28 12 "parser.yy"9161 #line 2822 "parser.yy" 9153 9162 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9154 9163 break; … … 9157 9166 9158 9167 /* Line 1806 of yacc.c */ 9159 #line 28 14 "parser.yy"9168 #line 2824 "parser.yy" 9160 9169 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9161 9170 break; … … 9164 9173 9165 9174 /* Line 1806 of yacc.c */ 9166 #line 28 19 "parser.yy"9175 #line 2829 "parser.yy" 9167 9176 { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (5)].decl) ); } 9168 9177 break; … … 9171 9180 9172 9181 /* Line 1806 of yacc.c */ 9173 #line 28 24 "parser.yy"9182 #line 2834 "parser.yy" 9174 9183 { (yyval.decl) = DeclarationNode::newFunction( 0, DeclarationNode::newTuple( 0 ), (yyvsp[(4) - (5)].decl), 0 ); } 9175 9184 break; … … 9178 9187 9179 9188 /* Line 1806 of yacc.c */ 9180 #line 28 26 "parser.yy"9189 #line 2836 "parser.yy" 9181 9190 { (yyval.decl) = DeclarationNode::newFunction( 0, (yyvsp[(1) - (6)].decl), (yyvsp[(4) - (6)].decl), 0 ); } 9182 9191 break; … … 9185 9194 9186 9195 /* Line 1806 of yacc.c */ 9187 #line 28 28 "parser.yy"9196 #line 2838 "parser.yy" 9188 9197 { (yyval.decl) = DeclarationNode::newFunction( 0, (yyvsp[(1) - (6)].decl), (yyvsp[(4) - (6)].decl), 0 ); } 9189 9198 break; … … 9192 9201 9193 9202 /* Line 1806 of yacc.c */ 9194 #line 28 52 "parser.yy"9203 #line 2862 "parser.yy" 9195 9204 { (yyval.en) = 0; } 9196 9205 break; … … 9199 9208 9200 9209 /* Line 1806 of yacc.c */ 9201 #line 28 54 "parser.yy"9210 #line 2864 "parser.yy" 9202 9211 { (yyval.en) = (yyvsp[(2) - (2)].en); } 9203 9212 break; … … 9206 9215 9207 9216 /* Line 1806 of yacc.c */ 9208 #line 92 09"Parser/parser.cc"9217 #line 9218 "Parser/parser.cc" 9209 9218 default: break; 9210 9219 } … … 9437 9446 9438 9447 /* Line 2067 of yacc.c */ 9439 #line 28 57 "parser.yy"9448 #line 2867 "parser.yy" 9440 9449 9441 9450 // ----end of grammar---- -
src/Parser/parser.h
r35f9114 r7bf7fb9 262 262 263 263 /* Line 2068 of yacc.c */ 264 #line 11 0"parser.yy"264 #line 115 "parser.yy" 265 265 266 266 Token tok; -
src/Parser/parser.yy
r35f9114 r7bf7fb9 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Aug 5 15:06:44201613 // Update Count : 17 5612 // Last Modified On : Sun Aug 7 09:37:48 2016 13 // Update Count : 1764 14 14 // 15 15 … … 60 60 std::stack< LinkageSpec::Type > linkageStack; 61 61 TypedefTable typedefTable; 62 63 void appendStr( std::string &to, std::string *from ) { 64 // "abc" "def" "ghi" => "abcdefghi", remove new text from quotes and insert before last quote in old string. 65 to.insert( to.length() - 1, from->substr( 1, from->length() - 2 ) ); 66 } // appendStr 62 67 %} 63 68 … … 304 309 constant: 305 310 // ENUMERATIONconstant is not included here; it is treated as a variable with type "enumeration constant". 306 INTEGERconstant { $$ = makeConstantInteger( *$1 ); }307 | FLOATINGconstant { $$ = makeConstantFloat( *$1 ); }308 | CHARACTERconstant { $$ = makeConstantChar( *$1 ); }311 INTEGERconstant { $$ = build_constantInteger( *$1 ); } 312 | FLOATINGconstant { $$ = build_constantFloat( *$1 ); } 313 | CHARACTERconstant { $$ = build_constantChar( *$1 ); } 309 314 ; 310 315 … … 331 336 332 337 string_literal_list: // juxtaposed strings are concatenated 333 STRINGliteral { $$ = makeConstantStr( *$1 ); } 334 | string_literal_list STRINGliteral { $$ = $1->appendstr( $2 ); } 338 STRINGliteral { $$ = build_constantStr( *$1 ); } 339 | string_literal_list STRINGliteral 340 { 341 appendStr( $1->get_expr()->get_constant()->get_value(), $2 ); 342 delete $2; // allocated by lexer 343 $$ = $1; 344 } 335 345 ; 336 346 -
src/SynTree/Expression.h
r35f9114 r7bf7fb9 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Aug 5 14:23:58201613 // Update Count : 3 212 // Last Modified On : Sat Aug 6 08:52:53 2016 13 // Update Count : 35 14 14 // 15 15 … … 28 28 class Expression { 29 29 public: 30 Expression( Expression *_aname = 0);30 Expression( Expression *_aname = nullptr ); 31 31 Expression( const Expression &other ); 32 32 virtual ~Expression(); … … 98 98 class UntypedExpr : public Expression { 99 99 public: 100 UntypedExpr( Expression *function, Expression *_aname = 0);100 UntypedExpr( Expression *function, Expression *_aname = nullptr ); 101 101 UntypedExpr( const UntypedExpr &other ); 102 UntypedExpr( Expression *function, std::list<Expression *> &args, Expression *_aname = 0);102 UntypedExpr( Expression *function, std::list<Expression *> &args, Expression *_aname = nullptr ); 103 103 virtual ~UntypedExpr(); 104 104 … … 124 124 class NameExpr : public Expression { 125 125 public: 126 NameExpr( std::string name, Expression *_aname = 0);126 NameExpr( std::string name, Expression *_aname = nullptr ); 127 127 NameExpr( const NameExpr &other ); 128 128 virtual ~NameExpr(); … … 145 145 class AddressExpr : public Expression { 146 146 public: 147 AddressExpr( Expression *arg, Expression *_aname = 0);147 AddressExpr( Expression *arg, Expression *_aname = nullptr ); 148 148 AddressExpr( const AddressExpr &other ); 149 149 virtual ~AddressExpr(); … … 181 181 class CastExpr : public Expression { 182 182 public: 183 CastExpr( Expression *arg, Expression *_aname = 0);184 CastExpr( Expression *arg, Type *toType, Expression *_aname = 0);183 CastExpr( Expression *arg, Expression *_aname = nullptr ); 184 CastExpr( Expression *arg, Type *toType, Expression *_aname = nullptr ); 185 185 CastExpr( const CastExpr &other ); 186 186 virtual ~CastExpr(); … … 200 200 class UntypedMemberExpr : public Expression { 201 201 public: 202 UntypedMemberExpr( std::string member, Expression *aggregate, Expression *_aname = 0);202 UntypedMemberExpr( std::string member, Expression *aggregate, Expression *_aname = nullptr ); 203 203 UntypedMemberExpr( const UntypedMemberExpr &other ); 204 204 virtual ~UntypedMemberExpr(); … … 221 221 class MemberExpr : public Expression { 222 222 public: 223 MemberExpr( DeclarationWithType *member, Expression *aggregate, Expression *_aname = 0);223 MemberExpr( DeclarationWithType *member, Expression *aggregate, Expression *_aname = nullptr ); 224 224 MemberExpr( const MemberExpr &other ); 225 225 virtual ~MemberExpr(); … … 242 242 class VariableExpr : public Expression { 243 243 public: 244 VariableExpr( DeclarationWithType *var, Expression *_aname = 0);244 VariableExpr( DeclarationWithType *var, Expression *_aname = nullptr ); 245 245 VariableExpr( const VariableExpr &other ); 246 246 virtual ~VariableExpr(); … … 260 260 class ConstantExpr : public Expression { 261 261 public: 262 ConstantExpr( Constant constant, Expression *_aname = 0);262 ConstantExpr( Constant constant, Expression *_aname = nullptr ); 263 263 ConstantExpr( const ConstantExpr &other ); 264 264 virtual ~ConstantExpr(); … … 278 278 class SizeofExpr : public Expression { 279 279 public: 280 SizeofExpr( Expression *expr, Expression *_aname = 0);280 SizeofExpr( Expression *expr, Expression *_aname = nullptr ); 281 281 SizeofExpr( const SizeofExpr &other ); 282 SizeofExpr( Type *type, Expression *_aname = 0);282 SizeofExpr( Type *type, Expression *_aname = nullptr ); 283 283 virtual ~SizeofExpr(); 284 284 … … 303 303 class AlignofExpr : public Expression { 304 304 public: 305 AlignofExpr( Expression *expr, Expression *_aname = 0);305 AlignofExpr( Expression *expr, Expression *_aname = nullptr ); 306 306 AlignofExpr( const AlignofExpr &other ); 307 AlignofExpr( Type *type, Expression *_aname = 0);307 AlignofExpr( Type *type, Expression *_aname = nullptr ); 308 308 virtual ~AlignofExpr(); 309 309 … … 328 328 class UntypedOffsetofExpr : public Expression { 329 329 public: 330 UntypedOffsetofExpr( Type *type, const std::string &member, Expression *_aname = 0);330 UntypedOffsetofExpr( Type *type, const std::string &member, Expression *_aname = nullptr ); 331 331 UntypedOffsetofExpr( const UntypedOffsetofExpr &other ); 332 332 virtual ~UntypedOffsetofExpr(); … … 349 349 class OffsetofExpr : public Expression { 350 350 public: 351 OffsetofExpr( Type *type, DeclarationWithType *member, Expression *_aname = 0);351 OffsetofExpr( Type *type, DeclarationWithType *member, Expression *_aname = nullptr ); 352 352 OffsetofExpr( const OffsetofExpr &other ); 353 353 virtual ~OffsetofExpr(); … … 390 390 class AttrExpr : public Expression { 391 391 public: 392 AttrExpr(Expression *attr, Expression *expr, Expression *_aname = 0);392 AttrExpr(Expression *attr, Expression *expr, Expression *_aname = nullptr ); 393 393 AttrExpr( const AttrExpr &other ); 394 AttrExpr( Expression *attr, Type *type, Expression *_aname = 0);394 AttrExpr( Expression *attr, Type *type, Expression *_aname = nullptr ); 395 395 virtual ~AttrExpr(); 396 396 … … 418 418 class LogicalExpr : public Expression { 419 419 public: 420 LogicalExpr( Expression *arg1, Expression *arg2, bool andp = true, Expression *_aname = 0);420 LogicalExpr( Expression *arg1, Expression *arg2, bool andp = true, Expression *_aname = nullptr ); 421 421 LogicalExpr( const LogicalExpr &other ); 422 422 virtual ~LogicalExpr(); … … 441 441 class ConditionalExpr : public Expression { 442 442 public: 443 ConditionalExpr( Expression *arg1, Expression *arg2, Expression *arg3, Expression *_aname = 0);443 ConditionalExpr( Expression *arg1, Expression *arg2, Expression *arg3, Expression *_aname = nullptr ); 444 444 ConditionalExpr( const ConditionalExpr &other ); 445 445 virtual ~ConditionalExpr(); … … 465 465 class CommaExpr : public Expression { 466 466 public: 467 CommaExpr( Expression *arg1, Expression *arg2, Expression *_aname = 0);467 CommaExpr( Expression *arg1, Expression *arg2, Expression *_aname = nullptr ); 468 468 CommaExpr( const CommaExpr &other ); 469 469 virtual ~CommaExpr(); … … 486 486 class TupleExpr : public Expression { 487 487 public: 488 TupleExpr( Expression *_aname = 0);488 TupleExpr( Expression *_aname = nullptr ); 489 489 TupleExpr( const TupleExpr &other ); 490 490 virtual ~TupleExpr(); … … 504 504 class SolvedTupleExpr : public Expression { 505 505 public: 506 SolvedTupleExpr( Expression *_aname = 0) : Expression( _aname ) {}507 SolvedTupleExpr( std::list<Expression *> &, Expression *_aname = 0);506 SolvedTupleExpr( Expression *_aname = nullptr ) : Expression( _aname ) {} 507 SolvedTupleExpr( std::list<Expression *> &, Expression *_aname = nullptr ); 508 508 SolvedTupleExpr( const SolvedTupleExpr &other ); 509 509 virtual ~SolvedTupleExpr() {} … … 598 598 class UntypedValofExpr : public Expression { 599 599 public: 600 UntypedValofExpr( Statement *_body, Expression *_aname = 0) : Expression( _aname ), body ( _body ) {}600 UntypedValofExpr( Statement *_body, Expression *_aname = nullptr ) : Expression( _aname ), body ( _body ) {} 601 601 UntypedValofExpr( const UntypedValofExpr & other ); 602 602 virtual ~UntypedValofExpr();
Note: See TracChangeset
for help on using the changeset viewer.