Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r6165ce7 r72457b6  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul 27 12:08:08 2017
    13 // Update Count     : 2467
     12// Last Modified On : Mon Jul 24 09:01:14 2017
     13// Update Count     : 2463
    1414//
    1515
     
    142142// converted into the tuple index (.)(1). e.g., 3.x
    143143%token<tok>     REALDECIMALconstant     REALFRACTIONconstant    FLOATINGconstant
     144%token<tok> ZERO                                ONE                                             // CFA
    144145
    145146// multi-character operators
     
    158159%token ATassign                                                                                 // @=
    159160
    160 %type<tok> identifier  no_attr_identifier
     161%type<tok> identifier  no_attr_identifier  zero_one
    161162%type<tok> identifier_or_type_name  no_attr_identifier_or_type_name  attr_name
    162163%type<constant> string_literal
     
    359360        ;
    360361
     362zero_one:                                                                                               // CFA
     363        ZERO
     364        | ONE
     365        ;
     366
    361367string_literal:
    362368        string_literal_list                                                     { $$ = build_constantStr( *$1 ); }
     
    378384        IDENTIFIER                                                                                      // typedef name cannot be used as a variable name
    379385                { $$ = new ExpressionNode( build_varref( $1 ) ); }
     386        | zero_one
     387                { $$ = new ExpressionNode( build_constantZeroOne( *$1 ) ); }
    380388        | tuple
    381389        | '(' comma_expression ')'
     
    476484                {
    477485                        $$ = new ExpressionNode( build_field_name_fraction_constants( build_varref( $1 ), $2 ) );
     486                }
     487        | zero_one fraction_constants
     488                {
     489                        $$ = new ExpressionNode( build_field_name_fraction_constants( build_constantZeroOne( *$1 ), $2 ) );
    478490                }
    479491        ;
     
    561573                // VIRTUAL cannot be opt because of look ahead issues
    562574        | '(' VIRTUAL ')' cast_expression
    563                 { $$ = new ExpressionNode( build_virtual_cast( nullptr, $4 ) ); }
     575                { $$ = new ExpressionNode( build_cast( nullptr, $4 ) ); }
    564576        | '(' VIRTUAL type_no_function ')' cast_expression
    565                 { $$ = new ExpressionNode( build_virtual_cast( $3, $5 ) ); }
     577                { $$ = new ExpressionNode( build_cast( $3, $5 ) ); }
    566578//      | '(' type_no_function ')' tuple
    567579//              { $$ = new ExpressionNode( build_cast( $2, $4 ) ); }
Note: See TracChangeset for help on using the changeset viewer.