Hi,
Class new rule is defined in the LRM as:
class_new18 ::= new [ ( list_of_arguments )
| expression ]
And here is the definition of sub-rule:
list_of_arguments ::=
[ expression ] { , [ expression ] } { , . identifier (
[ expression ] ) }
| . identifier (
[ expression ] ) { ,
. identifier ( [ expression ] ) }
expression ::=
primary
[...]
primary ::=
primary_literal
[...]
| ( mintypmax_expression )
mintypmax_expression ::=
expression
| expression : expression : expression
So a new expression like 'new (1)' can be reached both by "new '('
list_of_arguments')'" rule and "new expression" rule. Which is
conflicting. And also semantically 'expression' after 'new' just
pointing to a class object. So I think a subset of expression is valid
here. Is there any mantis regarding that?
--
Regards
Surya
--
This message has been scanned for viruses and
dangerous content by
MailScanner, and is
believed to be clean.
Received on Thu Mar 26 06:21:06 2009