Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r6f95000 r409433da  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 16 12:57:03 2017
    13 // Update Count     : 2316
     12// Last Modified On : Fri Mar 17 15:42:22 2017
     13// Update Count     : 2317
    1414//
    1515
     
    412412                { $$ = new ExpressionNode( build_fieldSel( $1, build_field_name_REALFRACTIONconstant( *$2 ) ) ); }
    413413        | 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                }
    415417        | postfix_expression ARROW '[' push field_list pop ']' // CFA, tuple field selector
    416418                        { $$ = 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 ) ) ); }
    417421        | postfix_expression ICR
    418422                { $$ = new ExpressionNode( build_unary_ptr( OperKinds::IncrPost, $1 ) ); }
     
    16341638                { $$ = DeclarationNode::Union; }
    16351639        | COROUTINE
    1636                 { $$ = DeclarationNode::Struct; }
     1640                { $$ = DeclarationNode::Coroutine; }
    16371641        | MONITOR
    1638                 { $$ = DeclarationNode::Struct; }
     1642                { $$ = DeclarationNode::Monitor; }
    16391643        | THREAD
    1640                 { $$ = DeclarationNode::Struct; }
     1644                { $$ = DeclarationNode::Thread; }
    16411645        ;
    16421646
Note: See TracChangeset for help on using the changeset viewer.