Changeset 1f652a7 for src/Parser
- Timestamp:
- Apr 1, 2021, 4:17:56 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 3bd2464
- Parents:
- ca33b15
- Location:
- src/Parser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/lex.ll
rca33b15 r1f652a7 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Wed Feb 17 08:38:13202113 * Update Count : 75 212 * Last Modified On : Thu Apr 1 13:22:31 2021 13 * Update Count : 754 14 14 */ 15 15 … … 318 318 __typeof { KEYWORD_RETURN(TYPEOF); } // GCC 319 319 __typeof__ { KEYWORD_RETURN(TYPEOF); } // GCC 320 typeid { KEYWORD_RETURN(TYPEID); } // GCC 320 321 union { KEYWORD_RETURN(UNION); } 321 322 __uint128_t { KEYWORD_RETURN(UINT128); } // GCC … … 327 328 __volatile { KEYWORD_RETURN(VOLATILE); } // GCC 328 329 __volatile__ { KEYWORD_RETURN(VOLATILE); } // GCC 330 vtable { KEYWORD_RETURN(VTABLE); } // CFA 329 331 waitfor { KEYWORD_RETURN(WAITFOR); } // CFA 330 332 when { KEYWORD_RETURN(WHEN); } // CFA -
src/Parser/parser.yy
rca33b15 r1f652a7 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 Mar 30 18:39:23202113 // Update Count : 49 6512 // Last Modified On : Thu Apr 1 14:43:24 2021 13 // Update Count : 4978 14 14 // 15 15 … … 264 264 %token RESTRICT // C99 265 265 %token ATOMIC // C11 266 %token FORALL MUTEX VIRTUAL COERCE// CFA266 %token FORALL MUTEX VIRTUAL VTABLE COERCE // CFA 267 267 %token VOID CHAR SHORT INT LONG FLOAT DOUBLE SIGNED UNSIGNED 268 268 %token BOOL COMPLEX IMAGINARY // C99 … … 270 270 %token uFLOAT16 uFLOAT32 uFLOAT32X uFLOAT64 uFLOAT64X uFLOAT128 // GCC 271 271 %token ZERO_T ONE_T // CFA 272 %token VALIST // GCC 273 %token AUTO_TYPE // GCC 274 %token TYPEOF BASETYPEOF LABEL // GCC 272 %token SIZEOF TYPEOF VALIST AUTO_TYPE // GCC 273 %token OFFSETOF BASETYPEOF TYPEID // CFA 275 274 %token ENUM STRUCT UNION 276 275 %token EXCEPTION // CFA 277 276 %token GENERATOR COROUTINE MONITOR THREAD // CFA 278 277 %token OTYPE FTYPE DTYPE TTYPE TRAIT // CFA 279 %token SIZEOF OFFSETOF280 278 // %token RESUME // CFA 279 %token LABEL // GCC 281 280 %token SUSPEND // CFA 282 281 %token ATTRIBUTE EXTENSION // GCC … … 373 372 374 373 %type<decl> basic_declaration_specifier basic_type_name basic_type_specifier direct_type indirect_type 374 %type<decl> vtable vtable_opt default_opt 375 375 376 376 %type<decl> trait_declaration trait_declaration_list trait_declaring_list trait_specifier … … 785 785 | OFFSETOF '(' type_no_function ',' identifier ')' 786 786 { $$ = new ExpressionNode( build_offsetOf( $3, build_varref( $5 ) ) ); } 787 | TYPEID '(' type_no_function ')' 788 { 789 SemanticError( yylloc, "typeid name is currently unimplemented." ); $$ = nullptr; 790 // $$ = new ExpressionNode( build_offsetOf( $3, build_varref( $5 ) ) ); 791 } 787 792 ; 788 793 … … 1895 1900 | AUTO_TYPE 1896 1901 { $$ = DeclarationNode::newBuiltinType( DeclarationNode::AutoType ); } 1902 | vtable 1903 ; 1904 1905 vtable_opt: 1906 // empty 1907 { $$ = nullptr; } 1908 | vtable; 1909 ; 1910 1911 vtable: 1912 VTABLE '(' type_list ')' default_opt 1913 { SemanticError( yylloc, "vtable is currently unimplemented." ); $$ = nullptr; } 1914 ; 1915 1916 default_opt: 1917 // empty 1918 { $$ = nullptr; } 1919 | DEFAULT 1920 { SemanticError( yylloc, "vtable default is currently unimplemented." ); $$ = nullptr; } 1897 1921 ; 1898 1922 … … 2102 2126 2103 2127 aggregate_data: 2104 STRUCT 2128 STRUCT vtable_opt 2105 2129 { yyy = true; $$ = AggregateDecl::Struct; } 2106 2130 | UNION 2107 2131 { yyy = true; $$ = AggregateDecl::Union; } 2108 2132 | EXCEPTION // CFA 2109 //{ yyy = true; $$ = AggregateDecl::Exception; }2110 { SemanticError( yylloc, "exception aggregate is currently unimplemented." ); $$ = AggregateDecl::NoAggregate; }2133 { yyy = true; $$ = AggregateDecl::Exception; } 2134 // { SemanticError( yylloc, "exception aggregate is currently unimplemented." ); $$ = AggregateDecl::NoAggregate; } 2111 2135 ; 2112 2136
Note: See TracChangeset
for help on using the changeset viewer.