Update of /cvsroot/nice/Nice/src/bossa/parser
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27004/F:/nice/src/bossa/parser
Modified Files:
Parser.jj
Log Message:
Type(constructors) can be passed to an SuperExp to resolve ambigiuties.
Index: Parser.jj
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v
retrieving revision 1.236
retrieving revision 1.237
diff -C2 -d -r1.236 -r1.237
*** Parser.jj 3 Feb 2004 00:49:23 -0000 1.236
--- Parser.jj 5 Feb 2004 22:59:54 -0000 1.237
***************
*** 1643,1646 ****
--- 1643,1658 ----
}
+ Expression SuperExp() :
+ { TypeIdent typeId; List types = null; }
+ {
+ "super"
+ [ LOOKAHEAD("(") "("
+ typeId=typeIdent() { types=new ArrayList(); types.add(typeId); }
+ ( "," typeId=typeIdent() { types.add(typeId); } )*
+ ")"
+ ]
+ { return new SuperExp(types); }
+ }
+
Expression newExp():
{
***************
*** 2149,2155 ****
(
res=Literal()
! |
! "super"
! { res = new SuperExp(); }
|
// This includes the case "(" Expression() ")" to avoid lookahead
--- 2161,2166 ----
(
res=Literal()
! |
! res = SuperExp()
|
// This includes the case "(" Expression() ")" to avoid lookahead
***************
*** 2533,2538 ****
e1=Pre_crementExpression() ";"
|
! ( LOOKAHEAD( "super" )
! "super" ";" { e1 = new SuperExp(); }
|
e1=PrimaryPrefix()
--- 2544,2549 ----
e1=Pre_crementExpression() ";"
|
! ( LOOKAHEAD("super")
! e1=SuperExp() ";"
|
e1=PrimaryPrefix()
***************
*** 2565,2570 ****
e1=Pre_crementExpression()
|
! ( LOOKAHEAD( "super" )
! "super" { e1 = new SuperExp(); }
|
e1=PrimaryPrefix()
--- 2576,2581 ----
e1=Pre_crementExpression()
|
! ( LOOKAHEAD("super")
! e1=SuperExp()
|
e1=PrimaryPrefix()
|