Re: [sv-bc] new copy constructor not in grammar


Subject: Re: [sv-bc] new copy constructor not in grammar
From: Brad Pierce (Brad.Pierce@synopsys.com)
Date: Fri Nov 21 2003 - 18:51:34 PST


Assuming inside a module_declaration and 'Packet' is the name of a class,
then 'Packet p2 = new p1 ;' can be derived as follows --

  non_port_module_item
  module_or_generate_item
  module_common_item
  module_or_generate_item_declaration
  package_or_generate_item_declaration
  data_declaration
  variable_declaration
  data_type list_of_variable_decl_assignments ;
  class_scope_type_identifier variable_decl_assignment ;
  class_identifier class_variable_identifier = class_new ;
  Packet p2 = new ( list_of_arguments ) ;
  Packet p2 = new ( expression ) ;
  Packet p2 = new ( primary ) ;
  Packet p2 = new ( hierarchical_identifier ) ;
  Packet p2 = new ( p1 ) ;

-----Original Message-----
From: Hermann.Ilmberger@infineon.com
[mailto:Hermann.Ilmberger@infineon.com]
Sent: Friday, November 21, 2003 4:57 AM
To: Brad.Pierce@synopsys.COM; sv-bc@eda.org
Subject: Re: [sv-bc] new copy constructor not in grammar

Brad,
you are of course right - the example I sent in
> Packet p1;
> Packet p2;
> p2 = new p1;
is a blocking_assignment, not a variable_decl_assignment.
However, I do not see that this is covered by blocking_assignment
with the new non-terminal class_new either.
class_new ::= new [ ( list_of_arguments ) ]

Same problem with the example I really had in mind:
Packet p2 = new p1;
which is the variable_decl_assignment.

I might just be blind - please point me to the right production.
Thanks,
-Hermann

> -----Original Message-----
> From: Brad Pierce [mailto:Brad.Pierce@synopsys.com]
> Sent: Monday, November 17, 2003 6:18 PM
> To: Hermann.Ilmberger@infineon.com
> Cc: sv-bc@eda.org
> Subject: RE: [sv-bc] new copy constructor not in grammar
>
>
> Hermann,
>
> I think it is a blocking_assignment, not a variable_decl_assignment.
>
> -- Brad
>
>
> -----Original Message-----
> From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org]On Behalf Of
> Hermann.Ilmberger@infineon.com
> Sent: Monday, November 17, 2003 6:03 AM
> To: sv-bc@eda.org
> Subject: [sv-bc] new copy constructor not in grammar
>
>
> The last line in the example in 11.11
> Packet p1;
> Packet p2;
> p1 = new;
> p2 = new p1;
> is not covered by
> A.2.4
> variable_decl_assignment
>
> -Hermann
>



This archive was generated by hypermail 2b28 : Fri Nov 21 2003 - 18:52:25 PST