Changeset c5f69fd for src/Parser
- Timestamp:
- Sep 13, 2024, 8:25:49 AM (2 months ago)
- Branches:
- master
- Children:
- 2ac78a1
- Parents:
- 2b5e051
- Location:
- src/Parser
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.cpp
r2b5e051 rc5f69fd 10 10 // Created On : Sat May 16 15:12:51 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Feb 23 08:58:30202413 // Update Count : 73 412 // Last Modified On : Thu Sep 12 22:43:59 2024 13 // Update Count : 735 14 14 // 15 15 … … 1158 1158 case TypeData::Double: 1159 1159 case TypeData::LongDouble: // not set until below 1160 case TypeData:: uuFloat80:1160 case TypeData::Float80: 1161 1161 case TypeData::uuFloat128: 1162 case TypeData:: uFloat16:1163 case TypeData:: uFloat32:1164 case TypeData:: uFloat32x:1165 case TypeData:: uFloat64:1166 case TypeData:: uFloat64x:1167 case TypeData:: uFloat128:1168 case TypeData:: uFloat128x:1162 case TypeData::Float16: 1163 case TypeData::Float32: 1164 case TypeData::Float32x: 1165 case TypeData::Float64: 1166 case TypeData::Float64x: 1167 case TypeData::Float128: 1168 case TypeData::Float128x: 1169 1169 static ast::BasicKind floattype[2][12] = { 1170 { ast::BasicKind::FloatComplex, ast::BasicKind::DoubleComplex, ast::BasicKind::LongDoubleComplex, (ast::BasicKind)-1, (ast::BasicKind)-1, ast::BasicKind:: uFloat16Complex, ast::BasicKind::uFloat32Complex, ast::BasicKind::uFloat32xComplex, ast::BasicKind::uFloat64Complex, ast::BasicKind::uFloat64xComplex, ast::BasicKind::uFloat128Complex, ast::BasicKind::uFloat128xComplex, },1171 { ast::BasicKind::Float, ast::BasicKind::Double, ast::BasicKind::LongDouble, ast::BasicKind:: uuFloat80, ast::BasicKind::uuFloat128, ast::BasicKind::uFloat16, ast::BasicKind::uFloat32, ast::BasicKind::uFloat32x, ast::BasicKind::uFloat64, ast::BasicKind::uFloat64x, ast::BasicKind::uFloat128, ast::BasicKind::uFloat128x, },1170 { ast::BasicKind::FloatComplex, ast::BasicKind::DoubleComplex, ast::BasicKind::LongDoubleComplex, (ast::BasicKind)-1, (ast::BasicKind)-1, ast::BasicKind::Float16Complex, ast::BasicKind::Float32Complex, ast::BasicKind::Float32xComplex, ast::BasicKind::Float64Complex, ast::BasicKind::Float64xComplex, ast::BasicKind::Float128Complex, ast::BasicKind::Float128xComplex, }, 1171 { ast::BasicKind::Float, ast::BasicKind::Double, ast::BasicKind::LongDouble, ast::BasicKind::Float80, ast::BasicKind::uuFloat128, ast::BasicKind::Float16, ast::BasicKind::Float32, ast::BasicKind::Float32x, ast::BasicKind::Float64, ast::BasicKind::Float64x, ast::BasicKind::Float128, ast::BasicKind::Float128x, }, 1172 1172 }; 1173 1173 … … 1185 1185 genTSError( TypeData::complexTypeNames[ td->complextype ], td->basictype ); 1186 1186 } // if 1187 if ( (td->basictype == TypeData:: uuFloat80 || td->basictype == TypeData::uuFloat128) && td->complextype == TypeData::Complex ) { // gcc unsupported1187 if ( (td->basictype == TypeData::Float80 || td->basictype == TypeData::uuFloat128) && td->complextype == TypeData::Complex ) { // gcc unsupported 1188 1188 genTSError( TypeData::complexTypeNames[ td->complextype ], td->basictype ); 1189 1189 } // if … … 1205 1205 const_cast<TypeData *>(td)->basictype = TypeData::Int; 1206 1206 goto Integral; 1207 1208 case TypeData::Float32x4: case TypeData::Float64x2: case TypeData::Svfloat32: case TypeData:: Svfloat64: case TypeData::Svbool: 1209 return nullptr; 1207 1210 default: 1208 1211 assertf( false, "unknown basic type" ); … … 1477 1480 ast::Expr * initValue; 1478 1481 if ( ret->isCfa && ret->base ) { 1479 CodeLocation location = cur->enumeratorValue->location;1480 initValue = new ast::CastExpr( location, maybeMoveBuild( cur->consume_enumeratorValue() ),ret->base );1482 initValue = new ast::CastExpr( cur->enumeratorValue->location, maybeMoveBuild( cur->consume_enumeratorValue() ), 1483 ret->base ); 1481 1484 } else { 1482 1485 initValue = maybeMoveBuild( cur->consume_enumeratorValue() ); -
src/Parser/TypeData.hpp
r2b5e051 rc5f69fd 10 10 // Created On : Sat May 16 15:18:36 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 22 16:30:31 202413 // Update Count : 21 012 // Last Modified On : Fri Sep 13 08:13:01 2024 13 // Update Count : 216 14 14 // 15 15 … … 28 28 enum BasicType { 29 29 Void, Bool, Char, Int, Int128, 30 Float, Double, LongDouble, uuFloat80, uuFloat128, 31 uFloat16, uFloat32, uFloat32x, uFloat64, uFloat64x, uFloat128, uFloat128x, 32 NoBasicType 30 Float, Double, LongDouble, Float80, uuFloat128, 31 Float16, Float32, Float32x, Float64, Float64x, Float128, Float128x, 32 NoBasicType, 33 Float32x4, Float64x2, Svfloat32, Svfloat64, Svbool, 33 34 }; 34 35 static const char * basicTypeNames[]; -
src/Parser/lex.ll
r2b5e051 rc5f69fd 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Thu Jun 27 14:38:27202413 * Update Count : 7 8012 * Last Modified On : Wed Sep 11 17:16:23 2024 13 * Update Count : 791 14 14 */ 15 15 … … 234 234 basetypeof { KEYWORD_RETURN(BASETYPEOF); } // CFA 235 235 _Bool { KEYWORD_RETURN(BOOL); } // C99 236 __SVBool_t { KEYWORD_RETURN(SVBOOL); } // gcc (ARM) 236 237 break { KEYWORD_RETURN(BREAK); } 237 238 case { KEYWORD_RETURN(CASE); } … … 270 271 fixup { QKEYWORD_RETURN(FIXUP); } // CFA 271 272 float { KEYWORD_RETURN(FLOAT); } 272 __float80 { KEYWORD_RETURN( uuFLOAT80); } // GCC273 float80 { KEYWORD_RETURN( uuFLOAT80); } // GCC273 __float80 { KEYWORD_RETURN(FLOAT80); } // GCC 274 float80 { KEYWORD_RETURN(FLOAT80); } // GCC 274 275 __float128 { KEYWORD_RETURN(uuFLOAT128); } // GCC 275 276 float128 { KEYWORD_RETURN(uuFLOAT128); } // GCC 276 _Float16 { FLOATXX(uFLOAT16); } // GCC 277 _Float32 { FLOATXX(uFLOAT32); } // GCC 278 _Float32x { FLOATXX(uFLOAT32X); } // GCC 279 _Float64 { FLOATXX(uFLOAT64); } // GCC 280 _Float64x { FLOATXX(uFLOAT64X); } // GCC 281 _Float128 { FLOATXX(uFLOAT128); } // GCC 282 _Float128x { FLOATXX(uFLOAT128); } // GCC 277 _Float16 { FLOATXX(FLOAT16); } // GCC 278 _Float32 { FLOATXX(FLOAT32); } // GCC 279 _Float32x { FLOATXX(FLOAT32X); } // GCC 280 _Float64 { FLOATXX(FLOAT64); } // GCC 281 _Float64x { FLOATXX(FLOAT64X); } // GCC 282 _Float128 { FLOATXX(FLOAT128); } // GCC 283 _Float128x { FLOATXX(FLOAT128X); } // GCC 284 __Float32x4_t { FLOATXX(FLOAT32X4); } // GCC (ARM) 285 __Float64x2_t { FLOATXX(FLOAT64X2); } // GCC (ARM) 286 __SVFloat32_t { FLOATXX(SVFLOAT32); } // GCC (ARM) 287 __SVFloat64_t { FLOATXX(SVFLOAT64); } // GCC (ARM) 283 288 for { KEYWORD_RETURN(FOR); } 284 289 forall { KEYWORD_RETURN(FORALL); } // CFA -
src/Parser/parser.yy
r2b5e051 rc5f69fd 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Aug 13 11:25:16202413 // Update Count : 674 012 // Last Modified On : Thu Sep 12 22:48:32 2024 13 // Update Count : 6741 14 14 // 15 15 … … 366 366 %token VOID CHAR SHORT INT LONG FLOAT DOUBLE SIGNED UNSIGNED 367 367 %token BOOL COMPLEX IMAGINARY // C99 368 %token INT128 UINT128 uuFLOAT80 uuFLOAT128 // GCC 369 %token uFLOAT16 uFLOAT32 uFLOAT32X uFLOAT64 uFLOAT64X uFLOAT128 // GCC 368 %token INT128 UINT128 FLOAT80 uuFLOAT128 // GCC 369 %token FLOAT16 FLOAT32 FLOAT32X FLOAT64 FLOAT64X FLOAT128 FLOAT128X // GCC 370 %token FLOAT32X4 FLOAT64X2 SVFLOAT32 SVFLOAT64 SVBOOL // GCC (ARM) 370 371 %token DECIMAL32 DECIMAL64 DECIMAL128 // GCC 371 372 %token ZERO_T ONE_T // CFA … … 2364 2365 | DOUBLE 2365 2366 { $$ = build_basic_type( TypeData::Double ); } 2366 | uuFLOAT802367 { $$ = build_basic_type( TypeData:: uuFloat80 ); }2367 | FLOAT80 2368 { $$ = build_basic_type( TypeData::Float80 ); } 2368 2369 | uuFLOAT128 2369 2370 { $$ = build_basic_type( TypeData::uuFloat128 ); } 2370 | uFLOAT16 2371 { $$ = build_basic_type( TypeData::uFloat16 ); } 2372 | uFLOAT32 2373 { $$ = build_basic_type( TypeData::uFloat32 ); } 2374 | uFLOAT32X 2375 { $$ = build_basic_type( TypeData::uFloat32x ); } 2376 | uFLOAT64 2377 { $$ = build_basic_type( TypeData::uFloat64 ); } 2378 | uFLOAT64X 2379 { $$ = build_basic_type( TypeData::uFloat64x ); } 2380 | uFLOAT128 2381 { $$ = build_basic_type( TypeData::uFloat128 ); } 2371 | FLOAT16 2372 { $$ = build_basic_type( TypeData::Float16 ); } 2373 | FLOAT32 2374 { $$ = build_basic_type( TypeData::Float32 ); } 2375 | FLOAT32X 2376 { $$ = build_basic_type( TypeData::Float32x ); } 2377 | FLOAT64 2378 { $$ = build_basic_type( TypeData::Float64 ); } 2379 | FLOAT64X 2380 { $$ = build_basic_type( TypeData::Float64x ); } 2381 | FLOAT128 2382 { $$ = build_basic_type( TypeData::Float128 ); } 2383 | FLOAT128X 2384 { $$ = build_basic_type( TypeData::Float128x ); } 2385 | FLOAT32X4 2386 { $$ = build_basic_type( TypeData::Float32x4 ); } 2387 | FLOAT64X2 2388 { $$ = build_basic_type( TypeData::Float64x2 ); } 2389 | SVFLOAT32 2390 { $$ = build_basic_type( TypeData::Svfloat32 ); } 2391 | SVFLOAT64 2392 { $$ = build_basic_type( TypeData::Svfloat64 ); } 2393 | SVBOOL 2394 { $$ = build_basic_type( TypeData::Svbool ); } 2382 2395 | DECIMAL32 2383 2396 { SemanticError( yylloc, "_Decimal32 is currently unimplemented." ); $$ = nullptr; }
Note: See TracChangeset
for help on using the changeset viewer.