Changes in src/Parser/parser.yy [59c7e3e:1e30df7]
- File:
-
- 1 edited
-
src/Parser/parser.yy (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r59c7e3e r1e30df7 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Oct 14 14:04:43202213 // Update Count : 57 5112 // Last Modified On : Sat Oct 8 08:21:18 2022 13 // Update Count : 5709 14 14 // 15 15 … … 305 305 %token TYPEDEF 306 306 %token EXTERN STATIC AUTO REGISTER 307 %token THREADLOCALGCC THREADLOCALC11 // GCC, C11307 %token THREADLOCALGCC THREADLOCALC11 // GCC, C11 308 308 %token INLINE FORTRAN // C99, extension ISO/IEC 9899:1999 Section J.5.9(1) 309 309 %token NORETURN // C11 … … 318 318 %token DECIMAL32 DECIMAL64 DECIMAL128 // GCC 319 319 %token ZERO_T ONE_T // CFA 320 %token SIZEOF TYPEOF VA _LIST VA_ARG AUTO_TYPE// GCC320 %token SIZEOF TYPEOF VALIST AUTO_TYPE // GCC 321 321 %token OFFSETOF BASETYPEOF TYPEID // CFA 322 322 %token ENUM STRUCT UNION … … 409 409 // declarations 410 410 %type<decl> abstract_declarator abstract_ptr abstract_array abstract_function array_dimension multi_array_dimension 411 %type<decl> abstract_parameter_declarator _opt abstract_parameter_declaratorabstract_parameter_ptr abstract_parameter_array abstract_parameter_function array_parameter_dimension array_parameter_1st_dimension411 %type<decl> abstract_parameter_declarator abstract_parameter_ptr abstract_parameter_array abstract_parameter_function array_parameter_dimension array_parameter_1st_dimension 412 412 %type<decl> abstract_parameter_declaration 413 413 … … 698 698 primary_expression 699 699 | postfix_expression '[' assignment_expression ',' tuple_expression_list ']' 700 // Historic, transitional: Disallow commas in subscripts.701 // Switching to this behaviour may help check if a C compatibilty case uses comma-exprs in subscripts.702 // Current: Commas in subscripts make tuples.700 // Historic, transitional: Disallow commas in subscripts. 701 // Switching to this behaviour may help check if a C compatibilty case uses comma-exprs in subscripts. 702 // Current: Commas in subscripts make tuples. 703 703 { $$ = new ExpressionNode( build_binary_val( OperKinds::Index, $1, new ExpressionNode( build_tuple( (ExpressionNode *)($3->set_last( $5 ) ) )) ) ); } 704 704 | postfix_expression '[' assignment_expression ']' … … 720 720 | postfix_expression '(' argument_expression_list_opt ')' 721 721 { $$ = new ExpressionNode( build_func( $1, $3 ) ); } 722 | VA_ARG '(' primary_expression ',' declaration_specifier_nobody abstract_parameter_declarator_opt ')'723 // { SemanticError( yylloc, "va_arg is currently unimplemented." ); $$ = nullptr; }724 { $$ = new ExpressionNode( build_func( new ExpressionNode( build_varref( new string( "__builtin_va_arg") ) ),725 (ExpressionNode *)($3->set_last( (ExpressionNode *)($6 ? $6->addType( $5 ) : $5) )) ) ); }726 722 | postfix_expression '`' identifier // CFA, postfix call 727 723 { $$ = new ExpressionNode( build_func( new ExpressionNode( build_varref( build_postfix_name( $3 ) ) ), $1 ) ); } … … 2160 2156 | LONG 2161 2157 { $$ = DeclarationNode::newLength( DeclarationNode::Long ); } 2162 | VA _LIST // GCC, __builtin_va_list2158 | VALIST // GCC, __builtin_va_list 2163 2159 { $$ = DeclarationNode::newBuiltinType( DeclarationNode::Valist ); } 2164 2160 | AUTO_TYPE … … 2605 2601 { $$ = DeclarationNode::newEnumValueGeneric( $1, $2 ); } 2606 2602 | INLINE type_name 2607 { $$ = DeclarationNode::newEnum ValueGeneric( new string("inline"), nullptr); }2603 { $$ = DeclarationNode::newEnumInLine( *$2->type->symbolic.name ); } 2608 2604 | enumerator_list ',' identifier_or_type_name enumerator_value_opt 2609 2605 { $$ = $1->appendList( DeclarationNode::newEnumValueGeneric( $3, $4 ) ); } … … 3680 3676 // functions. 3681 3677 3682 abstract_parameter_declarator_opt:3683 // empty3684 { $$ = nullptr; }3685 | abstract_parameter_declarator3686 ;3687 3688 3678 abstract_parameter_declarator: 3689 3679 abstract_parameter_ptr
Note:
See TracChangeset
for help on using the changeset viewer.