[sv-ec] Class constructor BNF issues


Subject: [sv-ec] Class constructor BNF issues
From: LaFlamme, Jamie (jamiel@Model.com)
Date: Wed Feb 04 2004 - 09:50:15 PST


The BNF for class_constructor_declaration in draft 4 looks like:

    class_constructor_declaration ::=
        function new ( tf_port_list ) ;
            { block_item_declaration }
            [ super . new [ ( list_of_arguments ) ] ; ]
            { function_statement_or_null }
        endfunction [ : new ]

This definition seems to require at least one argument to the constructor which I believe is incorrect.

In addition, it seems like the constructor has other differences from regular methods such as:
        - The '(' and ')' tokens are required in the declaration.
        - Constructors cannot be declared "extern" and defined
        out of block.
        - Constructors cannot be declared as "protected", "local"
        or "static" (although I can understand why "static" may
        not be allowed).
        - If the "super.new" call is included in the function body
        then it cannot be included inside of a begin..end block.

Does anyone know if there is a reason for these differences to exist?

Thanks,
-Jamie



This archive was generated by hypermail 2b28 : Wed Feb 04 2004 - 09:57:55 PST