( i++ += ++i++ )


Subject: ( i++ += ++i++ )
From: Brad Pierce (Brad.Pierce@synopsys.com)
Date: Thu Nov 21 2002 - 12:07:29 PST


According to the BNF, the following is a legal SystemVerilog expression --

     ( i++ += ++i++ )

Doesn't this seem kind of weird? (This goes way beyond what's allowed in
C.)

The productions --

  expression
  ( operator_assignment )
  ( variable_lvalue assignment_operator expression )
  ( variable_lvalue += expression )
  ( variable_lvalue_item inc_or_dec_operator += expression )
  ( hierarchical_variable_identifier ++ += inc_or_dec_expression )
  ( hierarchical_identifer ++ += inc_or_dec_operator variable_lvalue )
  ( simple_hierarchical_identifier ++ += ++ variable_lvalue_item
inc_or_dec_operator )
  ( simple_hierarchical_branch ++ += ++ hierarchical_variable_identifier
++ )
  ( simple_identifier ++ += ++ hierarchical_identifier ++ )
  ( i++ += ++ simple_hierarchical_identifer ++ )
  ( i++ += ++ simple_hierarchical_branch ++ )
  ( i++ += ++ simple_identifier ++ )
  ( i++ += ++i++ )

-- Brad



This archive was generated by hypermail 2b28 : Thu Nov 21 2002 - 12:08:00 PST