[antlr-interest] doubt in java grammar,
cintyram <cintyram at yahoo.com>
cintyram at yahoo.com
Fri Feb 7 13:12:17 PST 2003
hi,
in the java grammar i found this rule ..
// conditional test (level 12)
conditionalExpression
: logicalOrExpression
( QUESTION^ assignmentExpression COLON! conditionalExpression )?
;
is it not true that (expr)? { s1;} : {s2} ;
is same as if(expr)
{s1;}
else
{s2;}
in which case both of them should be statement|blockstatement
; also could some one explain why the existing choice was made?
cheers
ram
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list