Re: [sv-ec] question about the bnf for function new

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Thu Dec 07 2006 - 13:32:12 PST
According to Syntax 10-1, the first statement executed is the begin-end,
not the call to super.new().
 
-- Brad

________________________________

From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of
Francoise Martinolle
Sent: Thursday, December 07, 2006 11:00 AM
To: sv-ec@eda-stds.org
Subject: [sv-ec] question about the bnf for function new


This is a minor comment about the bnf for the declaration of the class
constructor.
 
The BNF for the constructor new makes the following example illegal:
 
        function new(input string name,input urm_named_object parent);
            begin
                super.new(name, parent);
                begin
                    
                end
            end
        endfunction

If the enclosing begin/end block is deleted, the example is legal.
As far as I can tell, super.new is in both examples the first statement
executed. So was it really intended to make that example illegal?
 
 
The bnf is:
 
class_constructor_declaration ::=

function [ class_scope ] new [ ( [ tf_port_list ] ) ] ;

{ block_item_declaration }

[ super . new [ ( list_of_arguments ) ] ; ]

{ function_statement_or_null }

endfunction [ : new ]
Received on Thu Dec 7 13:32:20 2006

This archive was generated by hypermail 2.1.8 : Thu Dec 07 2006 - 13:32:37 PST