shift_stmt_expr grammar question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just noticed that the production for right shifts differs from the
production for left shifts (src/parser_bison.y, ll. 3020ff.):

  shift_stmt_expr    :       primary_stmt_expr
                     |       shift_stmt_expr         LSHIFT          primary_stmt_expr
                     {
                             $$ = binop_expr_alloc(&@$, OP_LSHIFT, $1, $3);
                     }
                     |       shift_stmt_expr         RSHIFT          primary_rhs_expr
                     {
                             $$ = binop_expr_alloc(&@$, OP_RSHIFT, $1, $3);
                     }
                     ;

Is there a reason why the RHS of LSHIFT is primary_stmt_expr, but the
RHS of RSHIFT is primary_rhs_expr?

J.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux