}
BlockExpressionNode ben=new BlockExpressionNode(min);
bn.addFirstBlockStatement(ben);
+
+ } else if (bodyn!=null&&bodyn.getChild("explconstrinv")!=null) {
+ ParseNode eci=bodyn.getChild("explconstrinv");
+ NameDescriptor nd=new NameDescriptor(cn.getSymbol());
+ Vector args=parseArgumentList(eci);
+ MethodInvokeNode min=new MethodInvokeNode(nd);
+ for(int i=0; i<args.size(); i++) {
+ min.addArgument((ExpressionNode)args.get(i));
+ }
+ BlockExpressionNode ben=new BlockExpressionNode(min);
+ bn.addFirstBlockStatement(ben);
}
state.addTreeCode(md,bn);
}
| LBRACE RBRACE {: RESULT=new ParseNode("empty"); :}
;
explicit_constructor_invocation ::=
-// THIS LPAREN argument_list_opt RPAREN SEMICOLON
-// |
+ THIS LPAREN argument_list_opt:alo RPAREN SEMICOLON {:
+ ParseNode pn=new ParseNode("explconstrinv");
+ pn.addChild(alo);
+ RESULT=pn;
+ :}
+ |
SUPER LPAREN argument_list_opt:alo RPAREN SEMICOLON {:
ParseNode pn=new ParseNode("superinvoke");
pn.addChild(alo);
--- /dev/null
+PROGRAM=test
+
+SOURCE_FILES=$(PROGRAM).java
+
+BUILDSCRIPT=~/research/Robust/src/buildscript
+
+BSFLAGS= -mainclass Test
+
+all: $(PROGRAM).bin
+
+view: PNGs
+ eog *.png &
+
+PNGs: DOTs
+ d2p *COMPLETE*.dot
+
+DOTs: $(PROGRAM).bin
+
+$(PROGRAM).bin: $(SOURCE_FILES)
+ $(BUILDSCRIPT) $(BSFLAGS) $(DEBUGFLAGS) -o $(PROGRAM) $(SOURCE_FILES)
+
+OLDBSFLAGS= -mainclass Test -justanalyze -ownership -ownallocdepth 1 -ownwritedots final -enable-assertions
+old: $(SOURCE_FILES)
+ $(BUILDSCRIPT) $(OLDBSFLAGS) $(SOURCE_FILES) -o $(PROGRAM)
+
+clean:
+ rm -f $(PROGRAM).bin
+ rm -fr tmpbuilddirectory
+ rm -f *~
+ rm -f *.dot
+ rm -f *.png
+ rm -f aliases.txt
--- /dev/null
+public class Bar {
+ public Bar() {
+ System.out.println( "1. I'm the super" );
+ }
+}
+
+public class Foo extends Bar {
+
+ public Foo( int i ) {
+ this();
+ System.out.println( "3. I see the number "+i );
+ }
+
+ public Foo() {
+ super();
+ System.out.println( "2. I see nothing" );
+ }
+
+ public Foo f;
+}
+
+
+public class Test {
+
+ static public void main( String[] args ) {
+ Foo f = new Foo( 7 );
+ }
+
+}