Changes in src/Parser/parser.yy [6f95000:409433da]
- File:
-
- 1 edited
-
src/Parser/parser.yy (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r6f95000 r409433da 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 16 12:57:03201713 // Update Count : 231 612 // Last Modified On : Fri Mar 17 15:42:22 2017 13 // Update Count : 2317 14 14 // 15 15 … … 412 412 { $$ = new ExpressionNode( build_fieldSel( $1, build_field_name_REALFRACTIONconstant( *$2 ) ) ); } 413 413 | postfix_expression ARROW no_attr_identifier 414 { $$ = new ExpressionNode( build_pfieldSel( $1, build_varref( $3 ) ) ); } 414 { 415 $$ = new ExpressionNode( build_pfieldSel( $1, *$3 == "0" || *$3 == "1" ? build_constantInteger( *$3 ) : build_varref( $3 ) ) ); 416 } 415 417 | postfix_expression ARROW '[' push field_list pop ']' // CFA, tuple field selector 416 418 { $$ = new ExpressionNode( build_pfieldSel( $1, build_tuple( $5 ) ) ); } 419 | postfix_expression ARROW INTEGERconstant // CFA, tuple index 420 { $$ = new ExpressionNode( build_pfieldSel( $1, build_constantInteger( *$3 ) ) ); } 417 421 | postfix_expression ICR 418 422 { $$ = new ExpressionNode( build_unary_ptr( OperKinds::IncrPost, $1 ) ); } … … 1634 1638 { $$ = DeclarationNode::Union; } 1635 1639 | COROUTINE 1636 { $$ = DeclarationNode:: Struct; }1640 { $$ = DeclarationNode::Coroutine; } 1637 1641 | MONITOR 1638 { $$ = DeclarationNode:: Struct; }1642 { $$ = DeclarationNode::Monitor; } 1639 1643 | THREAD 1640 { $$ = DeclarationNode:: Struct; }1644 { $$ = DeclarationNode::Thread; } 1641 1645 ; 1642 1646
Note:
See TracChangeset
for help on using the changeset viewer.