From 69668434da08aea2278639f5ab36dac46089179b Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 5 Aug 2014 12:34:09 +0200 Subject: [PATCH 01/31] =?UTF-8?q?Code=20aufger=C3=A4umt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GenericTypeInsertPoint.java | 102 ++---------------- .../typedeployment/TypeInsertPoint.java | 9 +- .../typedeployment/TypeInsertSet.java | 74 +------------ test/plugindevelopment/TRMEqualTest.java | 11 +- .../TypeInsertTests/LambdaTest15.jav | 11 ++ .../TypeInsertTests/LambdaTest15.java | 16 +++ 6 files changed, 47 insertions(+), 176 deletions(-) create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest15.jav create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest15.java diff --git a/src/typinferenz/typedeployment/GenericTypeInsertPoint.java b/src/typinferenz/typedeployment/GenericTypeInsertPoint.java index c86f306a..61322247 100644 --- a/src/typinferenz/typedeployment/GenericTypeInsertPoint.java +++ b/src/typinferenz/typedeployment/GenericTypeInsertPoint.java @@ -18,6 +18,8 @@ import mycompiler.mytype.TypePlaceholder; /** * Ein InsertPoint für Generische Variablen + * Wird beim Einsetzen eines TIP generiert. + * Steht für die Einsetzung aller Generischen Variablendeklarationen zugehörig zu einem Punkt in der SourceFile. * @author janulrich * */ @@ -34,54 +36,15 @@ public class GenericTypeInsertPoint extends SourcePatchPoint { this.genericInsertPoint = syntaxTreeNode; } - /* - public GenericTypeInsertPoint(TypeInsertable syntaxTreeNode, - Vector pairs,ResultSet resultSet) { - super(syntaxTreeNode, null, resultSet); - this.genericPairs = pairs; - if(this.genericPairs.size() == 0)throw new DebugException("Menge der generischen Paare ist leer"); - } - */ - - + /** + * Der TypeInsertString wird im Falle des GTIP von dem zugehörigen SyntaxTreeNode generiert. + * @return + */ public String getTypeInsertString() { String genericVar = this.patch.getInsertString(this.resultSet); if(genericVar.length()==0)return ""; return this.genericInsertPoint.getGenericVarDeclarationString(genericVar)+" "; } - - /* - @Override - protected Type getInsertType(){ - if(genericPairs.size()==0){ - return new RefType("<"+this.type.printJavaCode(resultSet)+">",-1); - } - - Vector pairs = new Vector(); - //Problem: ist falsch! Es muss: heißen: - Vector P1s = new Vector(); - Vector P2s = new Vector(); - for(Pair p : genericPairs){ - P1s.add(p.TA1); - P2s.add(p.TA2); - } - for(Type t : P2s){ - if(!P1s.contains(t))pairs.add(new Pair(t,null)); - } - pairs.addAll(this.genericPairs); - - Iterator it = pairs.iterator(); - String genericTypeParameters = "<"; - while(it.hasNext()){ - genericTypeParameters += new GenericTypeVar(it.next(), 0).printJavaCode(this.getResultSet()); - if(it.hasNext())genericTypeParameters += ", "; - } - genericTypeParameters += ">"; - //Der Generische Variablen String zum Einsetzen ist nun vorhanden - this.type = new RefType(genericTypeParameters,0); - return this.type; - } - */ @Override public boolean equals(Object obj){ @@ -96,63 +59,14 @@ public class GenericTypeInsertPoint extends SourcePatchPoint { return ret; } - - - /** - * Versucht den GenericTypeInsertPoint mit dem bergebenenen p2 zusam - * basierend auf ihren insertPoints. - * @param p2 - * @return - Die bei der Zusammenfhrung entstandene GenericTypeInser - - public Vector merge(GenericTypeInsertPoint p2) { - Vector ret = new Vector(); - if(this.getInsertNode().equals(p2.getInsertNode())){ - for(Pair p : p2.genericPairs)this.addGenericPair(p); - ret.add(this); - }else{ - ret.add(this); - ret.add(p2); - } - return ret; - } - */ @Override public JavaCodeResult patch(String fileContent, int additionalOffset) { - /* - int offset = additionalOffset; - String insertString = ""; - if(this.genericParameters != null){ - offset += this.genericParameters.getOffsetOfLastElement(); - insertString = ", "+genericVarDecl; - }else{ - offset += this.offset; - - } - return sourceCode.substring(0,offset) + insertString + sourceCode.substring(offset); - */ - //TODO: Es kann sein, dass eine Methode bereits Generische Variablen hat, diese müssen dann an diese Liste angefügt werden. - JavaCodeResult ret = new JavaCodeResult(fileContent.substring(0, this.getOffset()+additionalOffset)); + JavaCodeResult ret = new JavaCodeResult(fileContent.substring(0, this.getOffset()+additionalOffset)); JavaCodeResult mitte = new JavaCodeResult(this.getTypeInsertString()).attach(fileContent.substring(this.getOffset()+additionalOffset)); ret.attach(mitte); - //this. return ret; } - - /* - public boolean associatedWith(TypeInsertPoint tip, ResultSet resultSet) { - if((tip.type instanceof TypePlaceholder)){ - Vector tphs = new Vector<>(); - tphs.add((TypePlaceholder)tip.type); - for(Pair p : resultSet.getConstraintsFor(tphs)){ - if(p.TA1.equals(this.type))return true; - if(p.TA2.equals(this.type))return true; - if(this.genericPairs.contains(p))return true; - } - } - - return false; - } - */ + @Override public int getOffset() { return genericInsertPoint.getGenericVarDeclarationOffset(); diff --git a/src/typinferenz/typedeployment/TypeInsertPoint.java b/src/typinferenz/typedeployment/TypeInsertPoint.java index 58d3c2c7..4e6c5d75 100644 --- a/src/typinferenz/typedeployment/TypeInsertPoint.java +++ b/src/typinferenz/typedeployment/TypeInsertPoint.java @@ -21,7 +21,6 @@ import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListe * */ public class TypeInsertPoint extends SourcePatchPoint { - public Type type; private TypeInsertable point; @@ -59,12 +58,6 @@ public class TypeInsertPoint extends SourcePatchPoint { return this.getTypeInsertString().toString().length(); } - public Vector getUnresolvedTPH(){ - Vector ret = new Vector(); - ret.addAll(this.getInsertType().getUnresolvedTPH(resultSet)); - return ret; - } - /** * * @return Der Offset des TypeInsertPoints in dem geparsten Source für dessen Klasse er erstellt wurde. @@ -102,7 +95,7 @@ public class TypeInsertPoint extends SourcePatchPoint { if(! (obj instanceof TypeInsertPoint))return false; TypeInsertPoint equals = (TypeInsertPoint) obj; if(!(equals.getInsertPoint().equals(this.getInsertPoint())))return false; - if(!(equals.getResultSet().equals(this.getResultSet())))return false; //ResultSet spielt bei Equals keine Rolle + if(!(equals.getResultSet().equals(this.getResultSet())))return false; if(!(equals.getInsertType().equals(this.getInsertType())))return false; return true; diff --git a/src/typinferenz/typedeployment/TypeInsertSet.java b/src/typinferenz/typedeployment/TypeInsertSet.java index 1e926ecb..5503cf62 100644 --- a/src/typinferenz/typedeployment/TypeInsertSet.java +++ b/src/typinferenz/typedeployment/TypeInsertSet.java @@ -17,20 +17,10 @@ import mycompiler.mytype.Pair; import mycompiler.mytype.RefType; import mycompiler.mytype.TypePlaceholder; -/* - * Der Plan: - * SyntaxTreeNode generiert die TypeInsertPoints. - * SyntaxTreeNode berechnet nicht die GenericInsertPoints. Das wird vom InsertSet übernommen. - * Das funktioniert mithilfe des ResultSets. Denn es müssen alle Constraints mit einbezogen werden, da der Unify - * Algorithmus als Ergebnis nur die zu einem RefType aufgelösten TPHs ausgibt. - */ /** - * Bündelt ein Set von TypeInsertPoints, die alle zu einem TypePlaceholder gehören. - * Diese müssen gemeinsam eingesetzt werden. + * Bündelt ein Set von TypeInsertPoints, welche zu einem TypeInferenceResultSet gehören. * Das TypeInsertSet löst zudem Abhängigkeiten auf. Wird eine Generische Variable eingesetzt, * müssen alle mit ihr in Verbindung stehenden Typen ebenfalls eingesetzt werden. - * TODO: Es müssen eigentlich nur die generischen Variablendeklarationen eingesetzt werden. - * TODO: Einsetzen von generischen Variablen in eine bereits vorhanden Parameterliste funktioniert nicht. * @author janulrich * */ @@ -39,7 +29,6 @@ public class TypeInsertSet { protected Logger typinferenzLog = Logger.getLogger("Typeinference"); public Vector points = new Vector(); - private Vector genericTypeInsertPoints = new Vector(); private ResultSet resultSet; public TypeInsertSet(ResultSet resultSet) { @@ -56,11 +45,6 @@ public class TypeInsertSet { points.add(typeInsertPoint); } } - - public void add(GenericTypeInsertPoint typeInsertPoint) { - //this.add((TypeInsertPoint)typeInsertPoint); - if(!this.genericTypeInsertPoints.contains(typeInsertPoint))this.genericTypeInsertPoints.add(typeInsertPoint); - } /** * Fügt nur einen einzelnen TypeInsertPoint in fileContent ein. @@ -114,47 +98,13 @@ public class TypeInsertSet { * @param fileContent * @return */ + @Deprecated public String insertAllTypes(String fileContent) { - //TODO: Das hier kann nicht funktionieren. Nach jedem einsetzen eines TIP muss momentan neu geparst werden TypePatchJob tpj = new TypePatchJob(); for(TypeInsertPoint tip : this.points){ this.insertType(tip, tpj); } return tpj.run(fileContent); - /* - int additionalOffset = 0; - String ret = fileContent; - - - Vector mergedPoints = new Vector(); - //GenericTypeInsertPoints mergen und dem TypeInsertSet anfügen: - for(GenericTypeInsertPoint p : this.genericTypeInsertPoints){ - GenericTypeInsertPoint mergePoint = null; - for(GenericTypeInsertPoint mp : mergedPoints){ - if(mp.getOffset() == p.getOffset())mergePoint = mp; - } - if(mergePoint == null){ - mergedPoints.add(p); - }else{ - mergePoint.merge(p); - } - } - for(TypeInsertPoint mp : mergedPoints){ - this.add(mp); - } - - //Anschließend sortieren (nach dem Offset der InsertPoints): - Collections.sort(points); - - for(TypeInsertPoint p : points){ - //Zuerst den Typ einsetzen - JavaCodeResult insertCode = p.insertType(ret, additionalOffset); - ret = insertCode.toString(); - //Dann Additional Offset korrigieren: - additionalOffset += p.getInsertLength(); - } - return ret; - */ } /** @@ -182,12 +132,6 @@ public class TypeInsertSet { //... aber nicht öfter als 1x : if(equals.points.lastIndexOf(point)!=equals.points.indexOf(point))return false; } - for(GenericTypeInsertPoint point : this.genericTypeInsertPoints){ - //Jeder TypeInsertPoint muss auch in equals vorkommen: - if(!equals.genericTypeInsertPoints.contains(point))return false; - //... aber nicht öfter als 1x : - if(equals.genericTypeInsertPoints.lastIndexOf(point)!=equals.genericTypeInsertPoints.indexOf(point))return false; - } return true; } @@ -201,20 +145,6 @@ public class TypeInsertSet { } } - /** - * Durchsucht alle bisher angefügten TypeInsertPoints nach nicht aufgelösten TypePlaceholdern. - * Diese sollten als Generische Variablen eingesetzt werden. - * TODO: Es dürfen nur die TypePlaceholder zurückgegeben werden, welche noch in keinem GenericVarTypeInsertPoint verwendet wurden. - * @return - */ - public Vector getUnresolvedTPHs(){ - Vector ret = new Vector(); - for(TypeInsertPoint p : this.points){ - ret.addAll(p.getUnresolvedTPH()); - } - return ret; - } - } /** diff --git a/test/plugindevelopment/TRMEqualTest.java b/test/plugindevelopment/TRMEqualTest.java index c10221f2..888daf42 100644 --- a/test/plugindevelopment/TRMEqualTest.java +++ b/test/plugindevelopment/TRMEqualTest.java @@ -12,6 +12,7 @@ import org.junit.Test; import junit.framework.TestCase; import mycompiler.MyCompiler; import mycompiler.MyCompilerAPI; +import mycompiler.SyntaxTreeNode; import mycompiler.myparser.JavaParser.yyException; import mycompiler.mytype.Pair; import mycompiler.mytype.Pair.PairOperator; @@ -65,7 +66,7 @@ public class TRMEqualTest { } } -class TestNode implements TypeInsertable{ +class TestNode extends SyntaxTreeNode implements TypeInsertable{ @Override public void replaceType(CReplaceTypeEvent e) { @@ -112,7 +113,7 @@ class TestNode implements TypeInsertable{ @Override public TypeInsertPoint createTypeInsertPoint(TypePlaceholder tph, ResultSet resultSet) { - return new TypeInsertPoint( this, resultSet.getTypeEqualTo(tph), resultSet); + return new TypeInsertPoint( this, this, resultSet.getTypeEqualTo(tph), resultSet); } @Override @@ -120,6 +121,12 @@ class TestNode implements TypeInsertable{ // TODO Auto-generated method stub return 0; } + + @Override + public Vector getChildren() { + // TODO Auto-generated method stub + return new Vector<>(); + } } diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest15.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest15.jav new file mode 100644 index 00000000..2f9256c3 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest15.jav @@ -0,0 +1,11 @@ +class Overload{ + +void method( x ){ + String varS; + Integer varI; + + x.apply(varI); + x.apply(varS); +} + +} \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest15.java b/test/plugindevelopment/TypeInsertTests/LambdaTest15.java new file mode 100644 index 00000000..d90f8a9e --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest15.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class LambdaTest15 { + private static final String TEST_FILE = "LambdaTest15.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + //mustContain.add("A a"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} From 0357dd0903ad4f1a3272d74afc25ea38cfacd3f7 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 5 Aug 2014 14:30:52 +0200 Subject: [PATCH 02/31] JavaCodeResult equals implementiert --- src/typinferenz/JavaCodeResult.java | 6 +++++- src/typinferenz/typedeployment/TypeInsertPoint.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/typinferenz/JavaCodeResult.java b/src/typinferenz/JavaCodeResult.java index 4fa8ebac..4ec7160c 100755 --- a/src/typinferenz/JavaCodeResult.java +++ b/src/typinferenz/JavaCodeResult.java @@ -56,7 +56,11 @@ public class JavaCodeResult{ @Override public boolean equals(Object obj){ - throw new NotImplementedException(); + if(!(obj instanceof JavaCodeResult))return false; + JavaCodeResult equals = (JavaCodeResult)obj; + if(!equals.getJavaCode().equals(this.getJavaCode()))return false; + if(!equals.getUnresolvedTPH().equals(this.getUnresolvedTPH()))return false; + return true; } } diff --git a/src/typinferenz/typedeployment/TypeInsertPoint.java b/src/typinferenz/typedeployment/TypeInsertPoint.java index 4e6c5d75..a00258b1 100644 --- a/src/typinferenz/typedeployment/TypeInsertPoint.java +++ b/src/typinferenz/typedeployment/TypeInsertPoint.java @@ -40,7 +40,7 @@ public class TypeInsertPoint extends SourcePatchPoint { this.resultSet = resultSet; this.node = insertNode; } - + /** * Setzt den Typ dieses TypeInsertPoint in den übergebenen Quelltext ein. * @param fileContent - der Quelltext From c35904d2166ce3b111950e9733620c984879a8b8 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 5 Aug 2014 16:58:26 +0200 Subject: [PATCH 03/31] Test added --- .../TypeInsertTests/LambdaTest16.jav | 4 ++++ .../TypeInsertTests/LambdaTest16.java | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest16.jav create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest16.java diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest16.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest16.jav new file mode 100644 index 00000000..839afeb5 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest16.jav @@ -0,0 +1,4 @@ +class Matrix2{ + Fun1>, DF> op = (m)->(f)->{return f.apply(this,m);}; + } + \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest16.java b/test/plugindevelopment/TypeInsertTests/LambdaTest16.java new file mode 100644 index 00000000..94b7fb21 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest16.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class LambdaTest16 { + private static final String TEST_FILE = "LambdaTest16.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + //mustContain.add("A a"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} From 18b468547d107ea674f678ffdefd4a6776d82e34 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 5 Aug 2014 17:57:23 +0200 Subject: [PATCH 04/31] RefTypes kontrollieren bei checkType nun auch Parameterliste --- src/mycompiler/mytype/RefType.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/mycompiler/mytype/RefType.java b/src/mycompiler/mytype/RefType.java index cfa3b006..9e1ec0c2 100755 --- a/src/mycompiler/mytype/RefType.java +++ b/src/mycompiler/mytype/RefType.java @@ -8,6 +8,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import mycompiler.IItemWithOffset; import mycompiler.mybytecode.JVMCode; import mycompiler.myclass.UsedId; import mycompiler.myexception.SCException; @@ -21,10 +22,13 @@ import org.apache.log4j.Logger; + import sun.reflect.generics.reflectiveObjects.NotImplementedException; import typinferenz.JavaCodeResult; import typinferenz.ResultSet; import typinferenz.TypeInsertable; +import typinferenz.assumptions.TypeAssumptions; +import typinferenz.exceptions.TypeinferenceException; @@ -780,6 +784,18 @@ public class RefType extends Type implements IMatchable } return ret; } + + @Override + public Type checkType(TypeAssumptions ass, IItemWithOffset parent){ + //Der RefType muss zusätzlich seine Parameter prüfen. + Vector parameterList = new Vector<>(); + if(this.parameter!=null)for(Type param : this.parameter){ + parameterList.add(param.checkType(ass, parent)); + } + this.parameter = parameterList; + Type t = super.checkType(ass,parent); + return t; + } } // ino.end From eed860f43e45897950d0885c598cc9344cff2504 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 5 Aug 2014 18:02:57 +0200 Subject: [PATCH 05/31] Fehler in GTV2TPH behoben --- src/mycompiler/mytype/RefType.java | 5 ++++- src/typinferenz/SingleConstraint.java | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mycompiler/mytype/RefType.java b/src/mycompiler/mytype/RefType.java index 9e1ec0c2..72810d73 100755 --- a/src/mycompiler/mytype/RefType.java +++ b/src/mycompiler/mytype/RefType.java @@ -219,7 +219,10 @@ public class RefType extends Type implements IMatchable Vector paralist = new Vector(); if(this.get_ParaList()!=null)for(Type t : this.get_ParaList()){ if(t instanceof GenericTypeVar)paralist.add(((GenericTypeVar)t).getTypePlaceHolder()); - else paralist.add(t); + else{ + if(t instanceof RefType)((RefType) t).GTV2TPH(); + paralist.add(t); + } } this.set_ParaList(paralist); } diff --git a/src/typinferenz/SingleConstraint.java b/src/typinferenz/SingleConstraint.java index 431f2da6..12d35320 100755 --- a/src/typinferenz/SingleConstraint.java +++ b/src/typinferenz/SingleConstraint.java @@ -66,6 +66,9 @@ public class SingleConstraint extends UndConstraint{ //{//Wenn die beiden übergebenen Typen weder RefTypes noch TypePlaceholder sind: // throw new TypinferenzException("Ein Constraint darf nur aus TypePlaceholdern und Reftypes bestehen"); //} + if(!(p1 instanceof RefType) && !(p1 instanceof TypePlaceholder))throw new DebugException("Fehler: "+p2+" kann nicht in TPH oder RefType umgewandelt werden"); + if(!(p2 instanceof RefType) && !(p2 instanceof TypePlaceholder))throw new DebugException("Fehler: "+p2+" kann nicht in TPH oder RefType umgewandelt werden"); + constraintPair = new Pair(p1,p2); } From 25195440f06b43559491e5827c90a2c7df50cf70 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 7 Aug 2014 11:07:11 +0200 Subject: [PATCH 06/31] Problem mit LocalVarDecl und setType behoben --- src/mycompiler/myclass/Constructor.java | 1 - src/mycompiler/mystatement/Block.java | 4 ++-- src/mycompiler/mystatement/LocalVarDecl.java | 5 ++++- src/mycompiler/mystatement/Return.java | 9 +++++++++ src/mycompiler/mystatement/Statement.java | 6 ++++++ .../TypeInsertTests/LambdaTest15.jav | 14 +++++--------- 6 files changed, 26 insertions(+), 13 deletions(-) diff --git a/src/mycompiler/myclass/Constructor.java b/src/mycompiler/myclass/Constructor.java index be857218..c978fccd 100644 --- a/src/mycompiler/myclass/Constructor.java +++ b/src/mycompiler/myclass/Constructor.java @@ -222,7 +222,6 @@ public class Constructor extends Method { public ConstraintsSet TYPE(TypeAssumptions ass) { ConstraintsSet ret = new ConstraintsSet(); - ret.add(this.methode.get_Block().TYPEStmt(ass)); return ret; } diff --git a/src/mycompiler/mystatement/Block.java b/src/mycompiler/mystatement/Block.java index f0eeda9f..efabb756 100755 --- a/src/mycompiler/mystatement/Block.java +++ b/src/mycompiler/mystatement/Block.java @@ -233,8 +233,8 @@ public class Block extends Statement for(int i= statements.size()-2; i >= 0; i--) { stmt = statements.elementAt(i); typinferenceLog.debug("Prozessing statement: "+stmt); - if (!(stmt.getType() instanceof Void)) - if (this.getType() instanceof Void) { + if (!(stmt.getReturnType() instanceof Void)) + if (this.getReturnType() instanceof Void) { //this.setTypeVariable(stmt.getTypeVariable()); throw new TypeinferenceException("Block besitzt falschen Rückgabetyp (fehlendes return-stmt)", this); } diff --git a/src/mycompiler/mystatement/LocalVarDecl.java b/src/mycompiler/mystatement/LocalVarDecl.java index bfcc8563..bbf420e6 100755 --- a/src/mycompiler/mystatement/LocalVarDecl.java +++ b/src/mycompiler/mystatement/LocalVarDecl.java @@ -42,10 +42,12 @@ import org.apache.log4j.Logger; + import typinferenz.ConstraintsSet; import typinferenz.FreshTypeVariable; import typinferenz.JavaCodeResult; import typinferenz.ResultSet; +import typinferenz.SingleConstraint; import typinferenz.TypeInsertable; import typinferenz.assumptions.LocalVarAssumption; import typinferenz.assumptions.TypeAssumptions; @@ -474,8 +476,9 @@ public class LocalVarDecl extends Statement implements TypeInsertable this.setType(replaceType); } assumptions.addAssumption(new LocalVarAssumption(this, this.getType())); //Bevor der Typ auf Void gesetzt wird. + ret.add(new SingleConstraint(this.getType(), this.getType())); //assumptions.remove(null); // falls Variable mit diesem Namen bereits vorhanden. - this.setType(new Void(0)); //Return typ einer Variablendeklaration ist Void + this.setReturnType(new Void(0)); //Return typ einer Variablendeklaration ist Void return ret; } diff --git a/src/mycompiler/mystatement/Return.java b/src/mycompiler/mystatement/Return.java index 50a5cc7a..5e9b7dd8 100755 --- a/src/mycompiler/mystatement/Return.java +++ b/src/mycompiler/mystatement/Return.java @@ -152,5 +152,14 @@ public class Return extends Statement return ret; } + @Override + public void setReturnType(Type t){ + this.setType(t); + } + + @Override + public Type getReturnType(){ + return this.getType(); + } } // ino.end diff --git a/src/mycompiler/mystatement/Statement.java b/src/mycompiler/mystatement/Statement.java index f7b16e4d..87478156 100755 --- a/src/mycompiler/mystatement/Statement.java +++ b/src/mycompiler/mystatement/Statement.java @@ -149,5 +149,11 @@ public abstract class Statement extends SyntaxTreeNode implements IItemWithOffse return this.printJavaCode(new ResultSet(new Vector())).toString(); } + public void setReturnType(Type t){ + } + + public Type getReturnType(){ + return new mycompiler.mytype.Void(-1); + } } // ino.end diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest15.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest15.jav index 2f9256c3..ef93085f 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest15.jav +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest15.jav @@ -1,11 +1,7 @@ -class Overload{ +class ConstructorTest1{ -void method( x ){ - String varS; - Integer varI; - - x.apply(varI); - x.apply(varS); +ConstructorTest1(){ +var; +var = 1; } - -} \ No newline at end of file +} From 92408cfdcc0b2cf29fcc2cd78efacd2fcbcec1ae Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 7 Aug 2014 12:11:18 +0200 Subject: [PATCH 07/31] =?UTF-8?q?Parser=20typename=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TODO.md | 2 + bin/mycompiler/myparser/JavaParser.jay | 44 + src/mycompiler/myparser/JavaParser.java | 1681 ++++++++++++----------- src/mycompiler/myparser/JavaParser.jay | 44 + 4 files changed, 951 insertions(+), 820 deletions(-) create mode 100644 TODO.md diff --git a/TODO.md b/TODO.md new file mode 100644 index 00000000..8099110c --- /dev/null +++ b/TODO.md @@ -0,0 +1,2 @@ +Nächste Aufgaben: + diff --git a/bin/mycompiler/myparser/JavaParser.jay b/bin/mycompiler/myparser/JavaParser.jay index 042059fd..16b86385 100755 --- a/bin/mycompiler/myparser/JavaParser.jay +++ b/bin/mycompiler/myparser/JavaParser.jay @@ -226,6 +226,7 @@ public Vector testPair = new Vector(); %type variabledeclarator %type variabledeclaratorid %type simplename +%type typename %type qualifiedname %type importqualifiedname %type importdeclaration @@ -786,6 +787,19 @@ classbodydeclaration : classmemberdeclaration $$=$1; } //*/ + +typename : simplename + { + $$=$1; + } + | IDENTIFIER '.' typename + { + UsedId UI = new UsedId($1.getOffset()); + UI.set_Name( $1.getLexem() + "." + $3 ); + UI.setOffset($1.getOffset());//hinzugef�gt hoth: 07.04.2006 + $$ = UI; + } + classorinterfacetype : simplename parameter { if ($2 != null) { @@ -1240,6 +1254,12 @@ type : primitivetype { $$=$1; } + /* + | referencelongtype + { + $$=$1; + } + */ |referencetype '[' ']' { $1.setArray(true); @@ -1357,6 +1377,28 @@ primitivetype :BOOLEAN $$=$1; } +referencelongtype : typename parameter + { + if ($2 != null) { + //$1.set_ParaList($2.get_ParaList()); + $1.set_ParaList($2);//Änderung von Andreas Stadelmeier. Type statt GenericVarType + /* otth: originale (also diese) Parameterliste retten */ + //((UsedId)$1).vParaOrg = new Vector( $2.get_ParaList() ); + } + UsedId uid = $1; + RefType RT = new RefType(uid.getOffset()); + + RT.set_ParaList(uid.get_RealParaList()); + RT.setName(uid.getQualifiedName()); + + + //PL 05-07-30 eingefuegt containedTypes ANFANG + containedTypes.addElement(RT); + //PL 05-07-30 eingefuegt containedTypes ENDE + + $$=RT; + } + referencetype :classorinterfacetype { org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->referenctype: " + $1); @@ -1375,6 +1417,8 @@ referencetype :classorinterfacetype $$=RT; } + + /* 05-07-28 PL Parameterdeklarationen zur classorinterfacetype verschoben */ variabledeclarator : variabledeclaratorid diff --git a/src/mycompiler/myparser/JavaParser.java b/src/mycompiler/myparser/JavaParser.java index 43b2946e..fd173c99 100644 --- a/src/mycompiler/myparser/JavaParser.java +++ b/src/mycompiler/myparser/JavaParser.java @@ -341,6 +341,8 @@ public Vector testPair = new Vector(); //t "classbodydeclaration : classmemberdeclaration", //t "classbodydeclaration : staticinitializer", //t "classbodydeclaration : constructordeclaration", +//t "typename : simplename", +//t "typename : IDENTIFIER '.' typename", //t "classorinterfacetype : simplename parameter", //t "typelist : type", //t "typelist : typelist ',' type", @@ -423,6 +425,7 @@ public Vector testPair = new Vector(); //t "methoddeclarator : IDENTIFIER '(' formalparameterlist ')'", //t "primitivetype : BOOLEAN", //t "primitivetype : numerictype", +//t "referencelongtype : typename parameter", //t "referencetype : classorinterfacetype", //t "variabledeclarator : variabledeclaratorid", //t "blockstatement : localvariabledeclarationstatement", @@ -758,20 +761,20 @@ public Vector testPair = new Vector(); yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]); switch (yyN) { case 1: - // line 326 "./../src/mycompiler/myparser/JavaParser.jay" + // line 327 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((SourceFile)yyVals[0+yyTop]); } break; case 2: - // line 330 "./../src/mycompiler/myparser/JavaParser.jay" + // line 331 "./../src/mycompiler/myparser/JavaParser.jay" { ((SourceFile)yyVals[0+yyTop]).addImports(((ImportDeclarations)yyVals[-1+yyTop])); yyVal=((SourceFile)yyVals[0+yyTop]); } break; case 3: - // line 335 "./../src/mycompiler/myparser/JavaParser.jay" + // line 336 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Package*/ ((SourceFile)yyVals[0+yyTop]).setPackageName(((UsedId)yyVals[-2+yyTop])); @@ -780,7 +783,7 @@ case 3: } break; case 4: - // line 342 "./../src/mycompiler/myparser/JavaParser.jay" + // line 343 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Package*/ ((SourceFile)yyVals[0+yyTop]).setPackageName(((UsedId)yyVals[-1+yyTop])); @@ -788,21 +791,21 @@ case 4: } break; case 5: - // line 348 "./../src/mycompiler/myparser/JavaParser.jay" + // line 349 "./../src/mycompiler/myparser/JavaParser.jay" { this.testPair.add(new Pair(((Type)yyVals[-2+yyTop]),((Type)yyVals[-1+yyTop]))); yyVal=((SourceFile)yyVals[0+yyTop]); } break; case 6: - // line 354 "./../src/mycompiler/myparser/JavaParser.jay" + // line 355 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Package*/ yyVal = ((UsedId)yyVals[-1+yyTop]); } break; case 7: - // line 360 "./../src/mycompiler/myparser/JavaParser.jay" + // line 361 "./../src/mycompiler/myparser/JavaParser.jay" { ImportDeclarations declarations=new ImportDeclarations(); declarations.addElement(((UsedId)yyVals[0+yyTop])); @@ -810,20 +813,20 @@ case 7: } break; case 8: - // line 366 "./../src/mycompiler/myparser/JavaParser.jay" + // line 367 "./../src/mycompiler/myparser/JavaParser.jay" { ((ImportDeclarations)yyVals[-1+yyTop]).addElement(((UsedId)yyVals[0+yyTop])); yyVal=((ImportDeclarations)yyVals[-1+yyTop]); } break; case 9: - // line 372 "./../src/mycompiler/myparser/JavaParser.jay" + // line 373 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((UsedId)yyVals[-1+yyTop]); } break; case 10: - // line 377 "./../src/mycompiler/myparser/JavaParser.jay" + // line 378 "./../src/mycompiler/myparser/JavaParser.jay" { SourceFile Scfile = new SourceFile(); Scfile.addElement(((AClassOrInterface)yyVals[0+yyTop])); @@ -831,39 +834,39 @@ case 10: } break; case 11: - // line 383 "./../src/mycompiler/myparser/JavaParser.jay" + // line 384 "./../src/mycompiler/myparser/JavaParser.jay" { ((SourceFile)yyVals[-1+yyTop]).addElement(((AClassOrInterface)yyVals[0+yyTop])); yyVal=((SourceFile)yyVals[-1+yyTop]); } break; case 12: - // line 389 "./../src/mycompiler/myparser/JavaParser.jay" + // line 390 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((UsedId)yyVals[0+yyTop]); } break; case 13: - // line 393 "./../src/mycompiler/myparser/JavaParser.jay" + // line 394 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((UsedId)yyVals[0+yyTop]); } break; case 14: - // line 398 "./../src/mycompiler/myparser/JavaParser.jay" + // line 399 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Class)yyVals[0+yyTop]); } break; case 15: - // line 402 "./../src/mycompiler/myparser/JavaParser.jay" + // line 403 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Interface*/ yyVal=((Interface)yyVals[0+yyTop]); } break; case 16: - // line 409 "./../src/mycompiler/myparser/JavaParser.jay" + // line 410 "./../src/mycompiler/myparser/JavaParser.jay" { ((UsedId)yyVals[-2+yyTop]).set_Name(((Token)yyVals[0+yyTop]).getLexem()); ((UsedId)yyVals[-2+yyTop]).setOffset(((UsedId)yyVals[-2+yyTop]).getOffset()); @@ -871,7 +874,7 @@ case 16: } break; case 17: - // line 416 "./../src/mycompiler/myparser/JavaParser.jay" + // line 417 "./../src/mycompiler/myparser/JavaParser.jay" { ((UsedId)yyVals[-2+yyTop]).set_Name(((Token)yyVals[0+yyTop]).getLexem()); ((UsedId)yyVals[-2+yyTop]).setOffset(((UsedId)yyVals[-2+yyTop]).getOffset()); @@ -879,7 +882,7 @@ case 17: } break; case 18: - // line 422 "./../src/mycompiler/myparser/JavaParser.jay" + // line 423 "./../src/mycompiler/myparser/JavaParser.jay" { ((UsedId)yyVals[-2+yyTop]).set_Name("*"); ((UsedId)yyVals[-2+yyTop]).setOffset(((UsedId)yyVals[-2+yyTop]).getOffset()); @@ -887,7 +890,7 @@ case 18: } break; case 19: - // line 430 "./../src/mycompiler/myparser/JavaParser.jay" + // line 431 "./../src/mycompiler/myparser/JavaParser.jay" { UsedId UI = new UsedId(((Token)yyVals[0+yyTop]).getOffset()); UI.set_Name( ((Token)yyVals[0+yyTop]).getLexem() ); @@ -896,7 +899,7 @@ case 19: } break; case 20: - // line 438 "./../src/mycompiler/myparser/JavaParser.jay" + // line 439 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Um das hier uebersichtlicher zu halten,*/ /* gibt es einen allumfassenden Konstruktor fuer Class*/ @@ -915,7 +918,7 @@ case 20: } break; case 21: - // line 455 "./../src/mycompiler/myparser/JavaParser.jay" + // line 456 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-1+yyTop]).getName(), ((Modifiers)yyVals[-3+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes,usedIdsToCheck, null, null, ((ClassAndParameter)yyVals[-1+yyTop]).getParaVector(), ((Token)yyVals[-2+yyTop]).getOffset()); this.initContainedTypes(); @@ -923,7 +926,7 @@ case 21: } break; case 22: - // line 461 "./../src/mycompiler/myparser/JavaParser.jay" + // line 462 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes,usedIdsToCheck, ((UsedId)yyVals[-1+yyTop]), null, ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -931,7 +934,7 @@ case 22: } break; case 23: - // line 467 "./../src/mycompiler/myparser/JavaParser.jay" + // line 468 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, usedIdsToCheck, ((UsedId)yyVals[-1+yyTop]), null, ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -939,7 +942,7 @@ case 23: } break; case 24: - // line 474 "./../src/mycompiler/myparser/JavaParser.jay" + // line 475 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes, usedIdsToCheck, null, ((InterfaceList)yyVals[-1+yyTop]).getVector(), ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -947,7 +950,7 @@ case 24: } break; case 25: - // line 480 "./../src/mycompiler/myparser/JavaParser.jay" + // line 481 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, usedIdsToCheck, null, ((InterfaceList)yyVals[-1+yyTop]).getVector(), ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -955,7 +958,7 @@ case 25: } break; case 26: - // line 486 "./../src/mycompiler/myparser/JavaParser.jay" + // line 487 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-3+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes,usedIdsToCheck, ((UsedId)yyVals[-2+yyTop]), ((InterfaceList)yyVals[-1+yyTop]).getVector(), ((ClassAndParameter)yyVals[-3+yyTop]).getParaVector(), ((Token)yyVals[-4+yyTop]).getOffset()); this.initContainedTypes(); @@ -963,7 +966,7 @@ case 26: } break; case 27: - // line 492 "./../src/mycompiler/myparser/JavaParser.jay" + // line 493 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-3+yyTop]).getName(), ((Modifiers)yyVals[-5+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, usedIdsToCheck, ((UsedId)yyVals[-2+yyTop]), ((InterfaceList)yyVals[-1+yyTop]).getVector(), ((ClassAndParameter)yyVals[-3+yyTop]).getParaVector(), ((Token)yyVals[-4+yyTop]).getOffset()); this.initContainedTypes(); @@ -971,7 +974,7 @@ case 27: } break; case 28: - // line 499 "./../src/mycompiler/myparser/JavaParser.jay" + // line 500 "./../src/mycompiler/myparser/JavaParser.jay" { /* HOTI*/ /* Verbindet den Namen eines Interfaces mit einer optionalen Parameterliste*/ @@ -979,13 +982,13 @@ case 28: } break; case 29: - // line 505 "./../src/mycompiler/myparser/JavaParser.jay" + // line 506 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = new InterfaceAndParameter(((Token)yyVals[-3+yyTop]).getLexem(), ((ParaList)yyVals[-1+yyTop])); } break; case 30: - // line 510 "./../src/mycompiler/myparser/JavaParser.jay" + // line 511 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Hilfskonstrukt, um die Grammatik ueberschaubar zu halten*/ /* Verbindet den Namen einer Klasse mit einer optionalen Parameterliste*/ @@ -993,13 +996,13 @@ case 30: } break; case 31: - // line 516 "./../src/mycompiler/myparser/JavaParser.jay" + // line 517 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = new ClassAndParameter(((Token)yyVals[-3+yyTop]).getLexem(), ((ParaList)yyVals[-1+yyTop])); } break; case 32: - // line 521 "./../src/mycompiler/myparser/JavaParser.jay" + // line 522 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Interface*/ Interface ic = new Interface(((InterfaceAndParameter)yyVals[-1+yyTop]).getName(), ((Token)yyVals[-2+yyTop]).getOffset()); @@ -1011,7 +1014,7 @@ case 32: } break; case 33: - // line 531 "./../src/mycompiler/myparser/JavaParser.jay" + // line 532 "./../src/mycompiler/myparser/JavaParser.jay" { Interface ic = new Interface(((InterfaceAndParameter)yyVals[-1+yyTop]).getName(), ((Modifiers)yyVals[-3+yyTop]), ((Token)yyVals[-2+yyTop]).getOffset()); ic.setInterfaceBody(((InterfaceBody)yyVals[0+yyTop])); @@ -1022,7 +1025,7 @@ case 33: } break; case 34: - // line 540 "./../src/mycompiler/myparser/JavaParser.jay" + // line 541 "./../src/mycompiler/myparser/JavaParser.jay" { Interface ic = new Interface(((InterfaceAndParameter)yyVals[-2+yyTop]).getName(), ((Token)yyVals[-3+yyTop]).getOffset()); ic.setParaList(((InterfaceAndParameter)yyVals[-2+yyTop]).getParaVector()); @@ -1034,7 +1037,7 @@ case 34: } break; case 35: - // line 550 "./../src/mycompiler/myparser/JavaParser.jay" + // line 551 "./../src/mycompiler/myparser/JavaParser.jay" { Interface ic = new Interface(((InterfaceAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((Token)yyVals[-3+yyTop]).getOffset()); ic.setParaList(((InterfaceAndParameter)yyVals[-2+yyTop]).getParaVector()); @@ -1046,7 +1049,7 @@ case 35: } break; case 36: - // line 561 "./../src/mycompiler/myparser/JavaParser.jay" + // line 562 "./../src/mycompiler/myparser/JavaParser.jay" { ParaList pl = new ParaList(); /* #JB# 05.04.2005 */ @@ -1059,7 +1062,7 @@ case 36: } break; case 37: - // line 572 "./../src/mycompiler/myparser/JavaParser.jay" + // line 573 "./../src/mycompiler/myparser/JavaParser.jay" { ParaList pl = new ParaList(); RefType t = new RefType( ((Token)yyVals[-3+yyTop]).getLexem(),((Token)yyVals[-3+yyTop]).getOffset() ); @@ -1070,7 +1073,7 @@ case 37: } break; case 38: - // line 581 "./../src/mycompiler/myparser/JavaParser.jay" + // line 582 "./../src/mycompiler/myparser/JavaParser.jay" { ParaList pl = new ParaList(); pl.getParalist().addElement(((WildcardType)yyVals[0+yyTop])); @@ -1078,7 +1081,7 @@ case 38: } break; case 39: - // line 587 "./../src/mycompiler/myparser/JavaParser.jay" + // line 588 "./../src/mycompiler/myparser/JavaParser.jay" { /* #JB# 05.04.2005 */ @@ -1092,7 +1095,7 @@ case 39: } break; case 40: - // line 600 "./../src/mycompiler/myparser/JavaParser.jay" + // line 601 "./../src/mycompiler/myparser/JavaParser.jay" { RefType t = new RefType( ((Token)yyVals[-3+yyTop]).getLexem() ,((Token)yyVals[-3+yyTop]).getOffset() ); t.set_ParaList( ((ParaList)yyVals[-1+yyTop]).get_ParaList() ); @@ -1102,14 +1105,14 @@ case 40: } break; case 41: - // line 608 "./../src/mycompiler/myparser/JavaParser.jay" + // line 609 "./../src/mycompiler/myparser/JavaParser.jay" { ((ParaList)yyVals[-2+yyTop]).getParalist().addElement(((WildcardType)yyVals[0+yyTop])); yyVal=((ParaList)yyVals[-2+yyTop]); } break; case 42: - // line 614 "./../src/mycompiler/myparser/JavaParser.jay" + // line 615 "./../src/mycompiler/myparser/JavaParser.jay" { /*Luar 29.11.06 Offset auf -1, da keine Angabe vorhanden*/ WildcardType wc = new WildcardType(-1); @@ -1117,34 +1120,34 @@ case 42: } break; case 43: - // line 620 "./../src/mycompiler/myparser/JavaParser.jay" + // line 621 "./../src/mycompiler/myparser/JavaParser.jay" { ExtendsWildcardType ewc = new ExtendsWildcardType(((Token)yyVals[-1+yyTop]).getOffset(),((RefType)yyVals[0+yyTop])); yyVal = ewc; } break; case 44: - // line 625 "./../src/mycompiler/myparser/JavaParser.jay" + // line 626 "./../src/mycompiler/myparser/JavaParser.jay" { SuperWildcardType swc = new SuperWildcardType(((Token)yyVals[-1+yyTop]).getOffset(),((RefType)yyVals[0+yyTop])); yyVal = swc; } break; case 45: - // line 631 "./../src/mycompiler/myparser/JavaParser.jay" + // line 632 "./../src/mycompiler/myparser/JavaParser.jay" { ClassBody CB = new ClassBody(); yyVal = CB; } break; case 46: - // line 637 "./../src/mycompiler/myparser/JavaParser.jay" + // line 638 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = ((ClassBody)yyVals[-1+yyTop]); } break; case 47: - // line 642 "./../src/mycompiler/myparser/JavaParser.jay" + // line 643 "./../src/mycompiler/myparser/JavaParser.jay" { Modifiers Mod = new Modifiers(); Mod.addModifier(((Modifier)yyVals[0+yyTop])); @@ -1152,20 +1155,20 @@ case 47: } break; case 48: - // line 648 "./../src/mycompiler/myparser/JavaParser.jay" + // line 649 "./../src/mycompiler/myparser/JavaParser.jay" { ((Modifiers)yyVals[-1+yyTop]).addModifier(((Modifier)yyVals[0+yyTop])); yyVal = ((Modifiers)yyVals[-1+yyTop]); } break; case 49: - // line 654 "./../src/mycompiler/myparser/JavaParser.jay" + // line 655 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = ((UsedId)yyVals[0+yyTop]); } break; case 50: - // line 659 "./../src/mycompiler/myparser/JavaParser.jay" + // line 660 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Interface*/ InterfaceList il = new InterfaceList(); @@ -1174,27 +1177,27 @@ case 50: } break; case 51: - // line 666 "./../src/mycompiler/myparser/JavaParser.jay" + // line 667 "./../src/mycompiler/myparser/JavaParser.jay" { ((InterfaceList)yyVals[-2+yyTop]).addInterface(((UsedId)yyVals[0+yyTop])); yyVal = ((InterfaceList)yyVals[-2+yyTop]); } break; case 52: - // line 672 "./../src/mycompiler/myparser/JavaParser.jay" + // line 673 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Interface*/ yyVal = new InterfaceBody(); } break; case 53: - // line 677 "./../src/mycompiler/myparser/JavaParser.jay" + // line 678 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = ((InterfaceBody)yyVals[-1+yyTop]); } break; case 54: - // line 684 "./../src/mycompiler/myparser/JavaParser.jay" + // line 685 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Interface*/ InterfaceList il = new InterfaceList(); @@ -1203,14 +1206,14 @@ case 54: } break; case 55: - // line 691 "./../src/mycompiler/myparser/JavaParser.jay" + // line 692 "./../src/mycompiler/myparser/JavaParser.jay" { ((InterfaceList)yyVals[-2+yyTop]).addInterface(((UsedId)yyVals[0+yyTop])); yyVal = ((InterfaceList)yyVals[-2+yyTop]); } break; case 56: - // line 698 "./../src/mycompiler/myparser/JavaParser.jay" + // line 699 "./../src/mycompiler/myparser/JavaParser.jay" { ClassBody CB = new ClassBody(); CB.addField( ((Field)yyVals[0+yyTop]) ); @@ -1218,55 +1221,55 @@ case 56: } break; case 57: - // line 704 "./../src/mycompiler/myparser/JavaParser.jay" + // line 705 "./../src/mycompiler/myparser/JavaParser.jay" { ((ClassBody)yyVals[-1+yyTop]).addField(((Field)yyVals[0+yyTop])); yyVal = ((ClassBody)yyVals[-1+yyTop]); } break; case 58: - // line 711 "./../src/mycompiler/myparser/JavaParser.jay" + // line 712 "./../src/mycompiler/myparser/JavaParser.jay" { Public Pub = new Public(); yyVal=Pub; } break; case 59: - // line 716 "./../src/mycompiler/myparser/JavaParser.jay" + // line 717 "./../src/mycompiler/myparser/JavaParser.jay" { Protected Pro = new Protected(); yyVal=Pro; } break; case 60: - // line 721 "./../src/mycompiler/myparser/JavaParser.jay" + // line 722 "./../src/mycompiler/myparser/JavaParser.jay" { Private Pri = new Private(); yyVal=Pri; } break; case 61: - // line 726 "./../src/mycompiler/myparser/JavaParser.jay" + // line 727 "./../src/mycompiler/myparser/JavaParser.jay" { Static Sta = new Static(); yyVal=Sta; } break; case 62: - // line 731 "./../src/mycompiler/myparser/JavaParser.jay" + // line 732 "./../src/mycompiler/myparser/JavaParser.jay" { Abstract Abs = new Abstract(); yyVal=Abs; } break; case 63: - // line 736 "./../src/mycompiler/myparser/JavaParser.jay" + // line 737 "./../src/mycompiler/myparser/JavaParser.jay" { Final fin = new Final(); yyVal = fin; } break; case 64: - // line 742 "./../src/mycompiler/myparser/JavaParser.jay" + // line 743 "./../src/mycompiler/myparser/JavaParser.jay" { /*PL 05-07-30 eingefuegt containedTypes ANFANG*/ RefType RT = new RefType(-1); @@ -1281,7 +1284,7 @@ case 64: } break; case 65: - // line 757 "./../src/mycompiler/myparser/JavaParser.jay" + // line 758 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Interface*/ InterfaceBody ib = new InterfaceBody(); @@ -1290,39 +1293,54 @@ case 65: } break; case 66: - // line 764 "./../src/mycompiler/myparser/JavaParser.jay" + // line 765 "./../src/mycompiler/myparser/JavaParser.jay" { ((InterfaceBody)yyVals[-1+yyTop]).addElement(((Field)yyVals[0+yyTop])); yyVal = ((InterfaceBody)yyVals[-1+yyTop]); } break; case 67: - // line 770 "./../src/mycompiler/myparser/JavaParser.jay" + // line 771 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Interfaces*/ yyVal = ((UsedId)yyVals[0+yyTop]); } break; case 68: - // line 776 "./../src/mycompiler/myparser/JavaParser.jay" + // line 777 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Field)yyVals[0+yyTop]); } break; case 69: - // line 781 "./../src/mycompiler/myparser/JavaParser.jay" + // line 782 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Method)yyVals[0+yyTop]); } break; case 70: - // line 785 "./../src/mycompiler/myparser/JavaParser.jay" + // line 786 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Field)yyVals[0+yyTop]); } break; case 71: - // line 790 "./../src/mycompiler/myparser/JavaParser.jay" + // line 792 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((UsedId)yyVals[0+yyTop]); + } + break; +case 72: + // line 796 "./../src/mycompiler/myparser/JavaParser.jay" + { + UsedId UI = new UsedId(((Token)yyVals[-2+yyTop]).getOffset()); + UI.set_Name( ((Token)yyVals[-2+yyTop]).getLexem() + "." + ((UsedId)yyVals[0+yyTop]) ); + UI.setOffset(((Token)yyVals[-2+yyTop]).getOffset());/*hinzugef�gt hoth: 07.04.2006*/ + yyVal = UI; + } + break; +case 73: + // line 804 "./../src/mycompiler/myparser/JavaParser.jay" { if (((Vector)yyVals[0+yyTop]) != null) { /*$1.set_ParaList($2.get_ParaList());*/ @@ -1333,58 +1351,58 @@ case 71: yyVal=((UsedId)yyVals[-1+yyTop]); } break; -case 72: - // line 801 "./../src/mycompiler/myparser/JavaParser.jay" +case 74: + // line 815 "./../src/mycompiler/myparser/JavaParser.jay" { Vector tl = new Vector(); tl.add(((Type)yyVals[0+yyTop])); yyVal = tl; } break; -case 73: - // line 807 "./../src/mycompiler/myparser/JavaParser.jay" +case 75: + // line 821 "./../src/mycompiler/myparser/JavaParser.jay" { ((Vector)yyVals[-2+yyTop]).add(((Type)yyVals[0+yyTop])); yyVal=((Vector)yyVals[-2+yyTop]); } break; -case 74: - // line 814 "./../src/mycompiler/myparser/JavaParser.jay" +case 76: + // line 828 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = null; } break; -case 75: - // line 816 "./../src/mycompiler/myparser/JavaParser.jay" +case 77: + // line 830 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = ((Vector)yyVals[-1+yyTop]); } break; -case 76: - // line 821 "./../src/mycompiler/myparser/JavaParser.jay" +case 78: + // line 835 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Interfaces, Spezialform Konstantendef.*/ yyVal = ((Constant)yyVals[0+yyTop]); } break; -case 77: - // line 826 "./../src/mycompiler/myparser/JavaParser.jay" +case 79: + // line 840 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = ((Method)yyVals[0+yyTop]); } break; -case 78: - // line 831 "./../src/mycompiler/myparser/JavaParser.jay" +case 80: + // line 845 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Field)yyVals[0+yyTop]); } break; -case 79: - // line 835 "./../src/mycompiler/myparser/JavaParser.jay" +case 81: + // line 849 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Method)yyVals[0+yyTop]); } break; -case 80: - // line 840 "./../src/mycompiler/myparser/JavaParser.jay" +case 82: + // line 854 "./../src/mycompiler/myparser/JavaParser.jay" { Method STAT = new Method(((Token)yyVals[-1+yyTop]).getOffset()); DeclId DST = new DeclId(); @@ -1398,23 +1416,23 @@ case 80: yyVal=STAT; } break; -case 81: - // line 854 "./../src/mycompiler/myparser/JavaParser.jay" +case 83: + // line 868 "./../src/mycompiler/myparser/JavaParser.jay" { ((Constructor)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); yyVal = ((Constructor)yyVals[-1+yyTop]); } break; -case 82: - // line 859 "./../src/mycompiler/myparser/JavaParser.jay" +case 84: + // line 873 "./../src/mycompiler/myparser/JavaParser.jay" { ((Constructor)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); ((Constructor)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); yyVal = ((Constructor)yyVals[-1+yyTop]); } break; -case 83: - // line 866 "./../src/mycompiler/myparser/JavaParser.jay" +case 85: + // line 880 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Interface*/ Constant c = new Constant(((Token)yyVals[-3+yyTop]).getLexem(), ((Modifiers)yyVals[-5+yyTop])); @@ -1423,15 +1441,15 @@ case 83: yyVal = c; } break; -case 84: - // line 875 "./../src/mycompiler/myparser/JavaParser.jay" +case 86: + // line 889 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Interface*/ yyVal = ((Method)yyVals[-1+yyTop]); } break; -case 85: - // line 900 "./../src/mycompiler/myparser/JavaParser.jay" +case 87: + // line 914 "./../src/mycompiler/myparser/JavaParser.jay" { FieldDeclaration ret = new FieldDeclaration(((DeclId)yyVals[-2+yyTop]).getOffset()); ret.set_DeclId(((DeclId)yyVals[-2+yyTop])); @@ -1439,58 +1457,58 @@ case 85: yyVal=ret; } break; -case 86: - // line 907 "./../src/mycompiler/myparser/JavaParser.jay" +case 88: + // line 921 "./../src/mycompiler/myparser/JavaParser.jay" { FieldDeclaration ret = new FieldDeclaration(((DeclId)yyVals[0+yyTop]).getOffset()); ret.set_DeclId(((DeclId)yyVals[0+yyTop])); yyVal=ret; } break; -case 87: - // line 914 "./../src/mycompiler/myparser/JavaParser.jay" +case 89: + // line 928 "./../src/mycompiler/myparser/JavaParser.jay" { GenericDeclarationList ret = new GenericDeclarationList(((GenericVarDeclarationList)yyVals[-1+yyTop]).getElements(),((GenericVarDeclarationList)yyVals[-1+yyTop]).getEndOffset()); yyVal = ret; } break; -case 88: - // line 921 "./../src/mycompiler/myparser/JavaParser.jay" +case 90: + // line 935 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; -case 89: - // line 925 "./../src/mycompiler/myparser/JavaParser.jay" +case 91: + // line 939 "./../src/mycompiler/myparser/JavaParser.jay" { ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; -case 90: - // line 930 "./../src/mycompiler/myparser/JavaParser.jay" +case 92: + // line 944 "./../src/mycompiler/myparser/JavaParser.jay" {/*angefügt von Andreas Stadelmeier*/ ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); ((FieldDeclaration)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; -case 91: - // line 937 "./../src/mycompiler/myparser/JavaParser.jay" +case 93: + // line 951 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; -case 92: - // line 942 "./../src/mycompiler/myparser/JavaParser.jay" +case 94: + // line 956 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + ((Type)yyVals[-2+yyTop])); ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); yyVal = ((FieldDeclaration)yyVals[-1+yyTop]); } break; -case 93: - // line 949 "./../src/mycompiler/myparser/JavaParser.jay" +case 95: + // line 963 "./../src/mycompiler/myparser/JavaParser.jay" { ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); for(int i=0;i<(((FieldDeclaration)yyVals[-1+yyTop]).getDeclIdVector().size());i++) @@ -1500,28 +1518,28 @@ case 93: yyVal = ((FieldDeclaration)yyVals[-1+yyTop]); } break; -case 94: - // line 959 "./../src/mycompiler/myparser/JavaParser.jay" +case 96: + // line 973 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); yyVal=((Method)yyVals[-1+yyTop]); } break; -case 95: - // line 966 "./../src/mycompiler/myparser/JavaParser.jay" +case 97: + // line 980 "./../src/mycompiler/myparser/JavaParser.jay" { Block Bl = new Block(); yyVal=Bl; } break; -case 96: - // line 972 "./../src/mycompiler/myparser/JavaParser.jay" +case 98: + // line 986 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Block)yyVals[-1+yyTop]); } break; -case 97: - // line 977 "./../src/mycompiler/myparser/JavaParser.jay" +case 99: + // line 991 "./../src/mycompiler/myparser/JavaParser.jay" { Constructor CON = new Constructor(null); /*TODO: Der Parser kann sowieso nicht zwischen einem Konstruktor und einer Methode unterscheiden. Das hier kann wegfallen...*/ DeclId DIDCon = new DeclId(); @@ -1530,8 +1548,8 @@ case 97: yyVal=CON; } break; -case 98: - // line 985 "./../src/mycompiler/myparser/JavaParser.jay" +case 100: + // line 999 "./../src/mycompiler/myparser/JavaParser.jay" { Constructor CONpara = new Constructor(null); DeclId DIconpara = new DeclId(); @@ -1541,29 +1559,29 @@ case 98: yyVal=CONpara; } break; -case 99: - // line 995 "./../src/mycompiler/myparser/JavaParser.jay" +case 101: + // line 1009 "./../src/mycompiler/myparser/JavaParser.jay" { Block CBL = new Block(); yyVal=CBL; } break; -case 100: - // line 1000 "./../src/mycompiler/myparser/JavaParser.jay" +case 102: + // line 1014 "./../src/mycompiler/myparser/JavaParser.jay" { Block CBLexpl = new Block(); CBLexpl.set_Statement(((Statement)yyVals[-1+yyTop])); yyVal=CBLexpl; } break; -case 101: - // line 1006 "./../src/mycompiler/myparser/JavaParser.jay" +case 103: + // line 1020 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Block)yyVals[-1+yyTop]); } break; -case 102: - // line 1010 "./../src/mycompiler/myparser/JavaParser.jay" +case 104: + // line 1024 "./../src/mycompiler/myparser/JavaParser.jay" { Block CBes = new Block(); CBes.set_Statement(((Statement)yyVals[-2+yyTop])); @@ -1574,51 +1592,51 @@ case 102: yyVal=CBes; } break; -case 103: - // line 1021 "./../src/mycompiler/myparser/JavaParser.jay" +case 105: + // line 1035 "./../src/mycompiler/myparser/JavaParser.jay" { ExceptionList EL = new ExceptionList(); EL.set_addElem(((RefType)yyVals[0+yyTop])); yyVal=EL; } break; -case 104: - // line 1028 "./../src/mycompiler/myparser/JavaParser.jay" +case 106: + // line 1042 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = ((GenericTypeVar)yyVals[0+yyTop]); } break; -case 105: - // line 1033 "./../src/mycompiler/myparser/JavaParser.jay" +case 107: + // line 1047 "./../src/mycompiler/myparser/JavaParser.jay" { ParaList p = new ParaList(); p.add_ParaList(((GenericTypeVar)yyVals[0+yyTop])); yyVal=p; } break; -case 106: - // line 1039 "./../src/mycompiler/myparser/JavaParser.jay" +case 108: + // line 1053 "./../src/mycompiler/myparser/JavaParser.jay" { ((ParaList)yyVals[-2+yyTop]).add_ParaList(((GenericTypeVar)yyVals[0+yyTop])); yyVal=((ParaList)yyVals[-2+yyTop]); } break; -case 107: - // line 1046 "./../src/mycompiler/myparser/JavaParser.jay" +case 109: + // line 1060 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(),((Token)yyVals[0+yyTop]).getOffset()); } break; -case 108: - // line 1050 "./../src/mycompiler/myparser/JavaParser.jay" +case 110: + // line 1064 "./../src/mycompiler/myparser/JavaParser.jay" { BoundedGenericTypeVar gtv=new BoundedGenericTypeVar(((Token)yyVals[-2+yyTop]).getLexem(), ((BoundedClassIdentifierList)yyVals[0+yyTop]), ((Token)yyVals[-2+yyTop]).getOffset() ,((BoundedClassIdentifierList)yyVals[0+yyTop]).getEndOffset()); /*gtv.setBounds($3);*/ yyVal=gtv; } break; -case 109: - // line 1057 "./../src/mycompiler/myparser/JavaParser.jay" +case 111: + // line 1071 "./../src/mycompiler/myparser/JavaParser.jay" { Vector vec=new Vector(); vec.addElement(((RefType)yyVals[0+yyTop])); @@ -1626,8 +1644,8 @@ case 109: yyVal=new BoundedClassIdentifierList(vec, ((RefType)yyVals[0+yyTop]).getOffset()+((RefType)yyVals[0+yyTop]).getName().length()); } break; -case 110: - // line 1064 "./../src/mycompiler/myparser/JavaParser.jay" +case 112: + // line 1078 "./../src/mycompiler/myparser/JavaParser.jay" { ((BoundedClassIdentifierList)yyVals[-2+yyTop]).addElement(((RefType)yyVals[0+yyTop])); ((BoundedClassIdentifierList)yyVals[-2+yyTop]).addOffsetOff(((RefType)yyVals[0+yyTop])); @@ -1635,46 +1653,46 @@ case 110: yyVal=((BoundedClassIdentifierList)yyVals[-2+yyTop]); } break; -case 111: - // line 1072 "./../src/mycompiler/myparser/JavaParser.jay" +case 113: + // line 1086 "./../src/mycompiler/myparser/JavaParser.jay" { GenericVarDeclarationList vec=new GenericVarDeclarationList(); vec.addElement(((GenericTypeVar)yyVals[0+yyTop])); yyVal=vec; } break; -case 112: - // line 1078 "./../src/mycompiler/myparser/JavaParser.jay" +case 114: + // line 1092 "./../src/mycompiler/myparser/JavaParser.jay" { ((GenericVarDeclarationList)yyVals[-2+yyTop]).addElement(((GenericTypeVar)yyVals[0+yyTop])); yyVal=((GenericVarDeclarationList)yyVals[-2+yyTop]); } break; -case 113: - // line 1086 "./../src/mycompiler/myparser/JavaParser.jay" +case 115: + // line 1100 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-2+yyTop])); yyVal=((Method)yyVals[0+yyTop]); } break; -case 114: - // line 1092 "./../src/mycompiler/myparser/JavaParser.jay" +case 116: + // line 1106 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); yyVal=((Method)yyVals[0+yyTop]); } break; -case 115: - // line 1097 "./../src/mycompiler/myparser/JavaParser.jay" +case 117: + // line 1111 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); yyVal=((Method)yyVals[0+yyTop]); } break; -case 116: - // line 1103 "./../src/mycompiler/myparser/JavaParser.jay" +case 118: + // line 1117 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-2+yyTop])); @@ -1682,27 +1700,9 @@ case 116: yyVal=((Method)yyVals[0+yyTop]); } break; -case 117: - // line 1110 "./../src/mycompiler/myparser/JavaParser.jay" - { - ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); - ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); - yyVal=((Method)yyVals[-1+yyTop]); - } - break; -case 118: - // line 1116 "./../src/mycompiler/myparser/JavaParser.jay" - { - ((Method)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); - ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); - ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); - yyVal=((Method)yyVals[-1+yyTop]); - } - break; case 119: - // line 1123 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1124 "./../src/mycompiler/myparser/JavaParser.jay" { - ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); yyVal=((Method)yyVals[-1+yyTop]); @@ -1711,7 +1711,6 @@ case 119: case 120: // line 1130 "./../src/mycompiler/myparser/JavaParser.jay" { - ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-4+yyTop])); ((Method)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); @@ -1719,15 +1718,34 @@ case 120: } break; case 121: - // line 1138 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1137 "./../src/mycompiler/myparser/JavaParser.jay" + { + ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); + ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); + ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); + yyVal=((Method)yyVals[-1+yyTop]); + } + break; +case 122: + // line 1144 "./../src/mycompiler/myparser/JavaParser.jay" + { + ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-4+yyTop])); + ((Method)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); + ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); + ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); + yyVal=((Method)yyVals[-1+yyTop]); + } + break; +case 123: + // line 1152 "./../src/mycompiler/myparser/JavaParser.jay" { Void Voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).setType(Voit); yyVal=((Method)yyVals[0+yyTop]); } break; -case 122: - // line 1144 "./../src/mycompiler/myparser/JavaParser.jay" +case 124: + // line 1158 "./../src/mycompiler/myparser/JavaParser.jay" { Void voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); @@ -1735,8 +1753,8 @@ case 122: yyVal=((Method)yyVals[0+yyTop]); } break; -case 123: - // line 1151 "./../src/mycompiler/myparser/JavaParser.jay" +case 125: + // line 1165 "./../src/mycompiler/myparser/JavaParser.jay" { Void voyt = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).setType(voyt); @@ -1744,8 +1762,8 @@ case 123: yyVal=((Method)yyVals[-1+yyTop]); } break; -case 124: - // line 1158 "./../src/mycompiler/myparser/JavaParser.jay" +case 126: + // line 1172 "./../src/mycompiler/myparser/JavaParser.jay" { Void voyd = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); @@ -1754,8 +1772,8 @@ case 124: yyVal=((Method)yyVals[-1+yyTop]); } break; -case 125: - // line 1166 "./../src/mycompiler/myparser/JavaParser.jay" +case 127: + // line 1180 "./../src/mycompiler/myparser/JavaParser.jay" { Void Voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).setType(Voit); @@ -1763,8 +1781,8 @@ case 125: yyVal=((Method)yyVals[0+yyTop]); } break; -case 126: - // line 1173 "./../src/mycompiler/myparser/JavaParser.jay" +case 128: + // line 1187 "./../src/mycompiler/myparser/JavaParser.jay" { Void voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); @@ -1773,8 +1791,8 @@ case 126: yyVal=((Method)yyVals[0+yyTop]); } break; -case 127: - // line 1181 "./../src/mycompiler/myparser/JavaParser.jay" +case 129: + // line 1195 "./../src/mycompiler/myparser/JavaParser.jay" { Void voyt = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).setType(voyt); @@ -1783,8 +1801,8 @@ case 127: yyVal=((Method)yyVals[-1+yyTop]); } break; -case 128: - // line 1189 "./../src/mycompiler/myparser/JavaParser.jay" +case 130: + // line 1203 "./../src/mycompiler/myparser/JavaParser.jay" { Void voyd = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-4+yyTop])); @@ -1794,39 +1812,39 @@ case 128: yyVal=((Method)yyVals[-1+yyTop]); } break; -case 129: - // line 1199 "./../src/mycompiler/myparser/JavaParser.jay" +case 131: + // line 1213 "./../src/mycompiler/myparser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $1.setType(TypePlaceholder.fresh()); */ yyVal=((Method)yyVals[0+yyTop]); } break; -case 130: - // line 1204 "./../src/mycompiler/myparser/JavaParser.jay" +case 132: + // line 1218 "./../src/mycompiler/myparser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $4.setType(TypePlaceholder.fresh());*/ ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-1+yyTop])); yyVal=((Method)yyVals[0+yyTop]); } break; -case 131: - // line 1211 "./../src/mycompiler/myparser/JavaParser.jay" +case 133: + // line 1225 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-1+yyTop])); /*auskommentiert von Andreas Stadelmeier (a10023) $2.setType(TypePlaceholder.fresh());*/ yyVal=((Method)yyVals[0+yyTop]); } break; -case 132: - // line 1217 "./../src/mycompiler/myparser/JavaParser.jay" +case 134: + // line 1231 "./../src/mycompiler/myparser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $1.setType(TypePlaceholder.fresh());*/ ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); yyVal=((Method)yyVals[-1+yyTop]); } break; -case 133: - // line 1223 "./../src/mycompiler/myparser/JavaParser.jay" +case 135: + // line 1237 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); /*auskommentiert von Andreas Stadelmeier (a10023) $2.setType(TypePlaceholder.fresh());*/ @@ -1834,32 +1852,32 @@ case 133: yyVal=((Method)yyVals[-1+yyTop]); } break; -case 134: - // line 1232 "./../src/mycompiler/myparser/JavaParser.jay" +case 136: + // line 1246 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; -case 135: - // line 1236 "./../src/mycompiler/myparser/JavaParser.jay" +case 137: + // line 1250 "./../src/mycompiler/myparser/JavaParser.jay" { ((BaseType)yyVals[-2+yyTop]).setArray(true); } break; -case 136: - // line 1240 "./../src/mycompiler/myparser/JavaParser.jay" +case 138: + // line 1254 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((RefType)yyVals[0+yyTop]); } break; -case 137: - // line 1244 "./../src/mycompiler/myparser/JavaParser.jay" +case 139: + // line 1264 "./../src/mycompiler/myparser/JavaParser.jay" { ((RefType)yyVals[-2+yyTop]).setArray(true); } break; -case 138: - // line 1248 "./../src/mycompiler/myparser/JavaParser.jay" +case 140: + // line 1268 "./../src/mycompiler/myparser/JavaParser.jay" { FieldDeclaration IVD = new FieldDeclaration(((DeclId)yyVals[0+yyTop]).getOffset()); IVD.getDeclIdVector().addElement( ((DeclId)yyVals[0+yyTop]) ); @@ -1867,66 +1885,66 @@ case 138: yyVal = IVD; } break; -case 139: - // line 1255 "./../src/mycompiler/myparser/JavaParser.jay" +case 141: + // line 1275 "./../src/mycompiler/myparser/JavaParser.jay" { ((FieldDeclaration)yyVals[-2+yyTop]).getDeclIdVector().addElement(((DeclId)yyVals[0+yyTop])); yyVal=((FieldDeclaration)yyVals[-2+yyTop]); } break; -case 140: - // line 1261 "./../src/mycompiler/myparser/JavaParser.jay" +case 142: + // line 1281 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; -case 141: - // line 1266 "./../src/mycompiler/myparser/JavaParser.jay" +case 143: + // line 1286 "./../src/mycompiler/myparser/JavaParser.jay" { Block Blstat = new Block(); Blstat.set_Statement(((Statement)yyVals[0+yyTop])); yyVal=Blstat; } break; -case 142: - // line 1273 "./../src/mycompiler/myparser/JavaParser.jay" +case 144: + // line 1293 "./../src/mycompiler/myparser/JavaParser.jay" { ((Block)yyVals[-1+yyTop]).set_Statement(((Statement)yyVals[0+yyTop])); yyVal=((Block)yyVals[-1+yyTop]); } break; -case 143: - // line 1279 "./../src/mycompiler/myparser/JavaParser.jay" +case 145: + // line 1299 "./../src/mycompiler/myparser/JavaParser.jay" { ParameterList PL = new ParameterList(); PL.set_AddParameter(((FormalParameter)yyVals[0+yyTop])); yyVal = PL; } break; -case 144: - // line 1285 "./../src/mycompiler/myparser/JavaParser.jay" +case 146: + // line 1305 "./../src/mycompiler/myparser/JavaParser.jay" { ((ParameterList)yyVals[-2+yyTop]).set_AddParameter(((FormalParameter)yyVals[0+yyTop])); yyVal = ((ParameterList)yyVals[-2+yyTop]); } break; -case 145: - // line 1291 "./../src/mycompiler/myparser/JavaParser.jay" +case 147: + // line 1311 "./../src/mycompiler/myparser/JavaParser.jay" { This THCON = new This(((Token)yyVals[-3+yyTop]).getOffset(),((Token)yyVals[-3+yyTop]).getLexem().length()); yyVal=THCON; } break; -case 146: - // line 1296 "./../src/mycompiler/myparser/JavaParser.jay" +case 148: + // line 1316 "./../src/mycompiler/myparser/JavaParser.jay" { This THCONargl = new This(((Token)yyVals[-4+yyTop]).getOffset(),((Token)yyVals[-4+yyTop]).getLexem().length()); THCONargl.set_ArgumentList(((ArgumentList)yyVals[-2+yyTop])); yyVal=THCONargl; } break; -case 147: - // line 1305 "./../src/mycompiler/myparser/JavaParser.jay" +case 149: + // line 1325 "./../src/mycompiler/myparser/JavaParser.jay" { RefType RT = new RefType(-1); RT.set_UsedId(((UsedId)yyVals[0+yyTop])); @@ -1934,16 +1952,16 @@ case 147: yyVal=RT; } break; -case 148: - // line 1312 "./../src/mycompiler/myparser/JavaParser.jay" +case 150: + // line 1332 "./../src/mycompiler/myparser/JavaParser.jay" { ((RefType)yyVals[-2+yyTop]).set_UsedId(((UsedId)yyVals[0+yyTop])); ((RefType)yyVals[-2+yyTop]).setName(((RefType)yyVals[-2+yyTop]).get_UsedId().get_Name_1Element()); yyVal=((RefType)yyVals[-2+yyTop]); } break; -case 149: - // line 1319 "./../src/mycompiler/myparser/JavaParser.jay" +case 151: + // line 1339 "./../src/mycompiler/myparser/JavaParser.jay" { Method met = new Method(((Token)yyVals[-2+yyTop]).getOffset()); /* #JB# 10.04.2005 */ @@ -1957,8 +1975,8 @@ case 149: yyVal = met; } break; -case 150: - // line 1332 "./../src/mycompiler/myparser/JavaParser.jay" +case 152: + // line 1352 "./../src/mycompiler/myparser/JavaParser.jay" { Method met_para = new Method(((Token)yyVals[-3+yyTop]).getOffset()); /* #JB# 10.04.2005 */ @@ -1973,8 +1991,8 @@ case 150: yyVal = met_para; } break; -case 151: - // line 1347 "./../src/mycompiler/myparser/JavaParser.jay" +case 153: + // line 1367 "./../src/mycompiler/myparser/JavaParser.jay" { BooleanType BT = new BooleanType(); /* #JB# 05.04.2005 */ @@ -1984,14 +2002,37 @@ case 151: yyVal=BT; } break; -case 152: - // line 1356 "./../src/mycompiler/myparser/JavaParser.jay" +case 154: + // line 1376 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; -case 153: - // line 1361 "./../src/mycompiler/myparser/JavaParser.jay" +case 155: + // line 1381 "./../src/mycompiler/myparser/JavaParser.jay" + { + if (((Vector)yyVals[0+yyTop]) != null) { + /*$1.set_ParaList($2.get_ParaList());*/ + ((UsedId)yyVals[-1+yyTop]).set_ParaList(((Vector)yyVals[0+yyTop]));/*Änderung von Andreas Stadelmeier. Type statt GenericVarType*/ + /* otth: originale (also diese) Parameterliste retten */ + /*((UsedId)$1).vParaOrg = new Vector( $2.get_ParaList() );*/ + } + UsedId uid = ((UsedId)yyVals[-1+yyTop]); + RefType RT = new RefType(uid.getOffset()); + + RT.set_ParaList(uid.get_RealParaList()); + RT.setName(uid.getQualifiedName()); + + + /*PL 05-07-30 eingefuegt containedTypes ANFANG*/ + containedTypes.addElement(RT); + /*PL 05-07-30 eingefuegt containedTypes ENDE*/ + + yyVal=RT; + } + break; +case 156: + // line 1403 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->referenctype: " + ((UsedId)yyVals[0+yyTop])); RefType RT = new RefType(((UsedId)yyVals[0+yyTop]).getOffset()); @@ -2010,26 +2051,26 @@ case 153: yyVal=RT; } break; -case 154: - // line 1381 "./../src/mycompiler/myparser/JavaParser.jay" +case 157: + // line 1425 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((DeclId)yyVals[0+yyTop]); } break; -case 155: - // line 1402 "./../src/mycompiler/myparser/JavaParser.jay" +case 158: + // line 1446 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((LocalVarDecl)yyVals[0+yyTop]); } break; -case 156: - // line 1406 "./../src/mycompiler/myparser/JavaParser.jay" +case 159: + // line 1450 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; -case 157: - // line 1411 "./../src/mycompiler/myparser/JavaParser.jay" +case 160: + // line 1455 "./../src/mycompiler/myparser/JavaParser.jay" { FormalParameter FP = new FormalParameter(((DeclId)yyVals[0+yyTop])); FP.setType(((Type)yyVals[-1+yyTop])); @@ -2037,8 +2078,8 @@ case 157: yyVal=FP; } break; -case 158: - // line 1436 "./../src/mycompiler/myparser/JavaParser.jay" +case 161: + // line 1480 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + ((DeclId)yyVals[0+yyTop]).name); @@ -2057,29 +2098,29 @@ case 158: yyVal=FP; } break; -case 159: - // line 1455 "./../src/mycompiler/myparser/JavaParser.jay" +case 162: + // line 1499 "./../src/mycompiler/myparser/JavaParser.jay" { ArgumentList AL = new ArgumentList(); AL.expr.addElement(((Expr)yyVals[0+yyTop])); yyVal=AL; } break; -case 160: - // line 1461 "./../src/mycompiler/myparser/JavaParser.jay" +case 163: + // line 1505 "./../src/mycompiler/myparser/JavaParser.jay" { ((ArgumentList)yyVals[-2+yyTop]).expr.addElement(((Expr)yyVals[0+yyTop])); yyVal=((ArgumentList)yyVals[-2+yyTop]); } break; -case 161: - // line 1467 "./../src/mycompiler/myparser/JavaParser.jay" +case 164: + // line 1511 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; -case 162: - // line 1472 "./../src/mycompiler/myparser/JavaParser.jay" +case 165: + // line 1516 "./../src/mycompiler/myparser/JavaParser.jay" { DeclId DI = new DeclId(); /* #JB# 10.04.2005 */ @@ -2091,62 +2132,62 @@ case 162: yyVal=DI; } break; -case 163: - // line 1484 "./../src/mycompiler/myparser/JavaParser.jay" +case 166: + // line 1528 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 164: - // line 1489 "./../src/mycompiler/myparser/JavaParser.jay" +case 167: + // line 1533 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((LocalVarDecl)yyVals[-1+yyTop]); } break; -case 165: - // line 1494 "./../src/mycompiler/myparser/JavaParser.jay" +case 168: + // line 1538 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; -case 166: - // line 1498 "./../src/mycompiler/myparser/JavaParser.jay" +case 169: + // line 1542 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; -case 167: - // line 1502 "./../src/mycompiler/myparser/JavaParser.jay" +case 170: + // line 1546 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; -case 168: - // line 1506 "./../src/mycompiler/myparser/JavaParser.jay" +case 171: + // line 1550 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((WhileStmt)yyVals[0+yyTop]); } break; -case 169: - // line 1510 "./../src/mycompiler/myparser/JavaParser.jay" +case 172: + // line 1554 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((ForStmt)yyVals[0+yyTop]); } break; -case 170: - // line 1515 "./../src/mycompiler/myparser/JavaParser.jay" +case 173: + // line 1559 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 171: - // line 1519 "./../src/mycompiler/myparser/JavaParser.jay" +case 174: + // line 1563 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((NewClass)yyVals[0+yyTop]); } break; -case 172: - // line 1524 "./../src/mycompiler/myparser/JavaParser.jay" +case 175: + // line 1568 "./../src/mycompiler/myparser/JavaParser.jay" { IntegerType IT = new IntegerType(); /* #JB# 05.04.2005 */ @@ -2156,8 +2197,8 @@ case 172: yyVal=IT; } break; -case 173: - // line 1533 "./../src/mycompiler/myparser/JavaParser.jay" +case 176: + // line 1577 "./../src/mycompiler/myparser/JavaParser.jay" { CharacterType CT = new CharacterType(); /* #JB# 05.04.2005 */ @@ -2167,8 +2208,8 @@ case 173: yyVal=CT; } break; -case 174: - // line 1543 "./../src/mycompiler/myparser/JavaParser.jay" +case 177: + // line 1587 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); LocalVarDecl LVD = new LocalVarDecl(((Type)yyVals[-1+yyTop]).getOffset(),((Type)yyVals[-1+yyTop]).getVariableLength()); @@ -2177,8 +2218,8 @@ case 174: yyVal = LVD; } break; -case 175: - // line 1554 "./../src/mycompiler/myparser/JavaParser.jay" +case 178: + // line 1598 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); LocalVarDecl LVD = new LocalVarDecl(((FieldDeclaration)yyVals[0+yyTop]).getOffset(),((FieldDeclaration)yyVals[0+yyTop]).getVariableLength()); @@ -2187,32 +2228,32 @@ case 175: yyVal = LVD; } break; -case 176: - // line 1564 "./../src/mycompiler/myparser/JavaParser.jay" +case 179: + // line 1608 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; -case 177: - // line 1568 "./../src/mycompiler/myparser/JavaParser.jay" +case 180: + // line 1612 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((EmptyStmt)yyVals[0+yyTop]); } break; -case 178: - // line 1572 "./../src/mycompiler/myparser/JavaParser.jay" +case 181: + // line 1616 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((ExprStmt)yyVals[0+yyTop]); } break; -case 179: - // line 1576 "./../src/mycompiler/myparser/JavaParser.jay" +case 182: + // line 1620 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Return)yyVals[0+yyTop]); } break; -case 180: - // line 1581 "./../src/mycompiler/myparser/JavaParser.jay" +case 183: + // line 1625 "./../src/mycompiler/myparser/JavaParser.jay" { IfStmt Ifst = new IfStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Ifst.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2220,8 +2261,8 @@ case 180: yyVal=Ifst; } break; -case 181: - // line 1589 "./../src/mycompiler/myparser/JavaParser.jay" +case 184: + // line 1633 "./../src/mycompiler/myparser/JavaParser.jay" { IfStmt IfstElst = new IfStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); IfstElst.set_Expr(((Expr)yyVals[-4+yyTop])); @@ -2230,8 +2271,8 @@ case 181: yyVal=IfstElst; } break; -case 182: - // line 1598 "./../src/mycompiler/myparser/JavaParser.jay" +case 185: + // line 1642 "./../src/mycompiler/myparser/JavaParser.jay" { WhileStmt Whlst = new WhileStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Whlst.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2239,8 +2280,8 @@ case 182: yyVal=Whlst; } break; -case 183: - // line 1609 "./../src/mycompiler/myparser/JavaParser.jay" +case 186: + // line 1653 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-6+yyTop]).getOffset(),((Expr)yyVals[-6+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-6+yyTop])); @@ -2252,8 +2293,8 @@ case 183: yyVal = Fst; } break; -case 184: - // line 1621 "./../src/mycompiler/myparser/JavaParser.jay" +case 187: + // line 1665 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-5+yyTop])); @@ -2264,8 +2305,8 @@ case 184: yyVal = Fst; } break; -case 185: - // line 1632 "./../src/mycompiler/myparser/JavaParser.jay" +case 188: + // line 1676 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-5+yyTop])); @@ -2276,8 +2317,8 @@ case 185: yyVal = Fst; } break; -case 186: - // line 1643 "./../src/mycompiler/myparser/JavaParser.jay" +case 189: + // line 1687 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); Fst.set_head_Condition(((Expr)yyVals[-4+yyTop])); @@ -2288,8 +2329,8 @@ case 186: yyVal = Fst; } break; -case 187: - // line 1654 "./../src/mycompiler/myparser/JavaParser.jay" +case 190: + // line 1698 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-4+yyTop])); @@ -2299,8 +2340,8 @@ case 187: yyVal = Fst; } break; -case 188: - // line 1664 "./../src/mycompiler/myparser/JavaParser.jay" +case 191: + // line 1708 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-3+yyTop]).getOffset(),((Expr)yyVals[-3+yyTop]).getVariableLength()); Fst.set_head_Condition(((Expr)yyVals[-3+yyTop])); @@ -2310,8 +2351,8 @@ case 188: yyVal = Fst; } break; -case 189: - // line 1674 "./../src/mycompiler/myparser/JavaParser.jay" +case 192: + // line 1718 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Fst.set_head_Loop_expr(((Expr)yyVals[-2+yyTop])); @@ -2321,8 +2362,8 @@ case 189: yyVal = Fst; } break; -case 190: - // line 1684 "./../src/mycompiler/myparser/JavaParser.jay" +case 193: + // line 1728 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Statement)yyVals[0+yyTop]).getOffset(),((Statement)yyVals[0+yyTop]).getVariableLength()); Fst.set_body_Loop_block(((Statement)yyVals[0+yyTop])); @@ -2331,73 +2372,73 @@ case 190: yyVal = Fst; } break; -case 191: - // line 1693 "./../src/mycompiler/myparser/JavaParser.jay" +case 194: + // line 1737 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("conditionalexpression"); yyVal=((Expr)yyVals[0+yyTop]); } break; -case 192: - // line 1698 "./../src/mycompiler/myparser/JavaParser.jay" +case 195: + // line 1742 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Assign)yyVals[0+yyTop]); } break; -case 193: - // line 1704 "./../src/mycompiler/myparser/JavaParser.jay" +case 196: + // line 1748 "./../src/mycompiler/myparser/JavaParser.jay" { EmptyStmt Empst = new EmptyStmt(); yyVal=Empst; } break; -case 194: - // line 1710 "./../src/mycompiler/myparser/JavaParser.jay" +case 197: + // line 1754 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[-1+yyTop]); } break; -case 195: - // line 1715 "./../src/mycompiler/myparser/JavaParser.jay" +case 198: + // line 1759 "./../src/mycompiler/myparser/JavaParser.jay" { Return ret = new Return(-1,-1); yyVal= ret; } break; -case 196: - // line 1720 "./../src/mycompiler/myparser/JavaParser.jay" +case 199: + // line 1764 "./../src/mycompiler/myparser/JavaParser.jay" { Return retexp = new Return(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); retexp.set_ReturnExpr(((Expr)yyVals[-1+yyTop])); yyVal=retexp; } break; -case 197: - // line 1727 "./../src/mycompiler/myparser/JavaParser.jay" +case 200: + // line 1771 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; -case 198: - // line 1731 "./../src/mycompiler/myparser/JavaParser.jay" +case 201: + // line 1775 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; -case 199: - // line 1735 "./../src/mycompiler/myparser/JavaParser.jay" +case 202: + // line 1779 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((WhileStmt)yyVals[0+yyTop]); } break; -case 200: - // line 1740 "./../src/mycompiler/myparser/JavaParser.jay" +case 203: + // line 1784 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 201: - // line 1746 "./../src/mycompiler/myparser/JavaParser.jay" +case 204: + // line 1790 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n"); Assign Ass = new Assign(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2423,8 +2464,8 @@ case 201: yyVal=Ass; } break; -case 202: - // line 1771 "./../src/mycompiler/myparser/JavaParser.jay" +case 205: + // line 1815 "./../src/mycompiler/myparser/JavaParser.jay" { Assign Ass =new Assign(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); LocalOrFieldVar LOFV = new LocalOrFieldVar(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2447,44 +2488,44 @@ case 202: yyVal=Ass; } break; -case 203: - // line 1794 "./../src/mycompiler/myparser/JavaParser.jay" +case 206: + // line 1838 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Assign)yyVals[0+yyTop]); } break; -case 204: - // line 1798 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 205: - // line 1802 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 206: - // line 1806 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; case 207: - // line 1810 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1842 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 208: - // line 1814 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1846 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 209: + // line 1850 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 210: + // line 1854 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 211: + // line 1858 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((MethodCall)yyVals[0+yyTop]); } break; -case 209: - // line 1825 "./../src/mycompiler/myparser/JavaParser.jay" +case 212: + // line 1869 "./../src/mycompiler/myparser/JavaParser.jay" { IfStmt IfElno = new IfStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); IfElno.set_Expr(((Expr)yyVals[-4+yyTop])); @@ -2493,8 +2534,8 @@ case 209: yyVal=IfElno; } break; -case 210: - // line 1834 "./../src/mycompiler/myparser/JavaParser.jay" +case 213: + // line 1878 "./../src/mycompiler/myparser/JavaParser.jay" { WhileStmt Whstno = new WhileStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Whstno.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2502,14 +2543,14 @@ case 210: yyVal=Whstno; } break; -case 211: - // line 1842 "./../src/mycompiler/myparser/JavaParser.jay" +case 214: + // line 1886 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 212: - // line 1846 "./../src/mycompiler/myparser/JavaParser.jay" +case 215: + // line 1890 "./../src/mycompiler/myparser/JavaParser.jay" { Binary LogOr = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); OrOp OrO = new OrOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2520,20 +2561,20 @@ case 212: yyVal=LogOr; } break; -case 213: - // line 1859 "./../src/mycompiler/myparser/JavaParser.jay" +case 216: + // line 1903 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=null; } break; -case 214: - // line 1864 "./../src/mycompiler/myparser/JavaParser.jay" +case 217: + // line 1908 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; -case 215: - // line 1868 "./../src/mycompiler/myparser/JavaParser.jay" +case 218: + // line 1912 "./../src/mycompiler/myparser/JavaParser.jay" { /*Lambdabody kann auch nur aus einer Expression bestehen. In diesem Fall wird ein Block erstellt, welcher als einziges Statement ein return statment mit der expression hat.*/ /*Bsp.: Aus der Expression |var=="hallo"| wird: |{return var=="hallo";}|*/ @@ -2543,20 +2584,20 @@ case 215: yyVal=ret; } break; -case 216: - // line 1878 "./../src/mycompiler/myparser/JavaParser.jay" +case 219: + // line 1922 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=null; } break; -case 217: - // line 1882 "./../src/mycompiler/myparser/JavaParser.jay" +case 220: + // line 1926 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((ParameterList)yyVals[-1+yyTop]); } break; -case 218: - // line 1887 "./../src/mycompiler/myparser/JavaParser.jay" +case 221: + // line 1931 "./../src/mycompiler/myparser/JavaParser.jay" { LambdaExpression lambda = new LambdaExpression(/*((ParameSterList)$2).getOffset(),((ParameterList)$2).getVariableLength()*/0,0); if(((ParameterList)yyVals[-2+yyTop])!=null)lambda.setParameterList(((ParameterList)yyVals[-2+yyTop])); @@ -2564,87 +2605,87 @@ case 218: yyVal=lambda; } break; -case 219: - // line 1906 "./../src/mycompiler/myparser/JavaParser.jay" +case 222: + // line 1950 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((UsedId)yyVals[0+yyTop]); } break; -case 220: - // line 1911 "./../src/mycompiler/myparser/JavaParser.jay" +case 223: + // line 1955 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=null; } break; -case 221: - // line 1915 "./../src/mycompiler/myparser/JavaParser.jay" +case 224: + // line 1959 "./../src/mycompiler/myparser/JavaParser.jay" { TimesOp TEO = new TimesOp(-1,-1); yyVal=TEO; } break; -case 222: - // line 1920 "./../src/mycompiler/myparser/JavaParser.jay" +case 225: + // line 1964 "./../src/mycompiler/myparser/JavaParser.jay" { DivideOp DEO = new DivideOp(-1,-1); yyVal=DEO; } break; -case 223: - // line 1925 "./../src/mycompiler/myparser/JavaParser.jay" +case 226: + // line 1969 "./../src/mycompiler/myparser/JavaParser.jay" { ModuloOp MEO = new ModuloOp(-1,-1); yyVal=MEO; } break; -case 224: - // line 1930 "./../src/mycompiler/myparser/JavaParser.jay" +case 227: + // line 1974 "./../src/mycompiler/myparser/JavaParser.jay" { PlusOp PEO = new PlusOp(-1,-1); yyVal=PEO; } break; -case 225: - // line 1935 "./../src/mycompiler/myparser/JavaParser.jay" +case 228: + // line 1979 "./../src/mycompiler/myparser/JavaParser.jay" { MinusOp MEO = new MinusOp(-1,-1); yyVal=MEO; } break; -case 226: - // line 1947 "./../src/mycompiler/myparser/JavaParser.jay" +case 229: + // line 1991 "./../src/mycompiler/myparser/JavaParser.jay" { PreIncExpr PRINC = new PreIncExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); PRINC.set_Expr(((Expr)yyVals[0+yyTop])); yyVal=PRINC; } break; -case 227: - // line 1954 "./../src/mycompiler/myparser/JavaParser.jay" +case 230: + // line 1998 "./../src/mycompiler/myparser/JavaParser.jay" { PreDecExpr PRDEC = new PreDecExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); PRDEC.set_Expr(((Expr)yyVals[0+yyTop])); yyVal=PRDEC; } break; -case 228: - // line 1961 "./../src/mycompiler/myparser/JavaParser.jay" +case 231: + // line 2005 "./../src/mycompiler/myparser/JavaParser.jay" { PostIncExpr PIE = new PostIncExpr(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); PIE.set_Expr(((Expr)yyVals[-1+yyTop])); yyVal=PIE; } break; -case 229: - // line 1968 "./../src/mycompiler/myparser/JavaParser.jay" +case 232: + // line 2012 "./../src/mycompiler/myparser/JavaParser.jay" { PostDecExpr PDE = new PostDecExpr(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); PDE.set_Expr(((Expr)yyVals[-1+yyTop])); yyVal=PDE; } break; -case 230: - // line 1976 "./../src/mycompiler/myparser/JavaParser.jay" +case 233: + // line 2020 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M1"); MethodCall MC = new MethodCall(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2675,8 +2716,8 @@ case 230: yyVal=MC; } break; -case 231: - // line 2006 "./../src/mycompiler/myparser/JavaParser.jay" +case 234: + // line 2050 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M2"); MethodCall MCarg = new MethodCall(((UsedId)yyVals[-3+yyTop]).getOffset(),((UsedId)yyVals[-3+yyTop]).getVariableLength()); @@ -2708,8 +2749,8 @@ case 231: yyVal=MCarg; } break; -case 232: - // line 2037 "./../src/mycompiler/myparser/JavaParser.jay" +case 235: + // line 2081 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M3"); MethodCall MCpr = new MethodCall(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); @@ -2729,8 +2770,8 @@ case 232: yyVal=MCpr; } break; -case 233: - // line 2056 "./../src/mycompiler/myparser/JavaParser.jay" +case 236: + // line 2100 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M4"); MethodCall MCPA = new MethodCall(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); @@ -2751,8 +2792,8 @@ case 233: yyVal=MCPA; } break; -case 234: - // line 2079 "./../src/mycompiler/myparser/JavaParser.jay" +case 237: + // line 2123 "./../src/mycompiler/myparser/JavaParser.jay" { NewClass NC = new NewClass(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); NC.set_UsedId(((UsedId)yyVals[-2+yyTop])); @@ -2761,8 +2802,8 @@ case 234: yyVal=NC; } break; -case 235: - // line 2087 "./../src/mycompiler/myparser/JavaParser.jay" +case 238: + // line 2131 "./../src/mycompiler/myparser/JavaParser.jay" { NewClass NCarg = new NewClass(((UsedId)yyVals[-3+yyTop]).getOffset(),((UsedId)yyVals[-3+yyTop]).getVariableLength()); NCarg.set_UsedId(((UsedId)yyVals[-3+yyTop])); @@ -2772,14 +2813,14 @@ case 235: yyVal=NCarg; } break; -case 236: - // line 2097 "./../src/mycompiler/myparser/JavaParser.jay" +case 239: + // line 2141 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 237: - // line 2101 "./../src/mycompiler/myparser/JavaParser.jay" +case 240: + // line 2145 "./../src/mycompiler/myparser/JavaParser.jay" { Binary And = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); AndOp AndO = new AndOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2790,20 +2831,20 @@ case 237: yyVal=And; } break; -case 238: - // line 2117 "./../src/mycompiler/myparser/JavaParser.jay" +case 241: + // line 2161 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 239: - // line 2121 "./../src/mycompiler/myparser/JavaParser.jay" +case 242: + // line 2165 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 240: - // line 2125 "./../src/mycompiler/myparser/JavaParser.jay" +case 243: + // line 2169 "./../src/mycompiler/myparser/JavaParser.jay" { PositivExpr POSEX=new PositivExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryPlus UP= new UnaryPlus(); @@ -2812,8 +2853,8 @@ case 240: yyVal=POSEX; } break; -case 241: - // line 2133 "./../src/mycompiler/myparser/JavaParser.jay" +case 244: + // line 2177 "./../src/mycompiler/myparser/JavaParser.jay" { NegativeExpr NEGEX=new NegativeExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryMinus UM=new UnaryMinus(); @@ -2822,20 +2863,20 @@ case 241: yyVal=NEGEX; } break; -case 242: - // line 2141 "./../src/mycompiler/myparser/JavaParser.jay" +case 245: + // line 2185 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 243: - // line 2146 "./../src/mycompiler/myparser/JavaParser.jay" +case 246: + // line 2190 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 244: - // line 2150 "./../src/mycompiler/myparser/JavaParser.jay" +case 247: + // line 2194 "./../src/mycompiler/myparser/JavaParser.jay" { if (((UsedId)yyVals[0+yyTop]).get_Name().size() > 1) { @@ -2854,38 +2895,38 @@ case 244: } } break; -case 245: - // line 2168 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 246: - // line 2172 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 247: - // line 2177 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; case 248: - // line 2182 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2212 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 249: + // line 2216 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 250: - // line 2188 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2221 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 251: + // line 2226 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 253: + // line 2232 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Literal)yyVals[0+yyTop]); } break; -case 251: - // line 2192 "./../src/mycompiler/myparser/JavaParser.jay" +case 254: + // line 2236 "./../src/mycompiler/myparser/JavaParser.jay" { This T = new This(((Token)yyVals[0+yyTop]).getOffset(),((Token)yyVals[0+yyTop]).getLexem().length()); UsedId UT = new UsedId(((Token)yyVals[0+yyTop]).getOffset()); @@ -2894,24 +2935,24 @@ case 251: yyVal=T; } break; -case 252: - // line 2213 "./../src/mycompiler/myparser/JavaParser.jay" +case 255: + // line 2257 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((MethodCall)yyVals[0+yyTop]); } break; -case 253: - // line 2217 "./../src/mycompiler/myparser/JavaParser.jay" +case 256: + // line 2261 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 254: - // line 2222 "./../src/mycompiler/myparser/JavaParser.jay" +case 257: + // line 2266 "./../src/mycompiler/myparser/JavaParser.jay" {yyVal=((Expr)yyVals[0+yyTop]);} break; -case 255: - // line 2224 "./../src/mycompiler/myparser/JavaParser.jay" +case 258: + // line 2268 "./../src/mycompiler/myparser/JavaParser.jay" {NotExpr NE=new NotExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryNot UN=new UnaryNot(); NE.set_UnaryNot(UN); @@ -2919,75 +2960,75 @@ case 255: yyVal=NE; } break; -case 256: - // line 2230 "./../src/mycompiler/myparser/JavaParser.jay" +case 259: + // line 2274 "./../src/mycompiler/myparser/JavaParser.jay" {yyVal=((CastExpr)yyVals[0+yyTop]);} break; -case 257: - // line 2232 "./../src/mycompiler/myparser/JavaParser.jay" +case 260: + // line 2276 "./../src/mycompiler/myparser/JavaParser.jay" {yyVal=((Expr)yyVals[0+yyTop]);} break; -case 259: - // line 2237 "./../src/mycompiler/myparser/JavaParser.jay" +case 262: + // line 2281 "./../src/mycompiler/myparser/JavaParser.jay" {IntLiteral IL = new IntLiteral(); IL.set_Int(((Token)yyVals[0+yyTop]).String2Int()); yyVal = IL; } break; -case 260: - // line 2242 "./../src/mycompiler/myparser/JavaParser.jay" +case 263: + // line 2286 "./../src/mycompiler/myparser/JavaParser.jay" {BoolLiteral BL = new BoolLiteral(); BL.set_Bool(((Token)yyVals[0+yyTop]).String2Bool()); yyVal = BL; } break; -case 261: - // line 2246 "./../src/mycompiler/myparser/JavaParser.jay" +case 264: + // line 2290 "./../src/mycompiler/myparser/JavaParser.jay" {CharLiteral CL = new CharLiteral(); CL.set_Char(((Token)yyVals[0+yyTop]).CharInString()); yyVal=CL; } break; -case 262: - // line 2251 "./../src/mycompiler/myparser/JavaParser.jay" +case 265: + // line 2295 "./../src/mycompiler/myparser/JavaParser.jay" { StringLiteral ST = new StringLiteral(); ST.set_String(((Token)yyVals[0+yyTop]).get_String()); yyVal=ST; } break; -case 263: - // line 2256 "./../src/mycompiler/myparser/JavaParser.jay" +case 266: + // line 2300 "./../src/mycompiler/myparser/JavaParser.jay" { LongLiteral LL = new LongLiteral(); LL.set_Long(((Token)yyVals[0+yyTop]).String2Long()); yyVal = LL; } break; -case 264: - // line 2260 "./../src/mycompiler/myparser/JavaParser.jay" +case 267: + // line 2304 "./../src/mycompiler/myparser/JavaParser.jay" { FloatLiteral FL = new FloatLiteral(); FL.set_Float(((Token)yyVals[0+yyTop]).String2Float()); yyVal = FL; } break; -case 265: - // line 2265 "./../src/mycompiler/myparser/JavaParser.jay" +case 268: + // line 2309 "./../src/mycompiler/myparser/JavaParser.jay" { DoubleLiteral DL = new DoubleLiteral(); DL.set_Double(((Token)yyVals[0+yyTop]).String2Double()); yyVal = DL; } break; -case 266: - // line 2271 "./../src/mycompiler/myparser/JavaParser.jay" +case 269: + // line 2315 "./../src/mycompiler/myparser/JavaParser.jay" { Null NN = new Null(); yyVal=NN; } break; -case 267: - // line 2277 "./../src/mycompiler/myparser/JavaParser.jay" +case 270: + // line 2321 "./../src/mycompiler/myparser/JavaParser.jay" { CastExpr CaEx=new CastExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); CaEx.set_Type(((BaseType)yyVals[-2+yyTop])); @@ -2995,25 +3036,25 @@ case 267: yyVal=CaEx; } break; -case 268: - // line 2286 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 269: - // line 2290 "./../src/mycompiler/myparser/JavaParser.jay" - { - } - break; -case 270: - // line 2294 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; case 271: - // line 2298 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2330 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 272: + // line 2334 "./../src/mycompiler/myparser/JavaParser.jay" + { + } + break; +case 273: + // line 2338 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 274: + // line 2342 "./../src/mycompiler/myparser/JavaParser.jay" { Binary EQ = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); EqualOp EO = new EqualOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3024,8 +3065,8 @@ case 271: yyVal=EQ; } break; -case 272: - // line 2308 "./../src/mycompiler/myparser/JavaParser.jay" +case 275: + // line 2352 "./../src/mycompiler/myparser/JavaParser.jay" { Binary NEQ = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); NotEqualOp NEO = new NotEqualOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3036,14 +3077,14 @@ case 272: yyVal=NEQ; } break; -case 273: - // line 2319 "./../src/mycompiler/myparser/JavaParser.jay" +case 276: + // line 2363 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 274: - // line 2323 "./../src/mycompiler/myparser/JavaParser.jay" +case 277: + // line 2367 "./../src/mycompiler/myparser/JavaParser.jay" { Binary LO = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); LessOp LOO = new LessOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3054,8 +3095,8 @@ case 274: yyVal=LO; } break; -case 275: - // line 2333 "./../src/mycompiler/myparser/JavaParser.jay" +case 278: + // line 2377 "./../src/mycompiler/myparser/JavaParser.jay" { Binary GO = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); GreaterOp GOO = new GreaterOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3066,8 +3107,8 @@ case 275: yyVal=GO; } break; -case 276: - // line 2343 "./../src/mycompiler/myparser/JavaParser.jay" +case 279: + // line 2387 "./../src/mycompiler/myparser/JavaParser.jay" { Binary LE = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); LessEquOp LEO = new LessEquOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3078,8 +3119,8 @@ case 276: yyVal=LE; } break; -case 277: - // line 2353 "./../src/mycompiler/myparser/JavaParser.jay" +case 280: + // line 2397 "./../src/mycompiler/myparser/JavaParser.jay" { Binary GE = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); GreaterEquOp GEO = new GreaterEquOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3090,8 +3131,8 @@ case 277: yyVal=GE; } break; -case 278: - // line 2363 "./../src/mycompiler/myparser/JavaParser.jay" +case 281: + // line 2407 "./../src/mycompiler/myparser/JavaParser.jay" { InstanceOf ISO=new InstanceOf(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); ISO.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -3099,20 +3140,20 @@ case 278: yyVal=ISO; } break; -case 279: - // line 2371 "./../src/mycompiler/myparser/JavaParser.jay" +case 282: + // line 2415 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 280: - // line 2376 "./../src/mycompiler/myparser/JavaParser.jay" +case 283: + // line 2420 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 281: - // line 2380 "./../src/mycompiler/myparser/JavaParser.jay" +case 284: + // line 2424 "./../src/mycompiler/myparser/JavaParser.jay" { Binary AD = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); PlusOp PO = new PlusOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3123,8 +3164,8 @@ case 281: yyVal=AD; } break; -case 282: - // line 2390 "./../src/mycompiler/myparser/JavaParser.jay" +case 285: + // line 2434 "./../src/mycompiler/myparser/JavaParser.jay" { Binary MI = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); MinusOp MO = new MinusOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3135,14 +3176,14 @@ case 282: yyVal=MI; } break; -case 283: - // line 2401 "./../src/mycompiler/myparser/JavaParser.jay" +case 286: + // line 2445 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 284: - // line 2405 "./../src/mycompiler/myparser/JavaParser.jay" +case 287: + // line 2449 "./../src/mycompiler/myparser/JavaParser.jay" { Binary ML = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); TimesOp TO = new TimesOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3153,8 +3194,8 @@ case 284: yyVal=ML; } break; -case 285: - // line 2415 "./../src/mycompiler/myparser/JavaParser.jay" +case 288: + // line 2459 "./../src/mycompiler/myparser/JavaParser.jay" { Binary DV = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); DivideOp DO = new DivideOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3165,8 +3206,8 @@ case 285: yyVal = DV; } break; -case 286: - // line 2425 "./../src/mycompiler/myparser/JavaParser.jay" +case 289: + // line 2469 "./../src/mycompiler/myparser/JavaParser.jay" { Binary MD = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); ModuloOp MO = new ModuloOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3177,7 +3218,7 @@ case 286: yyVal =MD; } break; - // line 3181 "-" + // line 3222 "-" } yyTop -= yyLen[yyN]; yyState = yyStates[yyTop]; @@ -3208,35 +3249,35 @@ case 286: } protected static final short yyLhs [] = { -1, - 0, 0, 0, 0, 0, 99, 27, 27, 26, 93, - 93, 28, 28, 106, 106, 24, 25, 25, 23, 1, + 0, 0, 0, 0, 0, 100, 28, 28, 27, 94, + 94, 29, 29, 107, 107, 25, 26, 26, 23, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 8, - 8, 2, 2, 2, 2, 113, 113, 113, 113, 113, - 113, 116, 116, 116, 7, 7, 41, 41, 29, 33, - 33, 3, 3, 34, 34, 16, 16, 42, 42, 42, - 42, 42, 42, 30, 4, 4, 32, 17, 17, 17, - 31, 114, 114, 115, 115, 5, 5, 18, 18, 111, - 107, 107, 10, 6, 20, 20, 11, 12, 12, 12, - 12, 12, 12, 14, 43, 43, 108, 108, 109, 109, - 109, 109, 49, 95, 98, 98, 94, 94, 96, 96, - 97, 97, 13, 13, 13, 13, 13, 13, 13, 13, + 8, 2, 2, 2, 2, 114, 114, 114, 114, 114, + 114, 117, 117, 117, 7, 7, 42, 42, 30, 34, + 34, 3, 3, 35, 35, 16, 16, 43, 43, 43, + 43, 43, 43, 31, 4, 4, 33, 17, 17, 17, + 24, 24, 32, 115, 115, 116, 116, 5, 5, 18, + 18, 112, 108, 108, 10, 6, 20, 20, 11, 12, + 12, 12, 12, 12, 12, 14, 44, 44, 109, 109, + 110, 110, 110, 110, 50, 96, 99, 99, 95, 95, + 97, 97, 98, 98, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 40, 40, 40, 40, 19, 19, 44, - 45, 45, 51, 51, 110, 110, 39, 39, 15, 15, - 37, 37, 38, 21, 81, 81, 50, 50, 104, 104, - 36, 22, 79, 47, 82, 82, 82, 82, 82, 72, - 72, 35, 35, 48, 48, 80, 80, 80, 80, 87, - 88, 84, 85, 85, 85, 85, 85, 85, 85, 85, - 70, 70, 90, 78, 91, 91, 83, 83, 83, 69, - 100, 100, 73, 73, 73, 73, 73, 73, 89, 86, - 68, 68, 102, 46, 46, 52, 52, 71, 103, 101, - 101, 101, 101, 101, 101, 74, 75, 76, 77, 105, - 105, 105, 105, 92, 92, 67, 67, 58, 58, 58, - 58, 58, 56, 56, 56, 56, 55, 66, 66, 54, - 54, 54, 54, 57, 57, 57, 65, 65, 53, 53, - 53, 53, 53, 53, 53, 53, 112, 64, 64, 63, - 63, 63, 62, 62, 62, 62, 62, 62, 61, 60, - 60, 60, 59, 59, 59, 59, + 13, 13, 13, 13, 13, 41, 41, 41, 41, 19, + 19, 45, 46, 46, 52, 52, 111, 111, 40, 40, + 15, 15, 38, 38, 118, 39, 21, 82, 82, 51, + 51, 105, 105, 37, 22, 80, 48, 83, 83, 83, + 83, 83, 73, 73, 36, 36, 49, 49, 81, 81, + 81, 81, 88, 89, 85, 86, 86, 86, 86, 86, + 86, 86, 86, 71, 71, 91, 79, 92, 92, 84, + 84, 84, 70, 101, 101, 74, 74, 74, 74, 74, + 74, 90, 87, 69, 69, 103, 47, 47, 53, 53, + 72, 104, 102, 102, 102, 102, 102, 102, 75, 76, + 77, 78, 106, 106, 106, 106, 93, 93, 68, 68, + 59, 59, 59, 59, 59, 57, 57, 57, 57, 56, + 67, 67, 55, 55, 55, 55, 58, 58, 58, 66, + 66, 54, 54, 54, 54, 54, 54, 54, 54, 113, + 65, 65, 64, 64, 64, 63, 63, 63, 63, 63, + 63, 62, 61, 61, 61, 60, 60, 60, 60, }; protected static final short yyLen [] = { 2, 1, 2, 3, 2, 3, 3, 1, 2, 3, 1, @@ -3246,92 +3287,92 @@ case 286: 3, 1, 3, 3, 2, 3, 1, 2, 2, 2, 3, 2, 3, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, - 2, 1, 3, 0, 3, 1, 1, 1, 1, 2, - 2, 3, 6, 2, 3, 1, 3, 2, 3, 4, - 2, 3, 4, 2, 2, 3, 3, 4, 2, 3, - 3, 4, 2, 1, 1, 3, 1, 3, 1, 3, - 1, 3, 3, 2, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, - 2, 2, 3, 1, 3, 1, 3, 1, 3, 1, - 1, 2, 1, 3, 4, 5, 1, 3, 3, 4, - 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, - 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 2, 1, 1, 1, 1, 1, 5, - 7, 5, 9, 8, 8, 8, 7, 7, 7, 6, - 1, 1, 1, 2, 2, 3, 1, 1, 1, 1, - 3, 3, 1, 1, 1, 1, 1, 1, 7, 5, - 1, 3, 1, 1, 1, 2, 3, 3, 1, 1, - 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, - 4, 5, 6, 4, 5, 1, 3, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, - 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, - 1, 1, 1, 1, 1, 1, 4, 1, 3, 1, - 3, 3, 1, 3, 3, 3, 3, 3, 1, 1, - 3, 3, 1, 3, 3, 3, + 1, 3, 2, 1, 3, 0, 3, 1, 1, 1, + 1, 2, 2, 3, 6, 2, 3, 1, 3, 2, + 3, 4, 2, 3, 4, 2, 2, 3, 3, 4, + 2, 3, 3, 4, 2, 1, 1, 3, 1, 3, + 1, 3, 1, 3, 3, 2, 3, 4, 3, 4, + 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, + 1, 2, 2, 2, 3, 1, 3, 1, 3, 1, + 3, 1, 1, 2, 1, 3, 4, 5, 1, 3, + 3, 4, 1, 1, 2, 1, 1, 1, 1, 2, + 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, + 1, 1, 5, 7, 5, 9, 8, 8, 8, 7, + 7, 7, 6, 1, 1, 1, 2, 2, 3, 1, + 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, + 1, 7, 5, 1, 3, 1, 1, 1, 2, 3, + 3, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 3, 4, 5, 6, 4, 5, 1, 3, + 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, + 3, 1, 1, 1, 1, 1, 1, 1, 1, 4, + 1, 3, 1, 3, 3, 1, 3, 3, 3, 3, + 3, 1, 1, 3, 3, 1, 3, 3, 3, }; protected static final short yyDefRed [] = { 0, - 62, 151, 173, 0, 63, 172, 60, 59, 58, 0, + 62, 153, 176, 0, 63, 175, 60, 59, 58, 0, 0, 0, 61, 19, 0, 14, 15, 0, 7, 0, - 153, 161, 152, 0, 0, 0, 0, 47, 0, 0, + 156, 164, 154, 0, 0, 0, 0, 47, 0, 0, 10, 0, 0, 13, 12, 0, 0, 0, 0, 0, - 0, 71, 8, 0, 0, 0, 0, 0, 0, 48, + 0, 73, 8, 0, 0, 0, 0, 0, 0, 48, 11, 0, 0, 0, 0, 0, 0, 20, 0, 0, - 6, 0, 9, 0, 0, 0, 0, 32, 0, 72, - 0, 135, 137, 5, 0, 0, 0, 0, 104, 105, + 6, 0, 9, 0, 0, 0, 0, 32, 0, 74, + 0, 137, 139, 5, 0, 0, 0, 0, 106, 107, 0, 49, 64, 67, 50, 0, 0, 0, 0, 45, - 0, 78, 0, 79, 0, 0, 56, 68, 0, 0, - 0, 154, 0, 0, 0, 70, 0, 69, 22, 0, + 0, 80, 0, 81, 0, 0, 56, 68, 0, 0, + 0, 157, 0, 0, 0, 70, 0, 69, 22, 0, 0, 24, 16, 0, 18, 0, 54, 0, 52, 0, - 65, 77, 76, 0, 0, 0, 0, 0, 34, 0, - 75, 21, 0, 0, 33, 0, 0, 0, 31, 0, - 80, 0, 0, 0, 111, 0, 0, 130, 0, 140, - 94, 0, 132, 46, 57, 0, 91, 88, 0, 0, + 65, 79, 78, 0, 0, 0, 0, 0, 34, 0, + 77, 21, 0, 0, 33, 0, 0, 0, 31, 0, + 82, 0, 0, 0, 113, 0, 0, 132, 0, 142, + 96, 0, 134, 46, 57, 0, 93, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 81, 26, 51, 29, 53, 66, 0, 84, 0, 55, - 73, 23, 0, 25, 35, 109, 0, 106, 0, 0, - 0, 251, 0, 259, 263, 265, 264, 260, 266, 261, - 262, 0, 0, 0, 193, 95, 0, 0, 138, 0, - 0, 0, 176, 0, 155, 0, 0, 250, 247, 0, - 0, 253, 0, 204, 205, 0, 0, 178, 165, 141, - 156, 168, 169, 166, 167, 177, 179, 203, 0, 0, - 123, 149, 158, 0, 143, 0, 0, 87, 0, 0, - 0, 0, 147, 0, 162, 139, 0, 0, 0, 0, - 0, 0, 242, 283, 0, 0, 273, 0, 0, 0, - 0, 0, 0, 0, 191, 170, 85, 238, 239, 245, - 246, 171, 192, 252, 256, 97, 0, 117, 92, 89, - 0, 0, 0, 133, 0, 0, 82, 0, 99, 0, - 0, 0, 27, 0, 0, 0, 195, 0, 0, 0, - 226, 227, 216, 0, 0, 0, 96, 142, 164, 213, - 0, 0, 228, 229, 194, 224, 225, 221, 222, 223, - 220, 0, 157, 0, 150, 112, 127, 118, 90, 0, - 0, 0, 240, 241, 255, 0, 0, 0, 0, 0, + 83, 26, 51, 29, 53, 66, 0, 86, 0, 55, + 75, 23, 0, 25, 35, 111, 0, 108, 0, 0, + 0, 254, 0, 262, 266, 268, 267, 263, 269, 264, + 265, 0, 0, 0, 196, 97, 0, 0, 140, 0, + 0, 0, 179, 0, 158, 0, 0, 253, 250, 0, + 0, 256, 0, 207, 208, 0, 0, 181, 168, 143, + 159, 171, 172, 169, 170, 180, 182, 206, 0, 0, + 125, 151, 161, 0, 145, 0, 0, 89, 0, 0, + 0, 0, 149, 0, 165, 141, 0, 0, 0, 0, + 0, 0, 245, 286, 0, 0, 276, 0, 0, 0, + 0, 0, 0, 0, 194, 173, 87, 241, 242, 248, + 249, 174, 195, 255, 259, 99, 0, 119, 94, 91, + 0, 0, 0, 135, 0, 0, 84, 0, 101, 0, + 0, 0, 27, 0, 0, 0, 198, 0, 0, 0, + 229, 230, 219, 0, 0, 0, 98, 144, 167, 216, + 0, 0, 231, 232, 197, 227, 228, 224, 225, 226, + 223, 0, 160, 0, 152, 114, 129, 120, 92, 0, + 0, 0, 243, 244, 258, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 98, 124, 0, 0, 119, 93, 0, 101, - 100, 0, 0, 110, 0, 0, 0, 196, 0, 217, - 230, 159, 0, 214, 218, 215, 0, 201, 202, 144, - 148, 0, 0, 284, 285, 286, 0, 0, 278, 276, - 277, 274, 275, 0, 0, 0, 0, 0, 0, 0, - 128, 120, 0, 0, 102, 0, 0, 0, 0, 0, - 0, 0, 231, 0, 234, 0, 267, 145, 0, 83, - 0, 0, 0, 0, 0, 0, 0, 0, 180, 0, - 199, 198, 182, 160, 232, 0, 235, 146, 190, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 233, 189, - 188, 0, 187, 0, 0, 0, 0, 0, 181, 186, - 185, 184, 0, 0, 0, 183, 0, 210, 0, 209, + 0, 0, 100, 126, 0, 0, 121, 95, 0, 103, + 102, 0, 0, 112, 0, 0, 0, 199, 0, 220, + 233, 162, 0, 217, 221, 218, 0, 204, 205, 146, + 150, 0, 0, 287, 288, 289, 0, 0, 281, 279, + 280, 277, 278, 0, 0, 0, 0, 0, 0, 0, + 130, 122, 0, 0, 104, 0, 0, 0, 0, 0, + 0, 0, 234, 0, 237, 0, 270, 147, 0, 85, + 0, 0, 0, 0, 0, 0, 0, 0, 183, 0, + 202, 201, 185, 163, 235, 0, 238, 148, 193, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 236, 192, + 191, 0, 190, 0, 0, 0, 0, 0, 184, 189, + 188, 187, 0, 0, 0, 186, 0, 213, 0, 212, }; protected static final short yyDgoto [] = { 15, 16, 17, 68, 120, 121, 122, 58, 33, 40, 123, 91, 92, 93, 94, 95, 96, 97, 98, 208, 100, - 209, 102, 34, 35, 37, 19, 20, 211, 59, 82, - 21, 85, 60, 69, 22, 23, 24, 25, 254, 212, - 27, 28, 213, 151, 214, 385, 215, 216, 153, 245, - 314, 217, 218, 219, 220, 262, 263, 264, 265, 266, - 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, - 222, 382, 223, 278, 279, 280, 281, 228, 0, 229, - 230, 231, 440, 232, 233, 441, 234, 235, 442, 236, - 237, 282, 29, 79, 80, 187, 146, 81, 30, 283, - 332, 321, 239, 383, 284, 31, 106, 107, 171, 301, - 108, 285, 0, 71, 42, 0, + 209, 102, 34, 0, 35, 37, 19, 20, 211, 59, + 82, 21, 85, 60, 69, 22, 23, 24, 25, 254, + 212, 27, 28, 213, 151, 214, 385, 215, 216, 153, + 245, 314, 217, 218, 219, 220, 262, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 222, 382, 223, 278, 279, 280, 281, 228, 0, + 229, 230, 231, 440, 232, 233, 441, 234, 235, 442, + 236, 237, 282, 29, 79, 80, 187, 146, 81, 30, + 283, 332, 321, 239, 383, 284, 31, 106, 107, 171, + 301, 108, 285, 0, 71, 42, 0, 0, }; protected static final short yySindex [] = { 1033, 0, 0, 0, -231, 0, 0, 0, 0, 0, -209, @@ -3404,18 +3445,18 @@ case 286: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -29, 0, 0, 0, 0, 0, 542, 0, 173, + 0, -29, 0, 0, 0, 0, 0, 407, 0, 173, 681, 0, 0, 0, 0, 0, 0, 0, 0, 1019, 0, 0, 0, 0, 0, -55, -34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 39, 44, - 0, 544, 0, 52, 0, 0, 0, 0, 0, 0, + 0, 542, 0, 52, 0, 0, 0, 0, 0, 0, 0, 1997, 0, 0, 1723, 1618, 0, 5, 1629, 1122, 1133, 1294, 1338, 1406, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, 82, 0, 0, -12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1432, - 0, 0, 0, 0, 0, 545, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 544, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 301, 0, 0, 0, 0, 0, 0, 0, 0, @@ -3433,61 +3474,61 @@ case 286: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; - protected static final short yyGindex [] = { 558, - 0, 0, 84, 0, 486, 0, 77, 559, 563, 0, - 262, 0, 41, 0, 2633, 0, 512, 0, 36, 86, - 1, -116, 19, 0, 0, 69, 585, -10, 552, -134, - -50, 7, 12, 553, 0, 0, 359, -128, 0, 573, - 258, -1, -79, 0, -157, 0, 0, 0, 382, 285, - 92, 0, 0, 0, 0, -63, 0, -147, 128, 0, - 110, 115, 263, 277, 278, 276, 279, 0, 0, 311, - 0, -151, 0, -45, -6, 55, 121, 0, 0, -176, - -194, 2374, -82, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 351, -56, 504, 0, 0, 580, 0, 160, - 0, 0, 0, -196, 237, 356, 0, 549, 478, 0, - 0, 0, 0, 0, 0, 0, + protected static final short yyGindex [] = { 557, + 0, 0, 84, 0, 485, 0, 77, 558, 559, 0, + 262, 0, 41, 0, 2633, 0, 521, 0, 36, 86, + 1, -116, 19, 0, 0, 0, 69, 577, -10, 537, + -134, -50, 7, 12, 539, 0, 0, 361, -128, 0, + 573, 258, -1, -79, 0, -157, 0, 0, 0, 382, + 287, 92, 0, 0, 0, 0, -63, 0, -147, 128, + 0, 110, 115, 269, 270, 276, 277, 279, 0, 0, + 305, 0, -151, 0, -45, -6, 55, 121, 0, 0, + -176, -194, 2374, -82, 0, 0, 0, 0, 0, 0, + 0, 0, 311, 351, -56, 504, 0, 0, 579, 0, + 160, 0, 0, 0, -196, 237, 356, 0, 540, 478, + 0, 0, 0, 0, 0, 0, 0, 0, }; protected static final short yyTable [] = { 36, - 38, 74, 115, 206, 83, 84, 141, 277, 186, 242, - 19, 162, 300, 150, 162, 84, 19, 253, 18, 318, - 162, 19, 57, 286, 207, 50, 30, 243, 57, 162, - 19, 19, 145, 251, 67, 162, 19, 162, 28, 308, - 111, 270, 270, 243, 18, 270, 270, 270, 270, 270, - 270, 270, 19, 252, 129, 311, 312, 101, 128, 18, - 84, 19, 121, 270, 130, 18, 208, 19, 114, 32, - 110, 393, 117, 18, 18, 103, 221, 84, 162, 160, - 323, 324, 131, 131, 18, 18, 134, 354, 43, 355, - 243, 14, 99, 162, 224, 162, 101, 125, 270, 41, - 313, 83, 113, 50, 101, 318, 221, 125, 331, 18, - 103, 343, 344, 345, 103, 156, 122, 173, 129, 57, - 43, 45, 341, 103, 224, 50, 121, 333, 270, 18, - 157, 99, 114, 225, 180, 109, 112, 67, 18, 163, - 115, 243, 18, 372, 183, 18, 18, 131, 18, 252, + 38, 76, 115, 209, 83, 84, 141, 277, 186, 242, + 19, 165, 300, 150, 165, 84, 19, 253, 18, 318, + 165, 19, 57, 286, 210, 50, 30, 243, 57, 165, + 19, 19, 145, 254, 67, 165, 19, 165, 28, 308, + 111, 273, 273, 243, 18, 273, 273, 273, 273, 273, + 273, 273, 19, 255, 131, 311, 312, 101, 128, 18, + 84, 19, 123, 273, 130, 18, 211, 19, 116, 32, + 110, 393, 117, 18, 18, 103, 221, 84, 165, 160, + 323, 324, 131, 133, 18, 18, 134, 354, 43, 355, + 243, 14, 99, 165, 224, 165, 101, 127, 273, 41, + 313, 83, 115, 50, 101, 318, 221, 125, 331, 18, + 105, 343, 344, 345, 103, 156, 124, 173, 131, 57, + 43, 45, 341, 103, 224, 50, 123, 333, 273, 18, + 157, 99, 116, 225, 180, 109, 112, 67, 18, 163, + 117, 243, 18, 372, 183, 18, 18, 133, 18, 252, 221, 132, 129, 376, 377, 18, 256, 379, 210, 135, - 125, 125, 18, 225, 126, 116, 113, 55, 224, 386, - 18, 30, 414, 138, 103, 374, 144, 318, 18, 66, - 122, 56, 39, 28, 18, 30, 172, 56, 210, 164, + 125, 127, 18, 225, 128, 118, 115, 55, 224, 386, + 18, 30, 414, 138, 105, 374, 144, 318, 18, 66, + 124, 56, 39, 28, 18, 30, 172, 56, 210, 164, 336, 139, 310, 310, 226, 426, 138, 373, 394, 395, - 396, 156, 247, 296, 115, 391, 83, 225, 41, 182, - 184, 74, 13, 107, 174, 45, 289, 243, 13, 185, - 248, 416, 399, 418, 226, 18, 2, 446, 126, 116, - 3, 107, 210, 13, 251, 246, 221, 221, 46, 108, + 396, 156, 247, 296, 117, 391, 83, 225, 41, 182, + 184, 76, 13, 109, 174, 45, 289, 243, 13, 185, + 248, 416, 399, 418, 226, 18, 2, 446, 128, 118, + 3, 109, 210, 13, 251, 246, 221, 221, 46, 110, 2, 384, 6, 438, 3, 427, 54, 316, 310, 310, - 310, 287, 245, 245, 224, 224, 6, 108, 315, 303, - 227, 114, 19, 74, 62, 432, 63, 435, 226, 202, - 444, 19, 64, 246, 246, 18, 18, 19, 19, 19, + 310, 287, 248, 248, 224, 224, 6, 110, 315, 303, + 227, 114, 19, 76, 62, 432, 63, 435, 226, 202, + 444, 19, 64, 249, 249, 18, 18, 19, 19, 19, 72, 452, 454, 202, 19, 19, 19, 19, 62, 83, - 227, 19, 65, 225, 225, 251, 251, 438, 438, 238, - 351, 61, 438, 466, 467, 468, 270, 73, 221, 270, - 270, 270, 270, 270, 105, 252, 252, 2, 210, 210, + 227, 19, 65, 225, 225, 254, 254, 438, 438, 238, + 351, 61, 438, 466, 467, 468, 273, 73, 221, 273, + 273, 273, 273, 273, 105, 255, 255, 2, 210, 210, 335, 3, 18, 334, 127, 156, 224, 78, 124, 238, 352, 353, 113, 6, 227, 310, 310, 310, 310, 310, 368, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 18, 105, 226, 226, 221, 221, 18, 16, 202, 326, 327, 328, 329, 225, 166, 221, 330, 18, - 44, 137, 17, 238, 224, 224, 240, 127, 138, 2, + 44, 137, 17, 238, 224, 224, 240, 127, 140, 2, 53, 124, 310, 3, 51, 224, 221, 221, 166, 221, - 210, 477, 478, 86, 221, 6, 480, 140, 221, 51, + 210, 477, 478, 88, 221, 6, 480, 140, 221, 51, 221, 221, 77, 142, 224, 224, 240, 224, 51, 221, 221, 221, 224, 225, 225, 221, 224, 144, 224, 224, 227, 227, 14, 152, 225, 348, 226, 224, 224, 224, @@ -3495,7 +3536,7 @@ case 286: 3, 334, 334, 225, 225, 423, 225, 159, 422, 170, 240, 225, 6, 429, 161, 225, 422, 225, 225, 238, 238, 400, 401, 402, 403, 178, 225, 225, 225, 147, - 404, 405, 225, 74, 226, 226, 397, 398, 2, 118, + 404, 405, 225, 76, 226, 226, 397, 398, 2, 118, 13, 13, 3, 255, 290, 226, 13, 13, 13, 13, 302, 261, 227, 13, 6, 304, 447, 459, 258, 422, 422, 259, 305, 260, 226, 226, 2, 226, 306, 309, @@ -3508,27 +3549,27 @@ case 286: 227, 227, 26, 227, 456, 457, 458, 455, 227, 238, 238, 462, 227, 464, 227, 227, 473, 474, 475, 479, 238, 1, 2, 227, 227, 227, 4, 3, 47, 227, - 175, 134, 86, 174, 74, 176, 75, 155, 240, 238, - 238, 76, 238, 70, 52, 261, 342, 238, 390, 26, - 406, 238, 258, 238, 238, 259, 133, 260, 136, 104, - 337, 338, 238, 238, 238, 407, 409, 408, 238, 126, - 410, 188, 388, 389, 116, 0, 297, 0, 0, 0, - 0, 0, 0, 169, 261, 0, 240, 240, 0, 0, + 88, 136, 177, 74, 176, 75, 52, 76, 240, 238, + 238, 133, 238, 70, 136, 261, 155, 238, 342, 26, + 390, 238, 258, 238, 238, 259, 406, 260, 407, 104, + 337, 338, 238, 238, 238, 408, 388, 409, 238, 126, + 410, 188, 389, 116, 169, 0, 297, 0, 0, 0, + 0, 0, 0, 0, 261, 0, 240, 240, 0, 0, 0, 258, 413, 149, 259, 0, 260, 240, 104, 0, 0, 261, 364, 0, 0, 0, 367, 168, 258, 0, 0, 259, 0, 260, 0, 0, 240, 240, 0, 240, 0, 0, 126, 0, 240, 0, 177, 417, 240, 179, 240, 240, 181, 0, 0, 140, 0, 0, 0, 240, - 240, 240, 0, 0, 0, 240, 244, 244, 244, 0, - 0, 244, 244, 244, 244, 244, 0, 244, 0, 0, - 0, 0, 244, 257, 0, 0, 0, 0, 293, 244, - 244, 219, 244, 0, 0, 192, 411, 412, 0, 0, + 240, 240, 0, 0, 0, 240, 244, 247, 247, 0, + 0, 247, 247, 247, 247, 247, 0, 247, 0, 0, + 0, 0, 244, 257, 0, 0, 0, 0, 293, 247, + 247, 222, 247, 0, 0, 192, 411, 412, 0, 0, 0, 194, 195, 196, 197, 198, 199, 200, 201, 14, 0, 261, 0, 0, 0, 0, 203, 204, 258, 425, - 0, 259, 0, 260, 244, 0, 0, 257, 261, 244, + 0, 259, 0, 260, 247, 0, 0, 257, 261, 244, 0, 0, 0, 0, 0, 258, 431, 0, 259, 192, 260, 0, 0, 0, 257, 194, 195, 196, 197, 198, - 199, 200, 201, 14, 244, 0, 192, 0, 0, 0, + 199, 200, 201, 14, 247, 0, 192, 0, 0, 0, 203, 204, 194, 195, 196, 197, 198, 199, 200, 201, 14, 0, 261, 0, 0, 0, 0, 203, 204, 258, 244, 0, 259, 0, 260, 0, 0, 0, 0, 261, @@ -3543,142 +3584,142 @@ case 286: 200, 201, 14, 0, 0, 192, 0, 0, 0, 203, 204, 194, 195, 196, 197, 198, 199, 200, 201, 14, 0, 0, 261, 0, 0, 0, 203, 204, 0, 258, - 453, 0, 259, 244, 260, 0, 0, 0, 0, 261, + 453, 0, 259, 247, 260, 0, 0, 0, 0, 261, 0, 0, 0, 0, 0, 0, 258, 465, 0, 259, 0, 260, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 244, 244, 244, 244, 244, 244, 244, 244, - 0, 0, 0, 0, 219, 219, 219, 219, 261, 0, - 0, 219, 0, 257, 0, 258, 0, 0, 259, 0, + 0, 0, 247, 247, 247, 247, 247, 247, 247, 247, + 0, 0, 0, 0, 222, 222, 222, 222, 261, 0, + 0, 222, 0, 257, 0, 258, 0, 0, 259, 0, 260, 0, 0, 0, 0, 192, 0, 0, 0, 0, 257, 194, 195, 196, 197, 198, 199, 200, 201, 14, 0, 0, 192, 0, 0, 0, 203, 204, 194, 195, 196, 197, 198, 199, 200, 201, 14, 0, 0, 0, - 0, 0, 0, 203, 204, 243, 243, 0, 0, 243, - 243, 243, 243, 243, 257, 243, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 192, 243, 243, 0, - 243, 257, 194, 195, 196, 197, 198, 199, 200, 201, + 0, 0, 0, 203, 204, 246, 246, 0, 0, 246, + 246, 246, 246, 246, 257, 246, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 192, 246, 246, 0, + 246, 257, 194, 195, 196, 197, 198, 199, 200, 201, 14, 0, 0, 192, 0, 0, 0, 203, 204, 194, 195, 196, 197, 198, 199, 200, 201, 14, 0, 0, - 192, 0, 243, 0, 203, 204, 194, 195, 196, 197, + 192, 0, 246, 0, 203, 204, 194, 195, 196, 197, 198, 199, 200, 201, 14, 0, 0, 257, 0, 0, 0, 203, 204, 0, 0, 0, 0, 0, 0, 192, - 0, 0, 243, 0, 0, 194, 195, 196, 197, 198, - 199, 200, 201, 14, 0, 0, 0, 0, 257, 0, - 203, 204, 257, 257, 257, 257, 257, 257, 257, 248, - 248, 0, 0, 248, 248, 248, 248, 248, 248, 248, - 257, 257, 0, 257, 257, 0, 0, 0, 0, 0, - 0, 248, 248, 0, 248, 0, 192, 0, 0, 0, + 0, 0, 246, 0, 0, 194, 195, 196, 197, 198, + 199, 200, 201, 14, 0, 0, 0, 0, 260, 0, + 203, 204, 260, 260, 260, 260, 260, 260, 260, 251, + 251, 0, 0, 251, 251, 251, 251, 251, 251, 251, + 260, 260, 0, 260, 257, 0, 0, 0, 0, 0, + 0, 251, 251, 0, 251, 0, 192, 0, 0, 0, 0, 257, 194, 195, 196, 197, 198, 199, 200, 201, - 14, 0, 0, 192, 0, 257, 0, 203, 204, 194, + 14, 0, 0, 192, 0, 260, 0, 203, 204, 194, 195, 196, 197, 198, 199, 200, 201, 14, 0, 0, 1, 0, 0, 0, 203, 204, 4, 0, 0, 0, - 257, 0, 5, 0, 0, 257, 0, 0, 0, 7, - 8, 9, 192, 11, 12, 0, 248, 13, 194, 195, + 257, 0, 5, 0, 0, 260, 0, 0, 0, 7, + 8, 9, 192, 11, 12, 0, 251, 13, 194, 195, 196, 197, 198, 199, 200, 201, 14, 0, 0, 0, - 0, 0, 0, 203, 204, 74, 74, 0, 74, 74, - 74, 74, 74, 74, 74, 74, 0, 0, 0, 1, - 2, 243, 0, 0, 3, 4, 0, 74, 0, 0, - 74, 5, 0, 0, 0, 0, 6, 0, 7, 8, + 0, 0, 0, 203, 204, 76, 76, 0, 76, 76, + 76, 76, 76, 76, 76, 76, 0, 0, 0, 1, + 2, 246, 0, 0, 3, 4, 0, 76, 0, 0, + 76, 5, 0, 0, 0, 0, 6, 0, 7, 8, 9, 10, 11, 12, 0, 0, 13, 0, 0, 0, - 243, 243, 243, 243, 243, 243, 243, 243, 0, 74, - 236, 236, 74, 14, 236, 236, 236, 236, 236, 236, - 236, 0, 0, 0, 1, 0, 0, 0, 0, 0, - 48, 0, 236, 236, 0, 236, 5, 0, 0, 0, - 0, 74, 74, 7, 8, 9, 0, 0, 49, 0, - 0, 13, 0, 0, 211, 211, 0, 0, 211, 211, - 211, 211, 211, 211, 211, 0, 0, 236, 0, 0, - 0, 0, 1, 0, 257, 0, 211, 211, 4, 211, - 0, 0, 0, 0, 5, 248, 0, 0, 0, 0, + 246, 246, 246, 246, 246, 246, 246, 246, 0, 76, + 239, 239, 76, 14, 239, 239, 239, 239, 239, 239, + 239, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 48, 0, 239, 239, 0, 239, 5, 0, 0, 0, + 0, 76, 76, 7, 8, 9, 0, 0, 49, 0, + 0, 13, 0, 0, 214, 214, 0, 0, 214, 214, + 214, 214, 214, 214, 214, 0, 0, 239, 0, 0, + 0, 0, 1, 0, 260, 0, 214, 214, 4, 214, + 0, 0, 0, 0, 5, 251, 0, 0, 0, 0, 0, 7, 8, 9, 0, 0, 12, 0, 0, 13, - 0, 0, 0, 257, 257, 257, 257, 257, 257, 257, - 257, 211, 0, 0, 248, 248, 248, 248, 248, 248, - 248, 248, 200, 200, 0, 0, 200, 200, 200, 200, - 200, 200, 200, 0, 0, 0, 0, 0, 0, 0, - 0, 211, 0, 0, 200, 200, 0, 200, 244, 244, - 0, 0, 244, 244, 244, 244, 244, 0, 244, 0, + 0, 0, 0, 260, 260, 260, 260, 260, 260, 260, + 260, 214, 0, 0, 251, 251, 251, 251, 251, 251, + 251, 251, 203, 203, 0, 0, 203, 203, 203, 203, + 203, 203, 203, 0, 0, 0, 0, 0, 0, 0, + 0, 214, 0, 0, 203, 203, 0, 203, 247, 247, + 0, 0, 247, 247, 247, 247, 247, 0, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 244, 244, 0, 244, 0, 74, 74, 0, 0, 200, - 74, 74, 0, 0, 0, 0, 0, 74, 0, 0, - 0, 74, 74, 0, 74, 74, 74, 74, 74, 74, - 74, 0, 74, 0, 0, 244, 258, 0, 0, 200, - 258, 258, 258, 258, 258, 258, 258, 0, 0, 74, - 74, 74, 74, 74, 74, 74, 74, 74, 258, 258, - 0, 258, 237, 237, 0, 244, 237, 237, 237, 237, - 237, 237, 237, 249, 249, 0, 236, 249, 249, 249, - 249, 249, 249, 249, 237, 237, 0, 237, 0, 0, - 0, 0, 0, 258, 0, 249, 249, 0, 249, 0, - 0, 0, 0, 0, 0, 236, 236, 236, 236, 236, - 236, 236, 236, 0, 0, 0, 0, 0, 0, 237, - 211, 212, 212, 258, 0, 212, 212, 212, 212, 212, - 212, 212, 0, 0, 0, 0, 0, 0, 0, 0, - 134, 0, 0, 212, 212, 0, 212, 0, 0, 211, - 211, 211, 211, 211, 0, 211, 211, 0, 134, 0, - 249, 0, 0, 0, 279, 279, 0, 0, 279, 279, - 0, 279, 0, 279, 279, 268, 268, 0, 212, 268, - 268, 268, 268, 268, 268, 268, 279, 279, 200, 279, - 0, 0, 0, 0, 0, 0, 0, 268, 268, 0, - 268, 0, 0, 0, 0, 0, 0, 0, 212, 0, - 0, 0, 0, 0, 244, 0, 0, 200, 200, 200, - 200, 279, 200, 200, 200, 0, 0, 0, 0, 0, - 269, 269, 268, 0, 269, 269, 269, 269, 269, 269, - 269, 0, 0, 244, 244, 244, 244, 244, 244, 244, - 244, 279, 269, 269, 0, 269, 0, 0, 0, 271, - 271, 0, 268, 271, 271, 271, 271, 271, 271, 271, - 280, 0, 258, 280, 0, 280, 280, 280, 280, 0, - 0, 271, 0, 0, 0, 0, 0, 269, 0, 0, - 0, 280, 280, 0, 280, 0, 0, 0, 237, 0, - 0, 258, 258, 258, 258, 258, 258, 258, 258, 249, - 0, 0, 0, 0, 272, 272, 271, 269, 272, 272, - 272, 272, 272, 272, 272, 0, 280, 237, 237, 237, - 237, 237, 237, 237, 237, 0, 272, 0, 249, 249, - 249, 249, 249, 249, 249, 249, 271, 0, 0, 0, - 0, 0, 0, 134, 134, 0, 280, 212, 134, 134, - 0, 0, 0, 0, 0, 134, 0, 0, 0, 0, - 134, 272, 134, 134, 134, 134, 134, 134, 0, 0, - 134, 0, 0, 0, 165, 0, 212, 212, 212, 212, - 212, 0, 212, 212, 0, 0, 0, 134, 0, 281, - 279, 272, 281, 165, 281, 281, 281, 281, 0, 0, - 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, - 281, 281, 0, 281, 0, 0, 0, 0, 0, 279, - 279, 279, 279, 279, 279, 279, 279, 0, 0, 0, - 0, 268, 268, 0, 268, 268, 268, 268, 0, 0, - 0, 0, 0, 0, 0, 281, 282, 0, 0, 282, - 0, 282, 282, 282, 282, 0, 269, 165, 0, 165, - 0, 0, 0, 0, 0, 0, 89, 282, 282, 0, - 282, 0, 0, 0, 0, 281, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 269, 269, 0, 269, - 269, 269, 269, 0, 0, 280, 0, 0, 0, 0, - 0, 0, 282, 207, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 271, 0, 0, 271, 271, 271, - 271, 271, 205, 0, 280, 280, 280, 280, 280, 280, - 280, 280, 282, 254, 254, 0, 0, 254, 254, 254, - 254, 254, 254, 254, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 254, 254, 0, 254, 0, - 0, 207, 0, 0, 0, 0, 0, 0, 0, 272, - 0, 0, 272, 272, 272, 272, 272, 0, 0, 0, + 247, 247, 0, 247, 0, 76, 76, 0, 0, 203, + 76, 76, 0, 0, 0, 0, 0, 76, 0, 0, + 0, 76, 76, 0, 76, 76, 76, 76, 76, 76, + 76, 0, 76, 0, 0, 247, 261, 0, 0, 203, + 261, 261, 261, 261, 261, 261, 261, 0, 0, 76, + 76, 76, 76, 76, 76, 76, 76, 76, 261, 261, + 0, 261, 240, 240, 0, 247, 240, 240, 240, 240, + 240, 240, 240, 252, 252, 0, 239, 252, 252, 252, + 252, 252, 252, 252, 240, 240, 0, 240, 0, 0, + 0, 0, 0, 261, 0, 252, 252, 0, 252, 0, + 0, 0, 0, 0, 0, 239, 239, 239, 239, 239, + 239, 239, 239, 0, 0, 0, 0, 0, 0, 240, + 214, 215, 215, 261, 0, 215, 215, 215, 215, 215, + 215, 215, 0, 0, 0, 0, 0, 0, 0, 0, + 136, 0, 0, 215, 215, 0, 215, 0, 0, 214, + 214, 214, 214, 214, 0, 214, 214, 0, 136, 0, + 252, 0, 0, 0, 282, 282, 0, 0, 282, 282, + 0, 282, 0, 282, 282, 271, 271, 0, 215, 271, + 271, 271, 271, 271, 271, 271, 282, 282, 203, 282, + 0, 0, 0, 0, 0, 0, 0, 271, 271, 0, + 271, 0, 0, 0, 0, 0, 0, 0, 215, 0, + 0, 0, 0, 0, 247, 0, 0, 203, 203, 203, + 203, 282, 203, 203, 203, 0, 0, 0, 0, 0, + 272, 272, 271, 0, 272, 272, 272, 272, 272, 272, + 272, 0, 0, 247, 247, 247, 247, 247, 247, 247, + 247, 282, 272, 272, 0, 272, 0, 0, 0, 274, + 274, 0, 271, 274, 274, 274, 274, 274, 274, 274, + 283, 0, 261, 283, 0, 283, 283, 283, 283, 0, + 0, 274, 0, 0, 0, 0, 0, 272, 0, 0, + 0, 283, 283, 0, 283, 0, 0, 0, 240, 0, + 0, 261, 261, 261, 261, 261, 261, 261, 261, 252, + 0, 0, 0, 0, 275, 275, 274, 272, 275, 275, + 275, 275, 275, 275, 275, 0, 283, 240, 240, 240, + 240, 240, 240, 240, 240, 0, 275, 0, 252, 252, + 252, 252, 252, 252, 252, 252, 274, 0, 0, 0, + 0, 0, 0, 136, 136, 0, 283, 215, 136, 136, + 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, + 136, 275, 136, 136, 136, 136, 136, 136, 0, 0, + 136, 0, 0, 0, 168, 0, 215, 215, 215, 215, + 215, 0, 215, 215, 0, 0, 0, 136, 0, 284, + 282, 275, 284, 168, 284, 284, 284, 284, 0, 0, + 0, 271, 0, 0, 0, 0, 0, 0, 0, 0, + 284, 284, 0, 284, 0, 0, 0, 0, 0, 282, + 282, 282, 282, 282, 282, 282, 282, 0, 0, 0, + 0, 271, 271, 0, 271, 271, 271, 271, 0, 0, + 0, 0, 0, 0, 0, 284, 285, 0, 0, 285, + 0, 285, 285, 285, 285, 0, 272, 168, 0, 168, + 0, 0, 0, 0, 0, 0, 89, 285, 285, 0, + 285, 0, 0, 0, 0, 284, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 272, 272, 0, 272, + 272, 272, 272, 0, 0, 283, 0, 0, 0, 0, + 0, 0, 285, 207, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 274, 0, 0, 274, 274, 274, + 274, 274, 205, 0, 283, 283, 283, 283, 283, 283, + 283, 283, 285, 257, 257, 0, 0, 257, 257, 257, + 257, 257, 257, 257, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 257, 257, 0, 257, 0, + 0, 207, 0, 0, 0, 0, 0, 0, 0, 275, + 0, 0, 275, 275, 275, 275, 275, 0, 0, 0, 205, 0, 0, 0, 0, 0, 140, 0, 206, 0, - 254, 0, 165, 0, 0, 0, 165, 0, 0, 0, - 0, 197, 0, 0, 0, 165, 165, 0, 165, 0, - 0, 0, 0, 0, 0, 0, 0, 165, 207, 0, - 254, 165, 0, 0, 281, 0, 165, 165, 165, 165, - 165, 165, 165, 165, 165, 165, 0, 205, 0, 0, - 0, 0, 165, 165, 140, 0, 299, 0, 0, 0, - 0, 0, 0, 281, 281, 281, 281, 281, 281, 281, - 281, 0, 0, 1, 2, 0, 207, 0, 3, 0, + 257, 0, 168, 0, 0, 0, 168, 0, 0, 0, + 0, 200, 0, 0, 0, 168, 168, 0, 168, 0, + 0, 0, 0, 0, 0, 0, 0, 168, 207, 0, + 257, 168, 0, 0, 284, 0, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 0, 205, 0, 0, + 0, 0, 168, 168, 140, 0, 299, 0, 0, 0, + 0, 0, 0, 284, 284, 284, 284, 284, 284, 284, + 284, 0, 0, 1, 2, 0, 207, 0, 3, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, - 6, 282, 7, 8, 9, 205, 0, 0, 0, 0, + 6, 285, 7, 8, 9, 205, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 165, 0, 0, 0, 140, 0, 317, 0, 0, 0, 118, 0, 0, - 282, 282, 282, 282, 282, 282, 282, 282, 0, 0, + 285, 285, 285, 285, 285, 285, 285, 285, 0, 0, 0, 2, 207, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 189, 190, 0, 6, 0, 0, 0, 205, 0, 0, 0, 0, 191, 0, 0, 140, 192, 370, 0, 0, 0, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 0, 0, 0, 0, 254, + 198, 199, 200, 201, 202, 0, 0, 0, 0, 257, 207, 203, 204, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 205, - 0, 0, 189, 190, 0, 6, 0, 0, 254, 254, - 254, 254, 254, 254, 191, 140, 0, 371, 298, 207, + 0, 0, 189, 190, 0, 6, 0, 0, 257, 257, + 257, 257, 257, 257, 191, 140, 0, 371, 298, 207, 0, 0, 0, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 0, 0, 0, 0, 0, 205, 203, 204, 0, 0, 0, 0, 0, 2, 0, 0, 0, @@ -3689,8 +3730,8 @@ case 286: 0, 0, 0, 0, 2, 0, 203, 204, 3, 0, 0, 0, 140, 0, 0, 0, 0, 189, 190, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 191, - 136, 0, 0, 192, 0, 0, 0, 0, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, 136, 0, + 138, 0, 0, 192, 0, 0, 0, 0, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 138, 0, 0, 140, 0, 0, 203, 204, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 189, 190, 89, 6, 0, 0, 0, @@ -3710,11 +3751,11 @@ case 286: 0, 191, 0, 0, 0, 192, 0, 0, 0, 0, 193, 194, 195, 196, 197, 198, 199, 200, 201, 14, 0, 175, 0, 0, 0, 0, 203, 204, 0, 0, - 0, 0, 0, 136, 136, 0, 0, 0, 136, 136, - 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, - 136, 0, 136, 136, 136, 136, 136, 136, 0, 0, - 136, 0, 1, 2, 0, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 5, 0, 0, 136, 0, 6, + 0, 0, 0, 138, 138, 0, 0, 0, 138, 138, + 0, 0, 0, 0, 0, 138, 0, 0, 0, 0, + 138, 0, 138, 138, 138, 138, 138, 138, 0, 0, + 138, 0, 1, 2, 0, 0, 0, 3, 0, 0, + 0, 0, 0, 0, 5, 0, 0, 138, 0, 6, 0, 7, 8, 9, 0, 0, 0, 0, 0, 86, 0, 0, 1, 2, 0, 0, 87, 3, 0, 0, 0, 0, 0, 0, 5, 0, 88, 0, 0, 6, @@ -3806,12 +3847,12 @@ class yyCheck0 { 450, 451, 0, 453, 40, 40, 267, 59, 458, 420, 421, 41, 462, 41, 464, 465, 41, 41, 41, 267, 431, 0, 0, 473, 474, 475, 0, 0, 26, 479, - 59, 301, 59, 59, 47, 120, 48, 96, 372, 450, - 451, 49, 453, 41, 30, 33, 258, 458, 334, 47, - 358, 462, 40, 464, 465, 43, 75, 45, 76, 57, - 249, 250, 473, 474, 475, 359, 361, 360, 479, 67, - 362, 138, 332, 332, 65, -1, 169, -1, -1, -1, - -1, -1, -1, 105, 33, -1, 420, 421, -1, -1, + 59, 301, 59, 47, 120, 48, 30, 49, 372, 450, + 451, 75, 453, 41, 76, 33, 96, 458, 258, 47, + 334, 462, 40, 464, 465, 43, 358, 45, 359, 57, + 249, 250, 473, 474, 475, 360, 332, 361, 479, 67, + 362, 138, 332, 65, 105, -1, 169, -1, -1, -1, + -1, -1, -1, -1, 33, -1, 420, 421, -1, -1, -1, 40, 41, 91, 43, -1, 45, 431, 96, -1, -1, 33, 291, -1, -1, -1, 295, 105, 40, -1, -1, 43, -1, 45, -1, -1, 450, 451, -1, 453, diff --git a/src/mycompiler/myparser/JavaParser.jay b/src/mycompiler/myparser/JavaParser.jay index 042059fd..16b86385 100755 --- a/src/mycompiler/myparser/JavaParser.jay +++ b/src/mycompiler/myparser/JavaParser.jay @@ -226,6 +226,7 @@ public Vector testPair = new Vector(); %type variabledeclarator %type variabledeclaratorid %type simplename +%type typename %type qualifiedname %type importqualifiedname %type importdeclaration @@ -786,6 +787,19 @@ classbodydeclaration : classmemberdeclaration $$=$1; } //*/ + +typename : simplename + { + $$=$1; + } + | IDENTIFIER '.' typename + { + UsedId UI = new UsedId($1.getOffset()); + UI.set_Name( $1.getLexem() + "." + $3 ); + UI.setOffset($1.getOffset());//hinzugef�gt hoth: 07.04.2006 + $$ = UI; + } + classorinterfacetype : simplename parameter { if ($2 != null) { @@ -1240,6 +1254,12 @@ type : primitivetype { $$=$1; } + /* + | referencelongtype + { + $$=$1; + } + */ |referencetype '[' ']' { $1.setArray(true); @@ -1357,6 +1377,28 @@ primitivetype :BOOLEAN $$=$1; } +referencelongtype : typename parameter + { + if ($2 != null) { + //$1.set_ParaList($2.get_ParaList()); + $1.set_ParaList($2);//Änderung von Andreas Stadelmeier. Type statt GenericVarType + /* otth: originale (also diese) Parameterliste retten */ + //((UsedId)$1).vParaOrg = new Vector( $2.get_ParaList() ); + } + UsedId uid = $1; + RefType RT = new RefType(uid.getOffset()); + + RT.set_ParaList(uid.get_RealParaList()); + RT.setName(uid.getQualifiedName()); + + + //PL 05-07-30 eingefuegt containedTypes ANFANG + containedTypes.addElement(RT); + //PL 05-07-30 eingefuegt containedTypes ENDE + + $$=RT; + } + referencetype :classorinterfacetype { org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->referenctype: " + $1); @@ -1375,6 +1417,8 @@ referencetype :classorinterfacetype $$=RT; } + + /* 05-07-28 PL Parameterdeklarationen zur classorinterfacetype verschoben */ variabledeclarator : variabledeclaratorid From b9dde7b0154f34339db1d70d6aef714e05c09aaf Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 7 Aug 2014 12:20:11 +0200 Subject: [PATCH 08/31] =?UTF-8?q?Parser=20nimmt=20name=20statt=20simplenam?= =?UTF-8?q?e=20f=C3=BCr=20Typ?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/mycompiler/myparser/JavaParser.jay | 20 +- src/mycompiler/myparser/JavaParser.java | 2524 ++++++++--------- src/mycompiler/myparser/JavaParser.jay | 20 +- .../TypeInsertTests/LambdaTest17.jav | 9 + .../TypeInsertTests/LambdaTest17.java | 16 + .../TypeInsertTests/LambdaTest18.jav | 6 + .../TypeInsertTests/LambdaTest18.java | 16 + 7 files changed, 1298 insertions(+), 1313 deletions(-) create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest17.jav create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest17.java create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest18.jav create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest18.java diff --git a/bin/mycompiler/myparser/JavaParser.jay b/bin/mycompiler/myparser/JavaParser.jay index 16b86385..120563f0 100755 --- a/bin/mycompiler/myparser/JavaParser.jay +++ b/bin/mycompiler/myparser/JavaParser.jay @@ -787,20 +787,8 @@ classbodydeclaration : classmemberdeclaration $$=$1; } //*/ - -typename : simplename - { - $$=$1; - } - | IDENTIFIER '.' typename - { - UsedId UI = new UsedId($1.getOffset()); - UI.set_Name( $1.getLexem() + "." + $3 ); - UI.setOffset($1.getOffset());//hinzugef�gt hoth: 07.04.2006 - $$ = UI; - } -classorinterfacetype : simplename parameter +classorinterfacetype : name parameter { if ($2 != null) { //$1.set_ParaList($2.get_ParaList()); @@ -1254,12 +1242,6 @@ type : primitivetype { $$=$1; } - /* - | referencelongtype - { - $$=$1; - } - */ |referencetype '[' ']' { $1.setArray(true); diff --git a/src/mycompiler/myparser/JavaParser.java b/src/mycompiler/myparser/JavaParser.java index fd173c99..970b48cd 100644 --- a/src/mycompiler/myparser/JavaParser.java +++ b/src/mycompiler/myparser/JavaParser.java @@ -205,6 +205,7 @@ public Vector testPair = new Vector(); public static final int EOF = 328; public static final int LAMBDAASSIGNMENT = 329; public static final int ENDOFGENERICVARDECLARATION = 330; + public static final int typename = 331; public static final int yyErrorCode = 256; /** thrown for irrecoverable syntax errors and stack overflow. @@ -341,9 +342,7 @@ public Vector testPair = new Vector(); //t "classbodydeclaration : classmemberdeclaration", //t "classbodydeclaration : staticinitializer", //t "classbodydeclaration : constructordeclaration", -//t "typename : simplename", -//t "typename : IDENTIFIER '.' typename", -//t "classorinterfacetype : simplename parameter", +//t "classorinterfacetype : name parameter", //t "typelist : type", //t "typelist : typelist ',' type", //t "parameter :", @@ -594,7 +593,7 @@ public Vector testPair = new Vector(); "DIVIDEEQUAL","ANDEQUAL","OREQUAL","XOREQUAL","MODULOEQUAL", "SHIFTLEFTEQUAL","SIGNEDSHIFTRIGHTEQUAL","UNSIGNEDSHIFTRIGHTEQUAL", "BRACE","RELOP","OP","EOF","LAMBDAASSIGNMENT", - "ENDOFGENERICVARDECLARATION", + "ENDOFGENERICVARDECLARATION","typename", }; /** index-checked interface to yyName[]. @@ -1326,21 +1325,6 @@ case 70: break; case 71: // line 792 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((UsedId)yyVals[0+yyTop]); - } - break; -case 72: - // line 796 "./../src/mycompiler/myparser/JavaParser.jay" - { - UsedId UI = new UsedId(((Token)yyVals[-2+yyTop]).getOffset()); - UI.set_Name( ((Token)yyVals[-2+yyTop]).getLexem() + "." + ((UsedId)yyVals[0+yyTop]) ); - UI.setOffset(((Token)yyVals[-2+yyTop]).getOffset());/*hinzugef�gt hoth: 07.04.2006*/ - yyVal = UI; - } - break; -case 73: - // line 804 "./../src/mycompiler/myparser/JavaParser.jay" { if (((Vector)yyVals[0+yyTop]) != null) { /*$1.set_ParaList($2.get_ParaList());*/ @@ -1351,58 +1335,58 @@ case 73: yyVal=((UsedId)yyVals[-1+yyTop]); } break; -case 74: - // line 815 "./../src/mycompiler/myparser/JavaParser.jay" +case 72: + // line 803 "./../src/mycompiler/myparser/JavaParser.jay" { Vector tl = new Vector(); tl.add(((Type)yyVals[0+yyTop])); yyVal = tl; } break; -case 75: - // line 821 "./../src/mycompiler/myparser/JavaParser.jay" +case 73: + // line 809 "./../src/mycompiler/myparser/JavaParser.jay" { ((Vector)yyVals[-2+yyTop]).add(((Type)yyVals[0+yyTop])); yyVal=((Vector)yyVals[-2+yyTop]); } break; -case 76: - // line 828 "./../src/mycompiler/myparser/JavaParser.jay" +case 74: + // line 816 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = null; } break; -case 77: - // line 830 "./../src/mycompiler/myparser/JavaParser.jay" +case 75: + // line 818 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = ((Vector)yyVals[-1+yyTop]); } break; -case 78: - // line 835 "./../src/mycompiler/myparser/JavaParser.jay" +case 76: + // line 823 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Interfaces, Spezialform Konstantendef.*/ yyVal = ((Constant)yyVals[0+yyTop]); } break; -case 79: - // line 840 "./../src/mycompiler/myparser/JavaParser.jay" +case 77: + // line 828 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = ((Method)yyVals[0+yyTop]); } break; -case 80: - // line 845 "./../src/mycompiler/myparser/JavaParser.jay" +case 78: + // line 833 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Field)yyVals[0+yyTop]); } break; -case 81: - // line 849 "./../src/mycompiler/myparser/JavaParser.jay" +case 79: + // line 837 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Method)yyVals[0+yyTop]); } break; -case 82: - // line 854 "./../src/mycompiler/myparser/JavaParser.jay" +case 80: + // line 842 "./../src/mycompiler/myparser/JavaParser.jay" { Method STAT = new Method(((Token)yyVals[-1+yyTop]).getOffset()); DeclId DST = new DeclId(); @@ -1416,23 +1400,23 @@ case 82: yyVal=STAT; } break; -case 83: - // line 868 "./../src/mycompiler/myparser/JavaParser.jay" +case 81: + // line 856 "./../src/mycompiler/myparser/JavaParser.jay" { ((Constructor)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); yyVal = ((Constructor)yyVals[-1+yyTop]); } break; -case 84: - // line 873 "./../src/mycompiler/myparser/JavaParser.jay" +case 82: + // line 861 "./../src/mycompiler/myparser/JavaParser.jay" { ((Constructor)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); ((Constructor)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); yyVal = ((Constructor)yyVals[-1+yyTop]); } break; -case 85: - // line 880 "./../src/mycompiler/myparser/JavaParser.jay" +case 83: + // line 868 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Interface*/ Constant c = new Constant(((Token)yyVals[-3+yyTop]).getLexem(), ((Modifiers)yyVals[-5+yyTop])); @@ -1441,15 +1425,15 @@ case 85: yyVal = c; } break; -case 86: - // line 889 "./../src/mycompiler/myparser/JavaParser.jay" +case 84: + // line 877 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Interface*/ yyVal = ((Method)yyVals[-1+yyTop]); } break; -case 87: - // line 914 "./../src/mycompiler/myparser/JavaParser.jay" +case 85: + // line 902 "./../src/mycompiler/myparser/JavaParser.jay" { FieldDeclaration ret = new FieldDeclaration(((DeclId)yyVals[-2+yyTop]).getOffset()); ret.set_DeclId(((DeclId)yyVals[-2+yyTop])); @@ -1457,58 +1441,58 @@ case 87: yyVal=ret; } break; -case 88: - // line 921 "./../src/mycompiler/myparser/JavaParser.jay" +case 86: + // line 909 "./../src/mycompiler/myparser/JavaParser.jay" { FieldDeclaration ret = new FieldDeclaration(((DeclId)yyVals[0+yyTop]).getOffset()); ret.set_DeclId(((DeclId)yyVals[0+yyTop])); yyVal=ret; } break; -case 89: - // line 928 "./../src/mycompiler/myparser/JavaParser.jay" +case 87: + // line 916 "./../src/mycompiler/myparser/JavaParser.jay" { GenericDeclarationList ret = new GenericDeclarationList(((GenericVarDeclarationList)yyVals[-1+yyTop]).getElements(),((GenericVarDeclarationList)yyVals[-1+yyTop]).getEndOffset()); yyVal = ret; } break; -case 90: - // line 935 "./../src/mycompiler/myparser/JavaParser.jay" +case 88: + // line 923 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; -case 91: - // line 939 "./../src/mycompiler/myparser/JavaParser.jay" +case 89: + // line 927 "./../src/mycompiler/myparser/JavaParser.jay" { ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; -case 92: - // line 944 "./../src/mycompiler/myparser/JavaParser.jay" +case 90: + // line 932 "./../src/mycompiler/myparser/JavaParser.jay" {/*angefügt von Andreas Stadelmeier*/ ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); ((FieldDeclaration)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; -case 93: - // line 951 "./../src/mycompiler/myparser/JavaParser.jay" +case 91: + // line 939 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; -case 94: - // line 956 "./../src/mycompiler/myparser/JavaParser.jay" +case 92: + // line 944 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + ((Type)yyVals[-2+yyTop])); ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); yyVal = ((FieldDeclaration)yyVals[-1+yyTop]); } break; -case 95: - // line 963 "./../src/mycompiler/myparser/JavaParser.jay" +case 93: + // line 951 "./../src/mycompiler/myparser/JavaParser.jay" { ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); for(int i=0;i<(((FieldDeclaration)yyVals[-1+yyTop]).getDeclIdVector().size());i++) @@ -1518,28 +1502,28 @@ case 95: yyVal = ((FieldDeclaration)yyVals[-1+yyTop]); } break; -case 96: - // line 973 "./../src/mycompiler/myparser/JavaParser.jay" +case 94: + // line 961 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); yyVal=((Method)yyVals[-1+yyTop]); } break; -case 97: - // line 980 "./../src/mycompiler/myparser/JavaParser.jay" +case 95: + // line 968 "./../src/mycompiler/myparser/JavaParser.jay" { Block Bl = new Block(); yyVal=Bl; } break; -case 98: - // line 986 "./../src/mycompiler/myparser/JavaParser.jay" +case 96: + // line 974 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Block)yyVals[-1+yyTop]); } break; -case 99: - // line 991 "./../src/mycompiler/myparser/JavaParser.jay" +case 97: + // line 979 "./../src/mycompiler/myparser/JavaParser.jay" { Constructor CON = new Constructor(null); /*TODO: Der Parser kann sowieso nicht zwischen einem Konstruktor und einer Methode unterscheiden. Das hier kann wegfallen...*/ DeclId DIDCon = new DeclId(); @@ -1548,8 +1532,8 @@ case 99: yyVal=CON; } break; -case 100: - // line 999 "./../src/mycompiler/myparser/JavaParser.jay" +case 98: + // line 987 "./../src/mycompiler/myparser/JavaParser.jay" { Constructor CONpara = new Constructor(null); DeclId DIconpara = new DeclId(); @@ -1559,29 +1543,29 @@ case 100: yyVal=CONpara; } break; -case 101: - // line 1009 "./../src/mycompiler/myparser/JavaParser.jay" +case 99: + // line 997 "./../src/mycompiler/myparser/JavaParser.jay" { Block CBL = new Block(); yyVal=CBL; } break; -case 102: - // line 1014 "./../src/mycompiler/myparser/JavaParser.jay" +case 100: + // line 1002 "./../src/mycompiler/myparser/JavaParser.jay" { Block CBLexpl = new Block(); CBLexpl.set_Statement(((Statement)yyVals[-1+yyTop])); yyVal=CBLexpl; } break; -case 103: - // line 1020 "./../src/mycompiler/myparser/JavaParser.jay" +case 101: + // line 1008 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Block)yyVals[-1+yyTop]); } break; -case 104: - // line 1024 "./../src/mycompiler/myparser/JavaParser.jay" +case 102: + // line 1012 "./../src/mycompiler/myparser/JavaParser.jay" { Block CBes = new Block(); CBes.set_Statement(((Statement)yyVals[-2+yyTop])); @@ -1592,51 +1576,51 @@ case 104: yyVal=CBes; } break; -case 105: - // line 1035 "./../src/mycompiler/myparser/JavaParser.jay" +case 103: + // line 1023 "./../src/mycompiler/myparser/JavaParser.jay" { ExceptionList EL = new ExceptionList(); EL.set_addElem(((RefType)yyVals[0+yyTop])); yyVal=EL; } break; -case 106: - // line 1042 "./../src/mycompiler/myparser/JavaParser.jay" +case 104: + // line 1030 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = ((GenericTypeVar)yyVals[0+yyTop]); } break; -case 107: - // line 1047 "./../src/mycompiler/myparser/JavaParser.jay" +case 105: + // line 1035 "./../src/mycompiler/myparser/JavaParser.jay" { ParaList p = new ParaList(); p.add_ParaList(((GenericTypeVar)yyVals[0+yyTop])); yyVal=p; } break; -case 108: - // line 1053 "./../src/mycompiler/myparser/JavaParser.jay" +case 106: + // line 1041 "./../src/mycompiler/myparser/JavaParser.jay" { ((ParaList)yyVals[-2+yyTop]).add_ParaList(((GenericTypeVar)yyVals[0+yyTop])); yyVal=((ParaList)yyVals[-2+yyTop]); } break; -case 109: - // line 1060 "./../src/mycompiler/myparser/JavaParser.jay" +case 107: + // line 1048 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(),((Token)yyVals[0+yyTop]).getOffset()); } break; -case 110: - // line 1064 "./../src/mycompiler/myparser/JavaParser.jay" +case 108: + // line 1052 "./../src/mycompiler/myparser/JavaParser.jay" { BoundedGenericTypeVar gtv=new BoundedGenericTypeVar(((Token)yyVals[-2+yyTop]).getLexem(), ((BoundedClassIdentifierList)yyVals[0+yyTop]), ((Token)yyVals[-2+yyTop]).getOffset() ,((BoundedClassIdentifierList)yyVals[0+yyTop]).getEndOffset()); /*gtv.setBounds($3);*/ yyVal=gtv; } break; -case 111: - // line 1071 "./../src/mycompiler/myparser/JavaParser.jay" +case 109: + // line 1059 "./../src/mycompiler/myparser/JavaParser.jay" { Vector vec=new Vector(); vec.addElement(((RefType)yyVals[0+yyTop])); @@ -1644,8 +1628,8 @@ case 111: yyVal=new BoundedClassIdentifierList(vec, ((RefType)yyVals[0+yyTop]).getOffset()+((RefType)yyVals[0+yyTop]).getName().length()); } break; -case 112: - // line 1078 "./../src/mycompiler/myparser/JavaParser.jay" +case 110: + // line 1066 "./../src/mycompiler/myparser/JavaParser.jay" { ((BoundedClassIdentifierList)yyVals[-2+yyTop]).addElement(((RefType)yyVals[0+yyTop])); ((BoundedClassIdentifierList)yyVals[-2+yyTop]).addOffsetOff(((RefType)yyVals[0+yyTop])); @@ -1653,46 +1637,46 @@ case 112: yyVal=((BoundedClassIdentifierList)yyVals[-2+yyTop]); } break; -case 113: - // line 1086 "./../src/mycompiler/myparser/JavaParser.jay" +case 111: + // line 1074 "./../src/mycompiler/myparser/JavaParser.jay" { GenericVarDeclarationList vec=new GenericVarDeclarationList(); vec.addElement(((GenericTypeVar)yyVals[0+yyTop])); yyVal=vec; } break; -case 114: - // line 1092 "./../src/mycompiler/myparser/JavaParser.jay" +case 112: + // line 1080 "./../src/mycompiler/myparser/JavaParser.jay" { ((GenericVarDeclarationList)yyVals[-2+yyTop]).addElement(((GenericTypeVar)yyVals[0+yyTop])); yyVal=((GenericVarDeclarationList)yyVals[-2+yyTop]); } break; -case 115: - // line 1100 "./../src/mycompiler/myparser/JavaParser.jay" +case 113: + // line 1088 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-2+yyTop])); yyVal=((Method)yyVals[0+yyTop]); } break; -case 116: - // line 1106 "./../src/mycompiler/myparser/JavaParser.jay" +case 114: + // line 1094 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); yyVal=((Method)yyVals[0+yyTop]); } break; -case 117: - // line 1111 "./../src/mycompiler/myparser/JavaParser.jay" +case 115: + // line 1099 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); yyVal=((Method)yyVals[0+yyTop]); } break; -case 118: - // line 1117 "./../src/mycompiler/myparser/JavaParser.jay" +case 116: + // line 1105 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-2+yyTop])); @@ -1700,16 +1684,16 @@ case 118: yyVal=((Method)yyVals[0+yyTop]); } break; -case 119: - // line 1124 "./../src/mycompiler/myparser/JavaParser.jay" +case 117: + // line 1112 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); yyVal=((Method)yyVals[-1+yyTop]); } break; -case 120: - // line 1130 "./../src/mycompiler/myparser/JavaParser.jay" +case 118: + // line 1118 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); @@ -1717,35 +1701,35 @@ case 120: yyVal=((Method)yyVals[-1+yyTop]); } break; +case 119: + // line 1125 "./../src/mycompiler/myparser/JavaParser.jay" + { + ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); + ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); + ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); + yyVal=((Method)yyVals[-1+yyTop]); + } + break; +case 120: + // line 1132 "./../src/mycompiler/myparser/JavaParser.jay" + { + ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-4+yyTop])); + ((Method)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); + ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); + ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); + yyVal=((Method)yyVals[-1+yyTop]); + } + break; case 121: - // line 1137 "./../src/mycompiler/myparser/JavaParser.jay" - { - ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); - ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); - ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); - yyVal=((Method)yyVals[-1+yyTop]); - } - break; -case 122: - // line 1144 "./../src/mycompiler/myparser/JavaParser.jay" - { - ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-4+yyTop])); - ((Method)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); - ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); - ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); - yyVal=((Method)yyVals[-1+yyTop]); - } - break; -case 123: - // line 1152 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1140 "./../src/mycompiler/myparser/JavaParser.jay" { Void Voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).setType(Voit); yyVal=((Method)yyVals[0+yyTop]); } break; -case 124: - // line 1158 "./../src/mycompiler/myparser/JavaParser.jay" +case 122: + // line 1146 "./../src/mycompiler/myparser/JavaParser.jay" { Void voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); @@ -1753,8 +1737,8 @@ case 124: yyVal=((Method)yyVals[0+yyTop]); } break; -case 125: - // line 1165 "./../src/mycompiler/myparser/JavaParser.jay" +case 123: + // line 1153 "./../src/mycompiler/myparser/JavaParser.jay" { Void voyt = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).setType(voyt); @@ -1762,8 +1746,8 @@ case 125: yyVal=((Method)yyVals[-1+yyTop]); } break; -case 126: - // line 1172 "./../src/mycompiler/myparser/JavaParser.jay" +case 124: + // line 1160 "./../src/mycompiler/myparser/JavaParser.jay" { Void voyd = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); @@ -1772,8 +1756,8 @@ case 126: yyVal=((Method)yyVals[-1+yyTop]); } break; -case 127: - // line 1180 "./../src/mycompiler/myparser/JavaParser.jay" +case 125: + // line 1168 "./../src/mycompiler/myparser/JavaParser.jay" { Void Voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).setType(Voit); @@ -1781,8 +1765,8 @@ case 127: yyVal=((Method)yyVals[0+yyTop]); } break; -case 128: - // line 1187 "./../src/mycompiler/myparser/JavaParser.jay" +case 126: + // line 1175 "./../src/mycompiler/myparser/JavaParser.jay" { Void voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); @@ -1791,8 +1775,8 @@ case 128: yyVal=((Method)yyVals[0+yyTop]); } break; -case 129: - // line 1195 "./../src/mycompiler/myparser/JavaParser.jay" +case 127: + // line 1183 "./../src/mycompiler/myparser/JavaParser.jay" { Void voyt = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).setType(voyt); @@ -1801,8 +1785,8 @@ case 129: yyVal=((Method)yyVals[-1+yyTop]); } break; -case 130: - // line 1203 "./../src/mycompiler/myparser/JavaParser.jay" +case 128: + // line 1191 "./../src/mycompiler/myparser/JavaParser.jay" { Void voyd = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-4+yyTop])); @@ -1812,39 +1796,39 @@ case 130: yyVal=((Method)yyVals[-1+yyTop]); } break; -case 131: - // line 1213 "./../src/mycompiler/myparser/JavaParser.jay" +case 129: + // line 1201 "./../src/mycompiler/myparser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $1.setType(TypePlaceholder.fresh()); */ yyVal=((Method)yyVals[0+yyTop]); } break; -case 132: - // line 1218 "./../src/mycompiler/myparser/JavaParser.jay" +case 130: + // line 1206 "./../src/mycompiler/myparser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $4.setType(TypePlaceholder.fresh());*/ ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-1+yyTop])); yyVal=((Method)yyVals[0+yyTop]); } break; -case 133: - // line 1225 "./../src/mycompiler/myparser/JavaParser.jay" +case 131: + // line 1213 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-1+yyTop])); /*auskommentiert von Andreas Stadelmeier (a10023) $2.setType(TypePlaceholder.fresh());*/ yyVal=((Method)yyVals[0+yyTop]); } break; -case 134: - // line 1231 "./../src/mycompiler/myparser/JavaParser.jay" +case 132: + // line 1219 "./../src/mycompiler/myparser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $1.setType(TypePlaceholder.fresh());*/ ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); yyVal=((Method)yyVals[-1+yyTop]); } break; -case 135: - // line 1237 "./../src/mycompiler/myparser/JavaParser.jay" +case 133: + // line 1225 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); /*auskommentiert von Andreas Stadelmeier (a10023) $2.setType(TypePlaceholder.fresh());*/ @@ -1852,32 +1836,32 @@ case 135: yyVal=((Method)yyVals[-1+yyTop]); } break; -case 136: - // line 1246 "./../src/mycompiler/myparser/JavaParser.jay" +case 134: + // line 1234 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; -case 137: - // line 1250 "./../src/mycompiler/myparser/JavaParser.jay" +case 135: + // line 1238 "./../src/mycompiler/myparser/JavaParser.jay" { ((BaseType)yyVals[-2+yyTop]).setArray(true); } break; -case 138: - // line 1254 "./../src/mycompiler/myparser/JavaParser.jay" +case 136: + // line 1242 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((RefType)yyVals[0+yyTop]); } break; -case 139: - // line 1264 "./../src/mycompiler/myparser/JavaParser.jay" +case 137: + // line 1252 "./../src/mycompiler/myparser/JavaParser.jay" { ((RefType)yyVals[-2+yyTop]).setArray(true); } break; -case 140: - // line 1268 "./../src/mycompiler/myparser/JavaParser.jay" +case 138: + // line 1256 "./../src/mycompiler/myparser/JavaParser.jay" { FieldDeclaration IVD = new FieldDeclaration(((DeclId)yyVals[0+yyTop]).getOffset()); IVD.getDeclIdVector().addElement( ((DeclId)yyVals[0+yyTop]) ); @@ -1885,66 +1869,66 @@ case 140: yyVal = IVD; } break; -case 141: - // line 1275 "./../src/mycompiler/myparser/JavaParser.jay" +case 139: + // line 1263 "./../src/mycompiler/myparser/JavaParser.jay" { ((FieldDeclaration)yyVals[-2+yyTop]).getDeclIdVector().addElement(((DeclId)yyVals[0+yyTop])); yyVal=((FieldDeclaration)yyVals[-2+yyTop]); } break; -case 142: - // line 1281 "./../src/mycompiler/myparser/JavaParser.jay" +case 140: + // line 1269 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; -case 143: - // line 1286 "./../src/mycompiler/myparser/JavaParser.jay" +case 141: + // line 1274 "./../src/mycompiler/myparser/JavaParser.jay" { Block Blstat = new Block(); Blstat.set_Statement(((Statement)yyVals[0+yyTop])); yyVal=Blstat; } break; -case 144: - // line 1293 "./../src/mycompiler/myparser/JavaParser.jay" +case 142: + // line 1281 "./../src/mycompiler/myparser/JavaParser.jay" { ((Block)yyVals[-1+yyTop]).set_Statement(((Statement)yyVals[0+yyTop])); yyVal=((Block)yyVals[-1+yyTop]); } break; -case 145: - // line 1299 "./../src/mycompiler/myparser/JavaParser.jay" +case 143: + // line 1287 "./../src/mycompiler/myparser/JavaParser.jay" { ParameterList PL = new ParameterList(); PL.set_AddParameter(((FormalParameter)yyVals[0+yyTop])); yyVal = PL; } break; -case 146: - // line 1305 "./../src/mycompiler/myparser/JavaParser.jay" +case 144: + // line 1293 "./../src/mycompiler/myparser/JavaParser.jay" { ((ParameterList)yyVals[-2+yyTop]).set_AddParameter(((FormalParameter)yyVals[0+yyTop])); yyVal = ((ParameterList)yyVals[-2+yyTop]); } break; -case 147: - // line 1311 "./../src/mycompiler/myparser/JavaParser.jay" +case 145: + // line 1299 "./../src/mycompiler/myparser/JavaParser.jay" { This THCON = new This(((Token)yyVals[-3+yyTop]).getOffset(),((Token)yyVals[-3+yyTop]).getLexem().length()); yyVal=THCON; } break; -case 148: - // line 1316 "./../src/mycompiler/myparser/JavaParser.jay" +case 146: + // line 1304 "./../src/mycompiler/myparser/JavaParser.jay" { This THCONargl = new This(((Token)yyVals[-4+yyTop]).getOffset(),((Token)yyVals[-4+yyTop]).getLexem().length()); THCONargl.set_ArgumentList(((ArgumentList)yyVals[-2+yyTop])); yyVal=THCONargl; } break; -case 149: - // line 1325 "./../src/mycompiler/myparser/JavaParser.jay" +case 147: + // line 1313 "./../src/mycompiler/myparser/JavaParser.jay" { RefType RT = new RefType(-1); RT.set_UsedId(((UsedId)yyVals[0+yyTop])); @@ -1952,16 +1936,16 @@ case 149: yyVal=RT; } break; -case 150: - // line 1332 "./../src/mycompiler/myparser/JavaParser.jay" +case 148: + // line 1320 "./../src/mycompiler/myparser/JavaParser.jay" { ((RefType)yyVals[-2+yyTop]).set_UsedId(((UsedId)yyVals[0+yyTop])); ((RefType)yyVals[-2+yyTop]).setName(((RefType)yyVals[-2+yyTop]).get_UsedId().get_Name_1Element()); yyVal=((RefType)yyVals[-2+yyTop]); } break; -case 151: - // line 1339 "./../src/mycompiler/myparser/JavaParser.jay" +case 149: + // line 1327 "./../src/mycompiler/myparser/JavaParser.jay" { Method met = new Method(((Token)yyVals[-2+yyTop]).getOffset()); /* #JB# 10.04.2005 */ @@ -1975,8 +1959,8 @@ case 151: yyVal = met; } break; -case 152: - // line 1352 "./../src/mycompiler/myparser/JavaParser.jay" +case 150: + // line 1340 "./../src/mycompiler/myparser/JavaParser.jay" { Method met_para = new Method(((Token)yyVals[-3+yyTop]).getOffset()); /* #JB# 10.04.2005 */ @@ -1991,8 +1975,8 @@ case 152: yyVal = met_para; } break; -case 153: - // line 1367 "./../src/mycompiler/myparser/JavaParser.jay" +case 151: + // line 1355 "./../src/mycompiler/myparser/JavaParser.jay" { BooleanType BT = new BooleanType(); /* #JB# 05.04.2005 */ @@ -2002,14 +1986,14 @@ case 153: yyVal=BT; } break; -case 154: - // line 1376 "./../src/mycompiler/myparser/JavaParser.jay" +case 152: + // line 1364 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; -case 155: - // line 1381 "./../src/mycompiler/myparser/JavaParser.jay" +case 153: + // line 1369 "./../src/mycompiler/myparser/JavaParser.jay" { if (((Vector)yyVals[0+yyTop]) != null) { /*$1.set_ParaList($2.get_ParaList());*/ @@ -2031,8 +2015,8 @@ case 155: yyVal=RT; } break; -case 156: - // line 1403 "./../src/mycompiler/myparser/JavaParser.jay" +case 154: + // line 1391 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->referenctype: " + ((UsedId)yyVals[0+yyTop])); RefType RT = new RefType(((UsedId)yyVals[0+yyTop]).getOffset()); @@ -2051,26 +2035,26 @@ case 156: yyVal=RT; } break; -case 157: - // line 1425 "./../src/mycompiler/myparser/JavaParser.jay" +case 155: + // line 1413 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((DeclId)yyVals[0+yyTop]); } break; -case 158: - // line 1446 "./../src/mycompiler/myparser/JavaParser.jay" +case 156: + // line 1434 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((LocalVarDecl)yyVals[0+yyTop]); } break; -case 159: - // line 1450 "./../src/mycompiler/myparser/JavaParser.jay" +case 157: + // line 1438 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; -case 160: - // line 1455 "./../src/mycompiler/myparser/JavaParser.jay" +case 158: + // line 1443 "./../src/mycompiler/myparser/JavaParser.jay" { FormalParameter FP = new FormalParameter(((DeclId)yyVals[0+yyTop])); FP.setType(((Type)yyVals[-1+yyTop])); @@ -2078,8 +2062,8 @@ case 160: yyVal=FP; } break; -case 161: - // line 1480 "./../src/mycompiler/myparser/JavaParser.jay" +case 159: + // line 1468 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + ((DeclId)yyVals[0+yyTop]).name); @@ -2098,29 +2082,29 @@ case 161: yyVal=FP; } break; -case 162: - // line 1499 "./../src/mycompiler/myparser/JavaParser.jay" +case 160: + // line 1487 "./../src/mycompiler/myparser/JavaParser.jay" { ArgumentList AL = new ArgumentList(); AL.expr.addElement(((Expr)yyVals[0+yyTop])); yyVal=AL; } break; -case 163: - // line 1505 "./../src/mycompiler/myparser/JavaParser.jay" +case 161: + // line 1493 "./../src/mycompiler/myparser/JavaParser.jay" { ((ArgumentList)yyVals[-2+yyTop]).expr.addElement(((Expr)yyVals[0+yyTop])); yyVal=((ArgumentList)yyVals[-2+yyTop]); } break; -case 164: - // line 1511 "./../src/mycompiler/myparser/JavaParser.jay" +case 162: + // line 1499 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; -case 165: - // line 1516 "./../src/mycompiler/myparser/JavaParser.jay" +case 163: + // line 1504 "./../src/mycompiler/myparser/JavaParser.jay" { DeclId DI = new DeclId(); /* #JB# 10.04.2005 */ @@ -2132,62 +2116,62 @@ case 165: yyVal=DI; } break; -case 166: - // line 1528 "./../src/mycompiler/myparser/JavaParser.jay" +case 164: + // line 1516 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 167: - // line 1533 "./../src/mycompiler/myparser/JavaParser.jay" +case 165: + // line 1521 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((LocalVarDecl)yyVals[-1+yyTop]); } break; -case 168: - // line 1538 "./../src/mycompiler/myparser/JavaParser.jay" +case 166: + // line 1526 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; +case 167: + // line 1530 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((IfStmt)yyVals[0+yyTop]); + } + break; +case 168: + // line 1534 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((IfStmt)yyVals[0+yyTop]); + } + break; case 169: - // line 1542 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((IfStmt)yyVals[0+yyTop]); - } - break; -case 170: - // line 1546 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((IfStmt)yyVals[0+yyTop]); - } - break; -case 171: - // line 1550 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1538 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((WhileStmt)yyVals[0+yyTop]); } break; -case 172: - // line 1554 "./../src/mycompiler/myparser/JavaParser.jay" +case 170: + // line 1542 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((ForStmt)yyVals[0+yyTop]); } break; -case 173: - // line 1559 "./../src/mycompiler/myparser/JavaParser.jay" +case 171: + // line 1547 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 174: - // line 1563 "./../src/mycompiler/myparser/JavaParser.jay" +case 172: + // line 1551 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((NewClass)yyVals[0+yyTop]); } break; -case 175: - // line 1568 "./../src/mycompiler/myparser/JavaParser.jay" +case 173: + // line 1556 "./../src/mycompiler/myparser/JavaParser.jay" { IntegerType IT = new IntegerType(); /* #JB# 05.04.2005 */ @@ -2197,8 +2181,8 @@ case 175: yyVal=IT; } break; -case 176: - // line 1577 "./../src/mycompiler/myparser/JavaParser.jay" +case 174: + // line 1565 "./../src/mycompiler/myparser/JavaParser.jay" { CharacterType CT = new CharacterType(); /* #JB# 05.04.2005 */ @@ -2208,8 +2192,8 @@ case 176: yyVal=CT; } break; -case 177: - // line 1587 "./../src/mycompiler/myparser/JavaParser.jay" +case 175: + // line 1575 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); LocalVarDecl LVD = new LocalVarDecl(((Type)yyVals[-1+yyTop]).getOffset(),((Type)yyVals[-1+yyTop]).getVariableLength()); @@ -2218,8 +2202,8 @@ case 177: yyVal = LVD; } break; -case 178: - // line 1598 "./../src/mycompiler/myparser/JavaParser.jay" +case 176: + // line 1586 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); LocalVarDecl LVD = new LocalVarDecl(((FieldDeclaration)yyVals[0+yyTop]).getOffset(),((FieldDeclaration)yyVals[0+yyTop]).getVariableLength()); @@ -2228,32 +2212,32 @@ case 178: yyVal = LVD; } break; -case 179: - // line 1608 "./../src/mycompiler/myparser/JavaParser.jay" +case 177: + // line 1596 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; -case 180: - // line 1612 "./../src/mycompiler/myparser/JavaParser.jay" +case 178: + // line 1600 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((EmptyStmt)yyVals[0+yyTop]); } break; -case 181: - // line 1616 "./../src/mycompiler/myparser/JavaParser.jay" +case 179: + // line 1604 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((ExprStmt)yyVals[0+yyTop]); } break; -case 182: - // line 1620 "./../src/mycompiler/myparser/JavaParser.jay" +case 180: + // line 1608 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Return)yyVals[0+yyTop]); } break; -case 183: - // line 1625 "./../src/mycompiler/myparser/JavaParser.jay" +case 181: + // line 1613 "./../src/mycompiler/myparser/JavaParser.jay" { IfStmt Ifst = new IfStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Ifst.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2261,8 +2245,8 @@ case 183: yyVal=Ifst; } break; -case 184: - // line 1633 "./../src/mycompiler/myparser/JavaParser.jay" +case 182: + // line 1621 "./../src/mycompiler/myparser/JavaParser.jay" { IfStmt IfstElst = new IfStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); IfstElst.set_Expr(((Expr)yyVals[-4+yyTop])); @@ -2271,8 +2255,8 @@ case 184: yyVal=IfstElst; } break; -case 185: - // line 1642 "./../src/mycompiler/myparser/JavaParser.jay" +case 183: + // line 1630 "./../src/mycompiler/myparser/JavaParser.jay" { WhileStmt Whlst = new WhileStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Whlst.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2280,8 +2264,8 @@ case 185: yyVal=Whlst; } break; -case 186: - // line 1653 "./../src/mycompiler/myparser/JavaParser.jay" +case 184: + // line 1641 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-6+yyTop]).getOffset(),((Expr)yyVals[-6+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-6+yyTop])); @@ -2293,8 +2277,8 @@ case 186: yyVal = Fst; } break; -case 187: - // line 1665 "./../src/mycompiler/myparser/JavaParser.jay" +case 185: + // line 1653 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-5+yyTop])); @@ -2305,8 +2289,8 @@ case 187: yyVal = Fst; } break; -case 188: - // line 1676 "./../src/mycompiler/myparser/JavaParser.jay" +case 186: + // line 1664 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-5+yyTop])); @@ -2317,8 +2301,8 @@ case 188: yyVal = Fst; } break; -case 189: - // line 1687 "./../src/mycompiler/myparser/JavaParser.jay" +case 187: + // line 1675 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); Fst.set_head_Condition(((Expr)yyVals[-4+yyTop])); @@ -2329,8 +2313,8 @@ case 189: yyVal = Fst; } break; -case 190: - // line 1698 "./../src/mycompiler/myparser/JavaParser.jay" +case 188: + // line 1686 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-4+yyTop])); @@ -2340,8 +2324,8 @@ case 190: yyVal = Fst; } break; -case 191: - // line 1708 "./../src/mycompiler/myparser/JavaParser.jay" +case 189: + // line 1696 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-3+yyTop]).getOffset(),((Expr)yyVals[-3+yyTop]).getVariableLength()); Fst.set_head_Condition(((Expr)yyVals[-3+yyTop])); @@ -2351,8 +2335,8 @@ case 191: yyVal = Fst; } break; -case 192: - // line 1718 "./../src/mycompiler/myparser/JavaParser.jay" +case 190: + // line 1706 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Fst.set_head_Loop_expr(((Expr)yyVals[-2+yyTop])); @@ -2362,8 +2346,8 @@ case 192: yyVal = Fst; } break; -case 193: - // line 1728 "./../src/mycompiler/myparser/JavaParser.jay" +case 191: + // line 1716 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Statement)yyVals[0+yyTop]).getOffset(),((Statement)yyVals[0+yyTop]).getVariableLength()); Fst.set_body_Loop_block(((Statement)yyVals[0+yyTop])); @@ -2372,73 +2356,73 @@ case 193: yyVal = Fst; } break; -case 194: - // line 1737 "./../src/mycompiler/myparser/JavaParser.jay" +case 192: + // line 1725 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("conditionalexpression"); yyVal=((Expr)yyVals[0+yyTop]); } break; -case 195: - // line 1742 "./../src/mycompiler/myparser/JavaParser.jay" +case 193: + // line 1730 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Assign)yyVals[0+yyTop]); } break; -case 196: - // line 1748 "./../src/mycompiler/myparser/JavaParser.jay" +case 194: + // line 1736 "./../src/mycompiler/myparser/JavaParser.jay" { EmptyStmt Empst = new EmptyStmt(); yyVal=Empst; } break; -case 197: - // line 1754 "./../src/mycompiler/myparser/JavaParser.jay" +case 195: + // line 1742 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[-1+yyTop]); } break; -case 198: - // line 1759 "./../src/mycompiler/myparser/JavaParser.jay" +case 196: + // line 1747 "./../src/mycompiler/myparser/JavaParser.jay" { Return ret = new Return(-1,-1); yyVal= ret; } break; -case 199: - // line 1764 "./../src/mycompiler/myparser/JavaParser.jay" +case 197: + // line 1752 "./../src/mycompiler/myparser/JavaParser.jay" { Return retexp = new Return(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); retexp.set_ReturnExpr(((Expr)yyVals[-1+yyTop])); yyVal=retexp; } break; -case 200: - // line 1771 "./../src/mycompiler/myparser/JavaParser.jay" +case 198: + // line 1759 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; -case 201: - // line 1775 "./../src/mycompiler/myparser/JavaParser.jay" +case 199: + // line 1763 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; -case 202: - // line 1779 "./../src/mycompiler/myparser/JavaParser.jay" +case 200: + // line 1767 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((WhileStmt)yyVals[0+yyTop]); } break; -case 203: - // line 1784 "./../src/mycompiler/myparser/JavaParser.jay" +case 201: + // line 1772 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 204: - // line 1790 "./../src/mycompiler/myparser/JavaParser.jay" +case 202: + // line 1778 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n"); Assign Ass = new Assign(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2464,8 +2448,8 @@ case 204: yyVal=Ass; } break; -case 205: - // line 1815 "./../src/mycompiler/myparser/JavaParser.jay" +case 203: + // line 1803 "./../src/mycompiler/myparser/JavaParser.jay" { Assign Ass =new Assign(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); LocalOrFieldVar LOFV = new LocalOrFieldVar(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2488,44 +2472,44 @@ case 205: yyVal=Ass; } break; -case 206: - // line 1838 "./../src/mycompiler/myparser/JavaParser.jay" +case 204: + // line 1826 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Assign)yyVals[0+yyTop]); } break; +case 205: + // line 1830 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 206: + // line 1834 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; case 207: - // line 1842 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1838 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 208: - // line 1846 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1842 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 209: - // line 1850 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 210: - // line 1854 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 211: - // line 1858 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1846 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((MethodCall)yyVals[0+yyTop]); } break; -case 212: - // line 1869 "./../src/mycompiler/myparser/JavaParser.jay" +case 210: + // line 1857 "./../src/mycompiler/myparser/JavaParser.jay" { IfStmt IfElno = new IfStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); IfElno.set_Expr(((Expr)yyVals[-4+yyTop])); @@ -2534,8 +2518,8 @@ case 212: yyVal=IfElno; } break; -case 213: - // line 1878 "./../src/mycompiler/myparser/JavaParser.jay" +case 211: + // line 1866 "./../src/mycompiler/myparser/JavaParser.jay" { WhileStmt Whstno = new WhileStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Whstno.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2543,14 +2527,14 @@ case 213: yyVal=Whstno; } break; -case 214: - // line 1886 "./../src/mycompiler/myparser/JavaParser.jay" +case 212: + // line 1874 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 215: - // line 1890 "./../src/mycompiler/myparser/JavaParser.jay" +case 213: + // line 1878 "./../src/mycompiler/myparser/JavaParser.jay" { Binary LogOr = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); OrOp OrO = new OrOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2561,20 +2545,20 @@ case 215: yyVal=LogOr; } break; -case 216: - // line 1903 "./../src/mycompiler/myparser/JavaParser.jay" +case 214: + // line 1891 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=null; } break; -case 217: - // line 1908 "./../src/mycompiler/myparser/JavaParser.jay" +case 215: + // line 1896 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; -case 218: - // line 1912 "./../src/mycompiler/myparser/JavaParser.jay" +case 216: + // line 1900 "./../src/mycompiler/myparser/JavaParser.jay" { /*Lambdabody kann auch nur aus einer Expression bestehen. In diesem Fall wird ein Block erstellt, welcher als einziges Statement ein return statment mit der expression hat.*/ /*Bsp.: Aus der Expression |var=="hallo"| wird: |{return var=="hallo";}|*/ @@ -2584,20 +2568,20 @@ case 218: yyVal=ret; } break; -case 219: - // line 1922 "./../src/mycompiler/myparser/JavaParser.jay" +case 217: + // line 1910 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=null; } break; -case 220: - // line 1926 "./../src/mycompiler/myparser/JavaParser.jay" +case 218: + // line 1914 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((ParameterList)yyVals[-1+yyTop]); } break; -case 221: - // line 1931 "./../src/mycompiler/myparser/JavaParser.jay" +case 219: + // line 1919 "./../src/mycompiler/myparser/JavaParser.jay" { LambdaExpression lambda = new LambdaExpression(/*((ParameSterList)$2).getOffset(),((ParameterList)$2).getVariableLength()*/0,0); if(((ParameterList)yyVals[-2+yyTop])!=null)lambda.setParameterList(((ParameterList)yyVals[-2+yyTop])); @@ -2605,87 +2589,87 @@ case 221: yyVal=lambda; } break; -case 222: - // line 1950 "./../src/mycompiler/myparser/JavaParser.jay" +case 220: + // line 1938 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((UsedId)yyVals[0+yyTop]); } break; -case 223: - // line 1955 "./../src/mycompiler/myparser/JavaParser.jay" +case 221: + // line 1943 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=null; } break; -case 224: - // line 1959 "./../src/mycompiler/myparser/JavaParser.jay" +case 222: + // line 1947 "./../src/mycompiler/myparser/JavaParser.jay" { TimesOp TEO = new TimesOp(-1,-1); yyVal=TEO; } break; -case 225: - // line 1964 "./../src/mycompiler/myparser/JavaParser.jay" +case 223: + // line 1952 "./../src/mycompiler/myparser/JavaParser.jay" { DivideOp DEO = new DivideOp(-1,-1); yyVal=DEO; } break; -case 226: - // line 1969 "./../src/mycompiler/myparser/JavaParser.jay" +case 224: + // line 1957 "./../src/mycompiler/myparser/JavaParser.jay" { ModuloOp MEO = new ModuloOp(-1,-1); yyVal=MEO; } break; -case 227: - // line 1974 "./../src/mycompiler/myparser/JavaParser.jay" +case 225: + // line 1962 "./../src/mycompiler/myparser/JavaParser.jay" { PlusOp PEO = new PlusOp(-1,-1); yyVal=PEO; } break; -case 228: - // line 1979 "./../src/mycompiler/myparser/JavaParser.jay" +case 226: + // line 1967 "./../src/mycompiler/myparser/JavaParser.jay" { MinusOp MEO = new MinusOp(-1,-1); yyVal=MEO; } break; -case 229: - // line 1991 "./../src/mycompiler/myparser/JavaParser.jay" +case 227: + // line 1979 "./../src/mycompiler/myparser/JavaParser.jay" { PreIncExpr PRINC = new PreIncExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); PRINC.set_Expr(((Expr)yyVals[0+yyTop])); yyVal=PRINC; } break; -case 230: - // line 1998 "./../src/mycompiler/myparser/JavaParser.jay" +case 228: + // line 1986 "./../src/mycompiler/myparser/JavaParser.jay" { PreDecExpr PRDEC = new PreDecExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); PRDEC.set_Expr(((Expr)yyVals[0+yyTop])); yyVal=PRDEC; } break; -case 231: - // line 2005 "./../src/mycompiler/myparser/JavaParser.jay" +case 229: + // line 1993 "./../src/mycompiler/myparser/JavaParser.jay" { PostIncExpr PIE = new PostIncExpr(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); PIE.set_Expr(((Expr)yyVals[-1+yyTop])); yyVal=PIE; } break; -case 232: - // line 2012 "./../src/mycompiler/myparser/JavaParser.jay" +case 230: + // line 2000 "./../src/mycompiler/myparser/JavaParser.jay" { PostDecExpr PDE = new PostDecExpr(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); PDE.set_Expr(((Expr)yyVals[-1+yyTop])); yyVal=PDE; } break; -case 233: - // line 2020 "./../src/mycompiler/myparser/JavaParser.jay" +case 231: + // line 2008 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M1"); MethodCall MC = new MethodCall(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2716,8 +2700,8 @@ case 233: yyVal=MC; } break; -case 234: - // line 2050 "./../src/mycompiler/myparser/JavaParser.jay" +case 232: + // line 2038 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M2"); MethodCall MCarg = new MethodCall(((UsedId)yyVals[-3+yyTop]).getOffset(),((UsedId)yyVals[-3+yyTop]).getVariableLength()); @@ -2749,8 +2733,8 @@ case 234: yyVal=MCarg; } break; -case 235: - // line 2081 "./../src/mycompiler/myparser/JavaParser.jay" +case 233: + // line 2069 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M3"); MethodCall MCpr = new MethodCall(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); @@ -2770,8 +2754,8 @@ case 235: yyVal=MCpr; } break; -case 236: - // line 2100 "./../src/mycompiler/myparser/JavaParser.jay" +case 234: + // line 2088 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M4"); MethodCall MCPA = new MethodCall(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); @@ -2792,8 +2776,8 @@ case 236: yyVal=MCPA; } break; -case 237: - // line 2123 "./../src/mycompiler/myparser/JavaParser.jay" +case 235: + // line 2111 "./../src/mycompiler/myparser/JavaParser.jay" { NewClass NC = new NewClass(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); NC.set_UsedId(((UsedId)yyVals[-2+yyTop])); @@ -2802,8 +2786,8 @@ case 237: yyVal=NC; } break; -case 238: - // line 2131 "./../src/mycompiler/myparser/JavaParser.jay" +case 236: + // line 2119 "./../src/mycompiler/myparser/JavaParser.jay" { NewClass NCarg = new NewClass(((UsedId)yyVals[-3+yyTop]).getOffset(),((UsedId)yyVals[-3+yyTop]).getVariableLength()); NCarg.set_UsedId(((UsedId)yyVals[-3+yyTop])); @@ -2813,14 +2797,14 @@ case 238: yyVal=NCarg; } break; -case 239: - // line 2141 "./../src/mycompiler/myparser/JavaParser.jay" +case 237: + // line 2129 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 240: - // line 2145 "./../src/mycompiler/myparser/JavaParser.jay" +case 238: + // line 2133 "./../src/mycompiler/myparser/JavaParser.jay" { Binary And = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); AndOp AndO = new AndOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2831,20 +2815,20 @@ case 240: yyVal=And; } break; +case 239: + // line 2149 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 240: + // line 2153 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; case 241: - // line 2161 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 242: - // line 2165 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 243: - // line 2169 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2157 "./../src/mycompiler/myparser/JavaParser.jay" { PositivExpr POSEX=new PositivExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryPlus UP= new UnaryPlus(); @@ -2853,8 +2837,8 @@ case 243: yyVal=POSEX; } break; -case 244: - // line 2177 "./../src/mycompiler/myparser/JavaParser.jay" +case 242: + // line 2165 "./../src/mycompiler/myparser/JavaParser.jay" { NegativeExpr NEGEX=new NegativeExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryMinus UM=new UnaryMinus(); @@ -2863,20 +2847,20 @@ case 244: yyVal=NEGEX; } break; +case 243: + // line 2173 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 244: + // line 2178 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; case 245: - // line 2185 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 246: - // line 2190 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 247: - // line 2194 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2182 "./../src/mycompiler/myparser/JavaParser.jay" { if (((UsedId)yyVals[0+yyTop]).get_Name().size() > 1) { @@ -2895,38 +2879,38 @@ case 247: } } break; +case 246: + // line 2200 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 247: + // line 2204 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; case 248: - // line 2212 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2209 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 249: - // line 2216 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 250: - // line 2221 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2214 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 251: - // line 2226 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 253: - // line 2232 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2220 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Literal)yyVals[0+yyTop]); } break; -case 254: - // line 2236 "./../src/mycompiler/myparser/JavaParser.jay" +case 252: + // line 2224 "./../src/mycompiler/myparser/JavaParser.jay" { This T = new This(((Token)yyVals[0+yyTop]).getOffset(),((Token)yyVals[0+yyTop]).getLexem().length()); UsedId UT = new UsedId(((Token)yyVals[0+yyTop]).getOffset()); @@ -2935,24 +2919,24 @@ case 254: yyVal=T; } break; -case 255: - // line 2257 "./../src/mycompiler/myparser/JavaParser.jay" +case 253: + // line 2245 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((MethodCall)yyVals[0+yyTop]); } break; -case 256: - // line 2261 "./../src/mycompiler/myparser/JavaParser.jay" +case 254: + // line 2249 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 257: - // line 2266 "./../src/mycompiler/myparser/JavaParser.jay" +case 255: + // line 2254 "./../src/mycompiler/myparser/JavaParser.jay" {yyVal=((Expr)yyVals[0+yyTop]);} break; -case 258: - // line 2268 "./../src/mycompiler/myparser/JavaParser.jay" +case 256: + // line 2256 "./../src/mycompiler/myparser/JavaParser.jay" {NotExpr NE=new NotExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryNot UN=new UnaryNot(); NE.set_UnaryNot(UN); @@ -2960,75 +2944,75 @@ case 258: yyVal=NE; } break; -case 259: - // line 2274 "./../src/mycompiler/myparser/JavaParser.jay" +case 257: + // line 2262 "./../src/mycompiler/myparser/JavaParser.jay" {yyVal=((CastExpr)yyVals[0+yyTop]);} break; -case 260: - // line 2276 "./../src/mycompiler/myparser/JavaParser.jay" +case 258: + // line 2264 "./../src/mycompiler/myparser/JavaParser.jay" {yyVal=((Expr)yyVals[0+yyTop]);} break; -case 262: - // line 2281 "./../src/mycompiler/myparser/JavaParser.jay" +case 260: + // line 2269 "./../src/mycompiler/myparser/JavaParser.jay" {IntLiteral IL = new IntLiteral(); IL.set_Int(((Token)yyVals[0+yyTop]).String2Int()); yyVal = IL; } break; -case 263: - // line 2286 "./../src/mycompiler/myparser/JavaParser.jay" +case 261: + // line 2274 "./../src/mycompiler/myparser/JavaParser.jay" {BoolLiteral BL = new BoolLiteral(); BL.set_Bool(((Token)yyVals[0+yyTop]).String2Bool()); yyVal = BL; } break; -case 264: - // line 2290 "./../src/mycompiler/myparser/JavaParser.jay" +case 262: + // line 2278 "./../src/mycompiler/myparser/JavaParser.jay" {CharLiteral CL = new CharLiteral(); CL.set_Char(((Token)yyVals[0+yyTop]).CharInString()); yyVal=CL; } break; -case 265: - // line 2295 "./../src/mycompiler/myparser/JavaParser.jay" +case 263: + // line 2283 "./../src/mycompiler/myparser/JavaParser.jay" { StringLiteral ST = new StringLiteral(); ST.set_String(((Token)yyVals[0+yyTop]).get_String()); yyVal=ST; } break; -case 266: - // line 2300 "./../src/mycompiler/myparser/JavaParser.jay" +case 264: + // line 2288 "./../src/mycompiler/myparser/JavaParser.jay" { LongLiteral LL = new LongLiteral(); LL.set_Long(((Token)yyVals[0+yyTop]).String2Long()); yyVal = LL; } break; -case 267: - // line 2304 "./../src/mycompiler/myparser/JavaParser.jay" +case 265: + // line 2292 "./../src/mycompiler/myparser/JavaParser.jay" { FloatLiteral FL = new FloatLiteral(); FL.set_Float(((Token)yyVals[0+yyTop]).String2Float()); yyVal = FL; } break; -case 268: - // line 2309 "./../src/mycompiler/myparser/JavaParser.jay" +case 266: + // line 2297 "./../src/mycompiler/myparser/JavaParser.jay" { DoubleLiteral DL = new DoubleLiteral(); DL.set_Double(((Token)yyVals[0+yyTop]).String2Double()); yyVal = DL; } break; -case 269: - // line 2315 "./../src/mycompiler/myparser/JavaParser.jay" +case 267: + // line 2303 "./../src/mycompiler/myparser/JavaParser.jay" { Null NN = new Null(); yyVal=NN; } break; -case 270: - // line 2321 "./../src/mycompiler/myparser/JavaParser.jay" +case 268: + // line 2309 "./../src/mycompiler/myparser/JavaParser.jay" { CastExpr CaEx=new CastExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); CaEx.set_Type(((BaseType)yyVals[-2+yyTop])); @@ -3036,25 +3020,25 @@ case 270: yyVal=CaEx; } break; +case 269: + // line 2318 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 270: + // line 2322 "./../src/mycompiler/myparser/JavaParser.jay" + { + } + break; case 271: - // line 2330 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2326 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 272: - // line 2334 "./../src/mycompiler/myparser/JavaParser.jay" - { - } - break; -case 273: - // line 2338 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 274: - // line 2342 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2330 "./../src/mycompiler/myparser/JavaParser.jay" { Binary EQ = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); EqualOp EO = new EqualOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3065,8 +3049,8 @@ case 274: yyVal=EQ; } break; -case 275: - // line 2352 "./../src/mycompiler/myparser/JavaParser.jay" +case 273: + // line 2340 "./../src/mycompiler/myparser/JavaParser.jay" { Binary NEQ = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); NotEqualOp NEO = new NotEqualOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3077,14 +3061,14 @@ case 275: yyVal=NEQ; } break; -case 276: - // line 2363 "./../src/mycompiler/myparser/JavaParser.jay" +case 274: + // line 2351 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 277: - // line 2367 "./../src/mycompiler/myparser/JavaParser.jay" +case 275: + // line 2355 "./../src/mycompiler/myparser/JavaParser.jay" { Binary LO = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); LessOp LOO = new LessOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3095,8 +3079,8 @@ case 277: yyVal=LO; } break; -case 278: - // line 2377 "./../src/mycompiler/myparser/JavaParser.jay" +case 276: + // line 2365 "./../src/mycompiler/myparser/JavaParser.jay" { Binary GO = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); GreaterOp GOO = new GreaterOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3107,8 +3091,8 @@ case 278: yyVal=GO; } break; -case 279: - // line 2387 "./../src/mycompiler/myparser/JavaParser.jay" +case 277: + // line 2375 "./../src/mycompiler/myparser/JavaParser.jay" { Binary LE = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); LessEquOp LEO = new LessEquOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3119,8 +3103,8 @@ case 279: yyVal=LE; } break; -case 280: - // line 2397 "./../src/mycompiler/myparser/JavaParser.jay" +case 278: + // line 2385 "./../src/mycompiler/myparser/JavaParser.jay" { Binary GE = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); GreaterEquOp GEO = new GreaterEquOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3131,8 +3115,8 @@ case 280: yyVal=GE; } break; -case 281: - // line 2407 "./../src/mycompiler/myparser/JavaParser.jay" +case 279: + // line 2395 "./../src/mycompiler/myparser/JavaParser.jay" { InstanceOf ISO=new InstanceOf(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); ISO.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -3140,20 +3124,20 @@ case 281: yyVal=ISO; } break; +case 280: + // line 2403 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 281: + // line 2408 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; case 282: - // line 2415 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 283: - // line 2420 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 284: - // line 2424 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2412 "./../src/mycompiler/myparser/JavaParser.jay" { Binary AD = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); PlusOp PO = new PlusOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3164,8 +3148,8 @@ case 284: yyVal=AD; } break; -case 285: - // line 2434 "./../src/mycompiler/myparser/JavaParser.jay" +case 283: + // line 2422 "./../src/mycompiler/myparser/JavaParser.jay" { Binary MI = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); MinusOp MO = new MinusOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3176,14 +3160,14 @@ case 285: yyVal=MI; } break; -case 286: - // line 2445 "./../src/mycompiler/myparser/JavaParser.jay" +case 284: + // line 2433 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 287: - // line 2449 "./../src/mycompiler/myparser/JavaParser.jay" +case 285: + // line 2437 "./../src/mycompiler/myparser/JavaParser.jay" { Binary ML = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); TimesOp TO = new TimesOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3194,8 +3178,8 @@ case 287: yyVal=ML; } break; -case 288: - // line 2459 "./../src/mycompiler/myparser/JavaParser.jay" +case 286: + // line 2447 "./../src/mycompiler/myparser/JavaParser.jay" { Binary DV = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); DivideOp DO = new DivideOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3206,8 +3190,8 @@ case 288: yyVal = DV; } break; -case 289: - // line 2469 "./../src/mycompiler/myparser/JavaParser.jay" +case 287: + // line 2457 "./../src/mycompiler/myparser/JavaParser.jay" { Binary MD = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); ModuloOp MO = new ModuloOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3218,7 +3202,7 @@ case 289: yyVal =MD; } break; - // line 3222 "-" + // line 3206 "-" } yyTop -= yyLen[yyN]; yyState = yyStates[yyTop]; @@ -3249,35 +3233,35 @@ case 289: } protected static final short yyLhs [] = { -1, - 0, 0, 0, 0, 0, 100, 28, 28, 27, 94, - 94, 29, 29, 107, 107, 25, 26, 26, 23, 1, + 0, 0, 0, 0, 0, 99, 27, 27, 26, 93, + 93, 28, 28, 106, 106, 24, 25, 25, 23, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 8, - 8, 2, 2, 2, 2, 114, 114, 114, 114, 114, - 114, 117, 117, 117, 7, 7, 42, 42, 30, 34, - 34, 3, 3, 35, 35, 16, 16, 43, 43, 43, - 43, 43, 43, 31, 4, 4, 33, 17, 17, 17, - 24, 24, 32, 115, 115, 116, 116, 5, 5, 18, - 18, 112, 108, 108, 10, 6, 20, 20, 11, 12, - 12, 12, 12, 12, 12, 14, 44, 44, 109, 109, - 110, 110, 110, 110, 50, 96, 99, 99, 95, 95, - 97, 97, 98, 98, 13, 13, 13, 13, 13, 13, + 8, 2, 2, 2, 2, 113, 113, 113, 113, 113, + 113, 116, 116, 116, 7, 7, 41, 41, 29, 33, + 33, 3, 3, 34, 34, 16, 16, 42, 42, 42, + 42, 42, 42, 30, 4, 4, 32, 17, 17, 17, + 31, 114, 114, 115, 115, 5, 5, 18, 18, 111, + 107, 107, 10, 6, 20, 20, 11, 12, 12, 12, + 12, 12, 12, 14, 43, 43, 108, 108, 109, 109, + 109, 109, 49, 95, 98, 98, 94, 94, 96, 96, + 97, 97, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 41, 41, 41, 41, 19, - 19, 45, 46, 46, 52, 52, 111, 111, 40, 40, - 15, 15, 38, 38, 118, 39, 21, 82, 82, 51, - 51, 105, 105, 37, 22, 80, 48, 83, 83, 83, - 83, 83, 73, 73, 36, 36, 49, 49, 81, 81, - 81, 81, 88, 89, 85, 86, 86, 86, 86, 86, - 86, 86, 86, 71, 71, 91, 79, 92, 92, 84, - 84, 84, 70, 101, 101, 74, 74, 74, 74, 74, - 74, 90, 87, 69, 69, 103, 47, 47, 53, 53, - 72, 104, 102, 102, 102, 102, 102, 102, 75, 76, - 77, 78, 106, 106, 106, 106, 93, 93, 68, 68, - 59, 59, 59, 59, 59, 57, 57, 57, 57, 56, - 67, 67, 55, 55, 55, 55, 58, 58, 58, 66, - 66, 54, 54, 54, 54, 54, 54, 54, 54, 113, - 65, 65, 64, 64, 64, 63, 63, 63, 63, 63, - 63, 62, 61, 61, 61, 60, 60, 60, 60, + 13, 13, 13, 40, 40, 40, 40, 19, 19, 44, + 45, 45, 51, 51, 110, 110, 39, 39, 15, 15, + 37, 37, 117, 38, 21, 81, 81, 50, 50, 104, + 104, 36, 22, 79, 47, 82, 82, 82, 82, 82, + 72, 72, 35, 35, 48, 48, 80, 80, 80, 80, + 87, 88, 84, 85, 85, 85, 85, 85, 85, 85, + 85, 70, 70, 90, 78, 91, 91, 83, 83, 83, + 69, 100, 100, 73, 73, 73, 73, 73, 73, 89, + 86, 68, 68, 102, 46, 46, 52, 52, 71, 103, + 101, 101, 101, 101, 101, 101, 74, 75, 76, 77, + 105, 105, 105, 105, 92, 92, 67, 67, 58, 58, + 58, 58, 58, 56, 56, 56, 56, 55, 66, 66, + 54, 54, 54, 54, 57, 57, 57, 65, 65, 53, + 53, 53, 53, 53, 53, 53, 53, 112, 64, 64, + 63, 63, 63, 62, 62, 62, 62, 62, 62, 61, + 60, 60, 60, 59, 59, 59, 59, }; protected static final short yyLen [] = { 2, 1, 2, 3, 2, 3, 3, 1, 2, 3, 1, @@ -3287,491 +3271,488 @@ case 289: 3, 1, 3, 3, 2, 3, 1, 2, 2, 2, 3, 2, 3, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, - 1, 3, 2, 1, 3, 0, 3, 1, 1, 1, - 1, 2, 2, 3, 6, 2, 3, 1, 3, 2, - 3, 4, 2, 3, 4, 2, 2, 3, 3, 4, - 2, 3, 3, 4, 2, 1, 1, 3, 1, 3, - 1, 3, 1, 3, 3, 2, 3, 4, 3, 4, - 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, - 1, 2, 2, 2, 3, 1, 3, 1, 3, 1, - 3, 1, 1, 2, 1, 3, 4, 5, 1, 3, - 3, 4, 1, 1, 2, 1, 1, 1, 1, 2, - 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, - 1, 1, 5, 7, 5, 9, 8, 8, 8, 7, - 7, 7, 6, 1, 1, 1, 2, 2, 3, 1, - 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, - 1, 7, 5, 1, 3, 1, 1, 1, 2, 3, - 3, 1, 1, 1, 1, 1, 1, 1, 2, 2, - 2, 2, 3, 4, 5, 6, 4, 5, 1, 3, - 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, - 3, 1, 1, 1, 1, 1, 1, 1, 1, 4, - 1, 3, 1, 3, 3, 1, 3, 3, 3, 3, - 3, 1, 1, 3, 3, 1, 3, 3, 3, + 2, 1, 3, 0, 3, 1, 1, 1, 1, 2, + 2, 3, 6, 2, 3, 1, 3, 2, 3, 4, + 2, 3, 4, 2, 2, 3, 3, 4, 2, 3, + 3, 4, 2, 1, 1, 3, 1, 3, 1, 3, + 1, 3, 3, 2, 3, 4, 3, 4, 4, 5, + 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, + 2, 2, 3, 1, 3, 1, 3, 1, 3, 1, + 1, 2, 1, 3, 4, 5, 1, 3, 3, 4, + 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, + 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, + 5, 7, 5, 9, 8, 8, 8, 7, 7, 7, + 6, 1, 1, 1, 2, 2, 3, 1, 1, 1, + 1, 3, 3, 1, 1, 1, 1, 1, 1, 7, + 5, 1, 3, 1, 1, 1, 2, 3, 3, 1, + 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, + 3, 4, 5, 6, 4, 5, 1, 3, 1, 1, + 2, 2, 1, 1, 1, 1, 1, 1, 1, 3, + 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, + 1, 1, 1, 1, 1, 1, 1, 4, 1, 3, + 1, 3, 3, 1, 3, 3, 3, 3, 3, 1, + 1, 3, 3, 1, 3, 3, 3, }; protected static final short yyDefRed [] = { 0, - 62, 153, 176, 0, 63, 175, 60, 59, 58, 0, - 0, 0, 61, 19, 0, 14, 15, 0, 7, 0, - 156, 164, 154, 0, 0, 0, 0, 47, 0, 0, - 10, 0, 0, 13, 12, 0, 0, 0, 0, 0, - 0, 73, 8, 0, 0, 0, 0, 0, 0, 48, - 11, 0, 0, 0, 0, 0, 0, 20, 0, 0, - 6, 0, 9, 0, 0, 0, 0, 32, 0, 74, - 0, 137, 139, 5, 0, 0, 0, 0, 106, 107, - 0, 49, 64, 67, 50, 0, 0, 0, 0, 45, - 0, 80, 0, 81, 0, 0, 56, 68, 0, 0, - 0, 157, 0, 0, 0, 70, 0, 69, 22, 0, - 0, 24, 16, 0, 18, 0, 54, 0, 52, 0, - 65, 79, 78, 0, 0, 0, 0, 0, 34, 0, - 77, 21, 0, 0, 33, 0, 0, 0, 31, 0, - 82, 0, 0, 0, 113, 0, 0, 132, 0, 142, - 96, 0, 134, 46, 57, 0, 93, 90, 0, 0, + 62, 151, 174, 0, 63, 173, 60, 59, 58, 0, + 0, 0, 61, 19, 0, 14, 15, 13, 12, 7, + 0, 0, 154, 162, 152, 0, 0, 0, 0, 47, + 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 8, 0, 0, 0, 71, 0, 0, 0, 0, 0, + 48, 11, 0, 0, 0, 0, 0, 0, 20, 0, + 0, 6, 9, 0, 0, 0, 0, 32, 0, 16, + 72, 0, 135, 137, 5, 0, 0, 0, 0, 104, + 105, 0, 49, 64, 67, 50, 0, 0, 0, 0, + 45, 0, 78, 0, 79, 0, 0, 56, 68, 0, + 0, 0, 155, 0, 0, 0, 70, 0, 69, 22, + 0, 0, 24, 0, 18, 0, 54, 0, 52, 0, + 65, 77, 76, 0, 0, 0, 0, 0, 34, 0, + 75, 21, 0, 0, 33, 0, 0, 0, 31, 0, + 80, 0, 0, 0, 111, 0, 0, 130, 0, 140, + 94, 0, 132, 46, 57, 0, 91, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 83, 26, 51, 29, 53, 66, 0, 86, 0, 55, - 75, 23, 0, 25, 35, 111, 0, 108, 0, 0, - 0, 254, 0, 262, 266, 268, 267, 263, 269, 264, - 265, 0, 0, 0, 196, 97, 0, 0, 140, 0, - 0, 0, 179, 0, 158, 0, 0, 253, 250, 0, - 0, 256, 0, 207, 208, 0, 0, 181, 168, 143, - 159, 171, 172, 169, 170, 180, 182, 206, 0, 0, - 125, 151, 161, 0, 145, 0, 0, 89, 0, 0, - 0, 0, 149, 0, 165, 141, 0, 0, 0, 0, - 0, 0, 245, 286, 0, 0, 276, 0, 0, 0, - 0, 0, 0, 0, 194, 173, 87, 241, 242, 248, - 249, 174, 195, 255, 259, 99, 0, 119, 94, 91, - 0, 0, 0, 135, 0, 0, 84, 0, 101, 0, - 0, 0, 27, 0, 0, 0, 198, 0, 0, 0, - 229, 230, 219, 0, 0, 0, 98, 144, 167, 216, - 0, 0, 231, 232, 197, 227, 228, 224, 225, 226, - 223, 0, 160, 0, 152, 114, 129, 120, 92, 0, - 0, 0, 243, 244, 258, 0, 0, 0, 0, 0, + 81, 26, 51, 29, 53, 66, 0, 84, 0, 55, + 73, 23, 0, 25, 35, 109, 0, 106, 0, 0, + 0, 252, 0, 260, 264, 266, 265, 261, 267, 262, + 263, 0, 0, 0, 194, 95, 0, 0, 138, 0, + 0, 177, 0, 156, 0, 0, 251, 248, 0, 0, + 254, 0, 205, 206, 0, 0, 179, 166, 141, 157, + 169, 170, 167, 168, 178, 180, 204, 0, 0, 123, + 149, 159, 0, 143, 0, 0, 87, 0, 0, 0, + 0, 147, 0, 163, 139, 0, 0, 0, 0, 0, + 0, 0, 243, 284, 0, 0, 274, 0, 0, 0, + 0, 0, 0, 0, 192, 171, 85, 239, 240, 246, + 247, 172, 193, 253, 257, 97, 0, 117, 92, 89, + 0, 0, 0, 133, 0, 0, 82, 0, 99, 0, + 0, 0, 27, 0, 0, 0, 196, 0, 0, 0, + 227, 228, 217, 0, 0, 0, 96, 142, 165, 214, + 0, 0, 229, 230, 195, 225, 226, 222, 223, 224, + 221, 0, 158, 0, 150, 112, 127, 118, 90, 0, + 0, 0, 241, 242, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 100, 126, 0, 0, 121, 95, 0, 103, - 102, 0, 0, 112, 0, 0, 0, 199, 0, 220, - 233, 162, 0, 217, 221, 218, 0, 204, 205, 146, - 150, 0, 0, 287, 288, 289, 0, 0, 281, 279, - 280, 277, 278, 0, 0, 0, 0, 0, 0, 0, - 130, 122, 0, 0, 104, 0, 0, 0, 0, 0, - 0, 0, 234, 0, 237, 0, 270, 147, 0, 85, - 0, 0, 0, 0, 0, 0, 0, 0, 183, 0, - 202, 201, 185, 163, 235, 0, 238, 148, 193, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 236, 192, - 191, 0, 190, 0, 0, 0, 0, 0, 184, 189, - 188, 187, 0, 0, 0, 186, 0, 213, 0, 212, + 0, 0, 98, 124, 0, 0, 119, 93, 0, 101, + 100, 0, 0, 110, 0, 0, 0, 197, 0, 218, + 231, 160, 0, 215, 219, 216, 0, 202, 203, 144, + 148, 0, 0, 285, 286, 287, 0, 0, 279, 277, + 278, 275, 276, 0, 0, 0, 0, 0, 0, 0, + 128, 120, 0, 0, 102, 0, 0, 0, 0, 0, + 0, 0, 232, 0, 235, 0, 268, 145, 0, 83, + 0, 0, 0, 0, 0, 0, 0, 0, 181, 0, + 200, 199, 183, 161, 233, 0, 236, 146, 191, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 234, 190, + 189, 0, 188, 0, 0, 0, 0, 0, 182, 187, + 186, 185, 0, 0, 0, 184, 0, 211, 0, 210, }; protected static final short yyDgoto [] = { 15, - 16, 17, 68, 120, 121, 122, 58, 33, 40, 123, - 91, 92, 93, 94, 95, 96, 97, 98, 208, 100, - 209, 102, 34, 0, 35, 37, 19, 20, 211, 59, - 82, 21, 85, 60, 69, 22, 23, 24, 25, 254, - 212, 27, 28, 213, 151, 214, 385, 215, 216, 153, - 245, 314, 217, 218, 219, 220, 262, 263, 264, 265, - 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 222, 382, 223, 278, 279, 280, 281, 228, 0, - 229, 230, 231, 440, 232, 233, 441, 234, 235, 442, - 236, 237, 282, 29, 79, 80, 187, 146, 81, 30, - 283, 332, 321, 239, 383, 284, 31, 106, 107, 171, - 301, 108, 285, 0, 71, 42, 0, 0, + 16, 17, 68, 120, 121, 122, 59, 35, 40, 123, + 92, 93, 94, 95, 96, 97, 98, 99, 208, 101, + 209, 103, 18, 19, 37, 20, 21, 261, 60, 83, + 23, 86, 61, 69, 24, 25, 26, 27, 253, 211, + 29, 30, 212, 151, 213, 385, 214, 215, 153, 244, + 314, 216, 217, 218, 219, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 221, 382, 222, 278, 279, 280, 281, 227, 0, 228, + 229, 230, 440, 231, 232, 441, 233, 234, 442, 235, + 236, 282, 31, 80, 81, 187, 146, 82, 32, 283, + 332, 321, 238, 383, 284, 33, 107, 108, 171, 301, + 109, 285, 0, 72, 45, 0, 0, }; - protected static final short yySindex [] = { 1033, - 0, 0, 0, -231, 0, 0, 0, 0, 0, -209, - -209, -118, 0, 0, 0, 0, 0, 149, 0, 974, - 0, 0, 0, 125, 148, 122, 1088, 0, 1136, 974, - 0, 187, -100, 0, 0, 243, 208, 227, 233, -88, - 122, 0, 0, 1136, 188, 215, 1033, -231, -118, 0, - 0, 974, 1136, 27, -209, -209, 2396, 0, -94, -3, - 0, 32, 0, -39, 27, -209, 2426, 0, 15, 0, - 21, 0, 0, 0, -100, -88, 1136, 104, 0, 0, - 130, 0, 0, 0, 0, 275, 103, 378, 27, 0, - 179, 0, 275, 0, 135, 2457, 0, 0, 72, 373, - 387, 0, 40, 154, 1907, 0, 327, 0, 0, -3, - -209, 0, 0, 0, 0, 153, 0, 378, 0, 2487, - 0, 0, 0, 179, 407, 103, 1907, -209, 0, 122, - 0, 0, -94, -3, 0, 15, -209, 27, 0, 1964, - 0, 378, 135, -31, 0, 159, 103, 0, 154, 0, - 0, -209, 0, 0, 0, 183, 0, 0, 966, -17, - 378, 135, 158, 426, 103, 221, 135, 154, 327, 2022, - 0, 0, 0, 0, 0, 0, 103, 0, 190, 0, - 0, 0, -3, 0, 0, 0, 458, 0, 463, 469, - 459, 0, 470, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 824, 824, 0, 0, 60, 477, 0, 149, - 219, 183, 0, 2079, 0, 465, 186, 0, 0, 480, - -227, 0, 468, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, - 0, 0, 0, 183, 0, 280, 27, 0, 135, 135, - 472, 387, 0, 489, 0, 0, -209, 60, 824, 824, - 824, -227, 0, 0, 389, 471, 0, 28, 133, 497, - 445, 416, 238, 241, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 398, 0, 0, 0, - 135, 103, 103, 0, 135, 282, 0, 511, 0, 2127, - 2183, 137, 0, -209, 503, 966, 0, 495, 966, 219, - 0, 0, 0, 399, 520, 477, 0, 0, 0, 0, - 583, 254, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 966, 0, 249, 0, 0, 0, 0, 0, -209, - 516, 31, 0, 0, 0, 824, 824, 824, 824, 824, - -209, 824, 824, 824, 824, 824, 824, 824, 824, 824, - 824, 824, 0, 0, 135, 135, 0, 0, 622, 0, - 0, 2231, 966, 0, 639, 498, 517, 0, 518, 0, - 0, 0, 405, 0, 0, 0, 524, 0, 0, 0, - 0, 729, 824, 0, 0, 0, 389, 389, 0, 0, - 0, 0, 0, 28, 28, 133, 497, 445, 416, 238, - 0, 0, 507, 413, 0, 508, 746, 509, 790, 2270, - 2309, 966, 0, 807, 0, 456, 0, 0, 510, 0, - 2309, 529, 853, 910, 519, 535, 536, 0, 0, 310, - 0, 0, 0, 0, 0, 457, 0, 0, 0, 2309, - 2309, 541, 2309, 543, 927, 966, 966, 2309, 0, 0, - 0, 2309, 0, 2309, 2309, 546, 547, 548, 0, 0, - 0, 0, 2309, 2270, 2270, 0, 323, 0, 2270, 0, + protected static final short yySindex [] = { 1718, + 0, 0, 0, -259, 0, 0, 0, 0, 0, -207, + -207, -185, 0, 0, 0, 0, 0, 0, 0, 0, + 483, 17, 0, 0, 0, 44, 125, 167, 403, 0, + 1748, 483, 0, 173, -114, 100, 132, 191, 194, -91, + 0, 1748, -54, 167, 0, 171, 202, 1718, -259, -185, + 0, 0, 483, 1748, -30, -207, -207, 2364, 0, -93, + -5, 0, 0, -14, -30, -207, 2404, 0, 9, 0, + 0, 75, 0, 0, 0, -114, -91, 1748, 52, 0, + 0, 138, 0, 0, 0, 0, 217, 69, 305, -30, + 0, 139, 0, 217, 0, 88, 2434, 0, 0, 106, + 378, 303, 0, 346, 151, 1652, 0, 334, 0, 0, + -5, -207, 0, 0, 0, 166, 0, 305, 0, 2462, + 0, 0, 0, 139, 406, 69, 1652, -207, 0, 167, + 0, 0, -93, -5, 0, 9, -207, -30, 0, 1964, + 0, 305, 88, -24, 0, 168, 69, 0, 151, 0, + 0, -207, 0, 0, 0, 161, 0, 0, 982, -19, + 305, 88, 177, 407, 69, 367, 88, 151, 334, 2020, + 0, 0, 0, 0, 0, 0, 69, 0, 172, 0, + 0, 0, -5, 0, 0, 0, 388, 0, 432, 439, + 522, 0, 440, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1010, 1010, 0, 0, 45, 438, 0, 155, + 161, 0, 2065, 0, 433, 181, 0, 0, 451, 97, + 0, 447, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -47, 0, 0, + 0, 0, 161, 0, 131, -30, 0, 88, 88, 453, + 303, 0, 469, 0, 0, -207, 45, 1010, 1010, 1010, + 156, 97, 0, 0, 262, 348, 0, 27, -206, 476, + 426, 397, 219, 218, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 271, 0, 0, 0, + 88, 69, 69, 0, 88, 280, 0, 487, 0, 2117, + 2161, 63, 0, -207, 563, 982, 0, 471, 982, 156, + 0, 0, 0, 285, 614, 438, 0, 0, 0, 0, + 658, 234, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 982, 0, 327, 0, 0, 0, 0, 0, -207, + 497, 13, 0, 0, 0, 1010, 1010, 1010, 1010, 1010, + -207, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, + 1010, 1010, 0, 0, 88, 88, 0, 0, 694, 0, + 0, 2209, 982, 0, 711, 479, 498, 0, 504, 0, + 0, 0, 370, 0, 0, 0, 501, 0, 0, 0, + 0, 739, 1010, 0, 0, 0, 262, 262, 0, 0, + 0, 0, 0, 27, 27, -206, 476, 426, 397, 219, + 0, 0, 488, 390, 0, 489, 767, 491, 794, 2249, + 2282, 982, 0, 855, 0, 398, 0, 0, 499, 0, + 2282, 515, 884, 901, 507, 523, 530, 0, 0, 304, + 0, 0, 0, 0, 0, 412, 0, 0, 0, 2282, + 2282, 531, 2282, 533, 930, 982, 982, 2282, 0, 0, + 0, 2282, 0, 2282, 2282, 534, 537, 538, 0, 0, + 0, 0, 2282, 2249, 2249, 0, 313, 0, 2249, 0, }; protected static final short yyRindex [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1239, 0, 0, - 0, 0, 0, 1587, 2367, 0, 0, 0, 592, 0, - 0, -96, 0, 0, 0, 0, 0, 0, -84, 0, - 0, 0, 0, 593, 0, 0, 0, 0, 0, 0, - 0, 0, 597, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 598, 170, 0, 0, - 0, 0, 0, 0, 0, 2515, 0, -23, 0, 0, - 0, 0, 0, 0, -4, 0, 0, 0, 0, 0, - 335, 0, -89, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 314, 0, 0, 0, -38, 0, 0, + 0, 1067, 0, 0, 0, 859, 2336, 0, 0, 0, + 586, 0, 0, -108, 0, 0, 0, 0, -87, 0, + 0, 588, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 590, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 592, 178, 0, + 0, 0, 0, 0, 0, 0, 2492, 0, -9, 0, + 0, 0, 0, 0, 0, -13, 0, 0, 0, 0, + 0, 325, 0, -26, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 207, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 35, 10, 0, 0, 0, 0, 25, 0, 0, 0, + 249, -11, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 196, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -29, 0, 0, 0, 0, 0, 407, 0, 173, - 681, 0, 0, 0, 0, 0, 0, 0, 0, 1019, - 0, 0, 0, 0, 0, -55, -34, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, - 0, 0, 0, 0, 0, 0, 0, 0, 39, 44, - 0, 542, 0, 52, 0, 0, 0, 0, 0, 0, - 0, 1997, 0, 0, 1723, 1618, 0, 5, 1629, 1122, - 1133, 1294, 1338, 1406, 0, 0, 0, 0, 0, 0, + 0, -36, 0, 0, 0, 0, 0, 536, 0, 66, + 0, 0, 0, 0, 0, 0, 0, 0, 182, 0, + 0, 0, 0, 0, -57, 14, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -46, 0, + 0, 0, 0, 0, 0, 0, 0, 24, 25, 0, + 539, 0, 32, 0, 0, 0, 0, 0, 0, 0, + 576, 1926, 0, 0, 1813, 1643, 0, 1389, 1706, 1199, + 1318, 1344, 1355, 1415, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 58, 0, 0, 0, 82, 0, 0, -12, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1432, - 0, 0, 0, 0, 0, 544, 0, 0, 0, 0, + 33, 0, 0, 0, 47, 0, 0, -20, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1426, + 0, 0, 0, 0, 0, 540, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 301, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 292, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 106, 107, 0, 0, 0, 0, + 0, 0, 0, 0, 55, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1852, 1909, 0, 0, - 0, 0, 0, 1713, 1768, 1684, 1490, 1527, 1516, 1575, + 0, 0, 0, 0, 0, 0, 1833, 1860, 0, 0, + 0, 0, 0, 1740, 1794, 1766, 1452, 1489, 1515, 1541, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1835, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1915, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; - protected static final short yyGindex [] = { 557, - 0, 0, 84, 0, 485, 0, 77, 558, 559, 0, - 262, 0, 41, 0, 2633, 0, 521, 0, 36, 86, - 1, -116, 19, 0, 0, 0, 69, 577, -10, 537, - -134, -50, 7, 12, 539, 0, 0, 361, -128, 0, - 573, 258, -1, -79, 0, -157, 0, 0, 0, 382, - 287, 92, 0, 0, 0, 0, -63, 0, -147, 128, - 0, 110, 115, 269, 270, 276, 277, 279, 0, 0, - 305, 0, -151, 0, -45, -6, 55, 121, 0, 0, - -176, -194, 2374, -82, 0, 0, 0, 0, 0, 0, - 0, 0, 311, 351, -56, 504, 0, 0, 579, 0, - 160, 0, 0, 0, -196, 237, 356, 0, 540, 478, - 0, 0, 0, 0, 0, 0, 0, 0, + protected static final short yyGindex [] = { 552, + 0, 0, -3, 0, 482, 0, 443, 556, 557, 0, + 265, 0, 2, 0, 2580, 0, 512, 0, -17, -44, + 37, -117, 91, 0, 0, 19, 578, 1, 548, -133, + -50, 64, -16, 535, 0, 0, 358, -119, 0, 467, + 42, 46, -23, 0, -132, 0, 0, 0, 500, 282, + -63, 0, 0, 0, 0, -137, 0, 130, 72, 0, + 296, 87, 272, 273, 274, 270, 277, 0, 0, 310, + 0, 127, 0, -55, -4, 43, 78, 0, 0, -276, + -192, 2344, -75, 0, 0, 0, 0, 0, 0, 0, + 0, 312, 158, -59, 508, 0, 0, 580, 0, 232, + 0, 0, 0, 59, 268, 381, 0, 550, 492, 0, + 0, 0, 0, 0, 0, 0, 0, }; - protected static final short yyTable [] = { 36, - 38, 76, 115, 209, 83, 84, 141, 277, 186, 242, - 19, 165, 300, 150, 165, 84, 19, 253, 18, 318, - 165, 19, 57, 286, 210, 50, 30, 243, 57, 165, - 19, 19, 145, 254, 67, 165, 19, 165, 28, 308, - 111, 273, 273, 243, 18, 273, 273, 273, 273, 273, - 273, 273, 19, 255, 131, 311, 312, 101, 128, 18, - 84, 19, 123, 273, 130, 18, 211, 19, 116, 32, - 110, 393, 117, 18, 18, 103, 221, 84, 165, 160, - 323, 324, 131, 133, 18, 18, 134, 354, 43, 355, - 243, 14, 99, 165, 224, 165, 101, 127, 273, 41, - 313, 83, 115, 50, 101, 318, 221, 125, 331, 18, - 105, 343, 344, 345, 103, 156, 124, 173, 131, 57, - 43, 45, 341, 103, 224, 50, 123, 333, 273, 18, - 157, 99, 116, 225, 180, 109, 112, 67, 18, 163, - 117, 243, 18, 372, 183, 18, 18, 133, 18, 252, - 221, 132, 129, 376, 377, 18, 256, 379, 210, 135, - 125, 127, 18, 225, 128, 118, 115, 55, 224, 386, - 18, 30, 414, 138, 105, 374, 144, 318, 18, 66, - 124, 56, 39, 28, 18, 30, 172, 56, 210, 164, - 336, 139, 310, 310, 226, 426, 138, 373, 394, 395, - 396, 156, 247, 296, 117, 391, 83, 225, 41, 182, - 184, 76, 13, 109, 174, 45, 289, 243, 13, 185, - 248, 416, 399, 418, 226, 18, 2, 446, 128, 118, - 3, 109, 210, 13, 251, 246, 221, 221, 46, 110, - 2, 384, 6, 438, 3, 427, 54, 316, 310, 310, - 310, 287, 248, 248, 224, 224, 6, 110, 315, 303, - 227, 114, 19, 76, 62, 432, 63, 435, 226, 202, - 444, 19, 64, 249, 249, 18, 18, 19, 19, 19, - 72, 452, 454, 202, 19, 19, 19, 19, 62, 83, - 227, 19, 65, 225, 225, 254, 254, 438, 438, 238, - 351, 61, 438, 466, 467, 468, 273, 73, 221, 273, - 273, 273, 273, 273, 105, 255, 255, 2, 210, 210, - 335, 3, 18, 334, 127, 156, 224, 78, 124, 238, - 352, 353, 113, 6, 227, 310, 310, 310, 310, 310, - 368, 310, 310, 310, 310, 310, 310, 310, 310, 310, - 310, 310, 18, 105, 226, 226, 221, 221, 18, 16, - 202, 326, 327, 328, 329, 225, 166, 221, 330, 18, - 44, 137, 17, 238, 224, 224, 240, 127, 140, 2, - 53, 124, 310, 3, 51, 224, 221, 221, 166, 221, - 210, 477, 478, 88, 221, 6, 480, 140, 221, 51, - 221, 221, 77, 142, 224, 224, 240, 224, 51, 221, - 221, 221, 224, 225, 225, 221, 224, 144, 224, 224, - 227, 227, 14, 152, 225, 348, 226, 224, 224, 224, - 346, 158, 51, 224, 356, 347, 2, 357, 363, 380, - 3, 334, 334, 225, 225, 423, 225, 159, 422, 170, - 240, 225, 6, 429, 161, 225, 422, 225, 225, 238, - 238, 400, 401, 402, 403, 178, 225, 225, 225, 147, - 404, 405, 225, 76, 226, 226, 397, 398, 2, 118, - 13, 13, 3, 255, 290, 226, 13, 13, 13, 13, - 302, 261, 227, 13, 6, 304, 447, 459, 258, 422, - 422, 259, 305, 260, 226, 226, 2, 226, 306, 309, - 3, 292, 226, 349, 320, 350, 226, 307, 226, 226, - 156, 14, 6, 319, 241, 322, 325, 226, 226, 226, - 339, 238, 340, 226, 358, 261, 240, 240, 359, 360, - 227, 227, 258, 288, 361, 259, 362, 260, 294, 202, - 369, 227, 261, 378, 387, 392, 419, 420, 421, 258, - 381, 375, 259, 424, 260, 428, 430, 433, 448, 450, - 227, 227, 26, 227, 456, 457, 458, 455, 227, 238, - 238, 462, 227, 464, 227, 227, 473, 474, 475, 479, - 238, 1, 2, 227, 227, 227, 4, 3, 47, 227, - 88, 136, 177, 74, 176, 75, 52, 76, 240, 238, - 238, 133, 238, 70, 136, 261, 155, 238, 342, 26, - 390, 238, 258, 238, 238, 259, 406, 260, 407, 104, - 337, 338, 238, 238, 238, 408, 388, 409, 238, 126, - 410, 188, 389, 116, 169, 0, 297, 0, 0, 0, - 0, 0, 0, 0, 261, 0, 240, 240, 0, 0, - 0, 258, 413, 149, 259, 0, 260, 240, 104, 0, - 0, 261, 364, 0, 0, 0, 367, 168, 258, 0, - 0, 259, 0, 260, 0, 0, 240, 240, 0, 240, - 0, 0, 126, 0, 240, 0, 177, 417, 240, 179, - 240, 240, 181, 0, 0, 140, 0, 0, 0, 240, - 240, 240, 0, 0, 0, 240, 244, 247, 247, 0, - 0, 247, 247, 247, 247, 247, 0, 247, 0, 0, - 0, 0, 244, 257, 0, 0, 0, 0, 293, 247, - 247, 222, 247, 0, 0, 192, 411, 412, 0, 0, + protected static final short yyTable [] = { 253, + 22, 207, 220, 19, 163, 84, 85, 163, 58, 19, + 36, 38, 209, 331, 30, 85, 241, 186, 252, 13, + 318, 286, 163, 19, 19, 252, 242, 115, 22, 58, + 145, 67, 220, 13, 163, 28, 19, 300, 112, 41, + 100, 34, 242, 111, 22, 129, 121, 114, 22, 163, + 19, 163, 128, 393, 19, 19, 22, 22, 22, 134, + 164, 85, 43, 141, 13, 129, 22, 22, 125, 19, + 150, 41, 208, 135, 51, 220, 44, 85, 131, 100, + 245, 19, 125, 113, 223, 313, 354, 163, 355, 242, + 103, 122, 22, 14, 102, 356, 287, 22, 357, 106, + 19, 84, 144, 46, 250, 115, 22, 318, 127, 129, + 121, 114, 22, 126, 223, 39, 183, 58, 130, 116, + 22, 125, 341, 373, 22, 333, 220, 22, 22, 117, + 22, 67, 185, 102, 46, 224, 131, 22, 106, 242, + 210, 102, 131, 438, 22, 43, 125, 113, 104, 156, + 296, 51, 22, 56, 103, 122, 74, 223, 62, 30, + 22, 127, 220, 220, 157, 224, 22, 57, 372, 115, + 210, 335, 51, 30, 334, 173, 66, 126, 42, 318, + 28, 138, 225, 116, 374, 251, 336, 104, 57, 54, + 63, 180, 255, 316, 315, 315, 104, 438, 438, 139, + 43, 43, 438, 310, 310, 84, 391, 22, 224, 138, + 78, 246, 225, 210, 44, 47, 242, 226, 244, 244, + 156, 107, 244, 244, 244, 244, 244, 174, 244, 247, + 108, 399, 55, 2, 220, 289, 64, 3, 2, 107, + 244, 244, 3, 244, 223, 223, 70, 226, 108, 6, + 246, 246, 16, 65, 6, 225, 22, 22, 310, 310, + 310, 253, 253, 73, 19, 17, 326, 327, 328, 329, + 79, 19, 19, 330, 13, 244, 202, 19, 19, 19, + 19, 202, 220, 220, 19, 277, 114, 252, 252, 84, + 226, 19, 163, 220, 74, 224, 224, 384, 348, 351, + 210, 210, 2, 346, 22, 244, 3, 163, 347, 163, + 19, 363, 220, 220, 334, 220, 223, 308, 6, 137, + 220, 247, 247, 156, 220, 380, 220, 220, 334, 352, + 353, 124, 311, 312, 22, 220, 220, 220, 368, 140, + 22, 220, 225, 225, 144, 202, 310, 310, 310, 310, + 310, 22, 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 310, 159, 223, 223, 74, 224, 138, 142, + 166, 237, 210, 245, 245, 223, 152, 226, 226, 220, + 220, 220, 220, 86, 124, 160, 220, 343, 344, 345, + 349, 166, 350, 310, 223, 223, 2, 223, 477, 478, + 3, 237, 223, 480, 323, 324, 223, 239, 223, 223, + 423, 52, 6, 422, 225, 224, 224, 223, 223, 223, + 397, 398, 52, 223, 2, 304, 224, 414, 3, 147, + 429, 376, 377, 422, 52, 379, 158, 239, 447, 118, + 6, 422, 404, 405, 237, 224, 224, 386, 224, 226, + 426, 161, 459, 224, 244, 422, 170, 224, 52, 224, + 224, 254, 225, 225, 178, 290, 28, 14, 224, 224, + 224, 305, 302, 225, 224, 394, 395, 396, 306, 309, + 239, 156, 446, 244, 244, 244, 244, 244, 244, 244, + 244, 319, 225, 225, 48, 225, 322, 226, 226, 416, + 225, 418, 110, 113, 225, 325, 225, 225, 226, 320, + 71, 339, 340, 358, 28, 225, 225, 225, 132, 359, + 360, 225, 427, 362, 105, 361, 369, 226, 226, 378, + 226, 237, 237, 126, 387, 226, 392, 419, 420, 226, + 424, 226, 226, 432, 421, 435, 428, 430, 444, 433, + 226, 226, 226, 172, 260, 450, 226, 448, 149, 452, + 454, 257, 456, 105, 258, 455, 259, 239, 239, 457, + 458, 462, 168, 464, 473, 182, 184, 474, 475, 479, + 307, 466, 467, 468, 2, 1, 126, 2, 3, 4, + 177, 3, 134, 179, 176, 260, 181, 86, 175, 75, + 6, 176, 257, 237, 76, 258, 77, 259, 155, 53, + 243, 136, 245, 245, 342, 390, 245, 245, 245, 245, + 245, 375, 245, 133, 2, 303, 243, 202, 3, 406, + 409, 407, 293, 408, 245, 245, 220, 245, 410, 239, + 6, 388, 240, 389, 116, 188, 260, 400, 401, 402, + 403, 237, 237, 257, 381, 169, 258, 292, 259, 1, + 297, 288, 237, 0, 0, 49, 294, 14, 0, 245, + 0, 5, 0, 243, 0, 0, 0, 0, 7, 8, + 9, 237, 237, 50, 237, 0, 13, 239, 239, 237, + 260, 0, 0, 237, 0, 237, 237, 257, 239, 245, + 258, 0, 259, 0, 237, 237, 237, 0, 0, 0, + 237, 0, 0, 0, 0, 0, 0, 239, 239, 0, + 239, 0, 0, 243, 0, 239, 260, 0, 0, 239, + 0, 239, 239, 257, 413, 0, 258, 0, 259, 1, + 239, 239, 239, 260, 0, 4, 239, 337, 338, 0, + 257, 5, 0, 258, 0, 259, 0, 0, 7, 8, + 9, 0, 11, 12, 0, 0, 13, 0, 0, 417, + 0, 260, 0, 0, 0, 0, 0, 0, 257, 425, + 140, 258, 0, 259, 0, 0, 0, 0, 0, 0, + 364, 0, 0, 0, 367, 0, 256, 0, 0, 260, + 243, 0, 0, 0, 0, 0, 257, 431, 192, 258, + 0, 259, 0, 0, 194, 195, 196, 197, 198, 199, + 200, 201, 14, 0, 0, 0, 260, 0, 0, 203, + 204, 0, 0, 257, 0, 0, 258, 256, 259, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 245, 192, + 0, 0, 434, 0, 0, 194, 195, 196, 197, 198, + 199, 200, 201, 14, 411, 412, 0, 0, 0, 0, + 203, 204, 0, 0, 0, 0, 0, 245, 245, 245, + 245, 245, 245, 245, 245, 0, 0, 260, 256, 220, + 220, 220, 220, 0, 257, 445, 220, 258, 0, 259, + 192, 0, 134, 0, 0, 0, 194, 195, 196, 197, + 198, 199, 200, 201, 14, 0, 260, 0, 0, 0, + 134, 203, 204, 257, 451, 0, 258, 0, 259, 0, + 0, 0, 256, 260, 0, 0, 0, 0, 0, 0, + 257, 453, 0, 258, 192, 259, 0, 0, 0, 0, + 194, 195, 196, 197, 198, 199, 200, 201, 14, 0, + 0, 0, 260, 0, 0, 203, 204, 0, 256, 257, + 465, 0, 258, 0, 259, 0, 0, 0, 0, 0, + 192, 0, 0, 0, 0, 256, 194, 195, 196, 197, + 198, 199, 200, 201, 14, 0, 0, 192, 0, 0, + 0, 203, 204, 194, 195, 196, 197, 198, 199, 200, + 201, 14, 0, 256, 260, 0, 0, 0, 203, 204, + 0, 257, 0, 0, 258, 192, 259, 0, 0, 0, 0, 194, 195, 196, 197, 198, 199, 200, 201, 14, - 0, 261, 0, 0, 0, 0, 203, 204, 258, 425, - 0, 259, 0, 260, 247, 0, 0, 257, 261, 244, - 0, 0, 0, 0, 0, 258, 431, 0, 259, 192, - 260, 0, 0, 0, 257, 194, 195, 196, 197, 198, - 199, 200, 201, 14, 247, 0, 192, 0, 0, 0, - 203, 204, 194, 195, 196, 197, 198, 199, 200, 201, - 14, 0, 261, 0, 0, 0, 0, 203, 204, 258, - 244, 0, 259, 0, 260, 0, 0, 0, 0, 261, - 0, 0, 0, 0, 0, 0, 258, 445, 434, 259, - 0, 260, 0, 0, 0, 0, 261, 257, 0, 0, - 0, 0, 0, 258, 0, 0, 259, 0, 260, 192, - 0, 0, 0, 0, 0, 194, 195, 196, 197, 198, - 199, 200, 201, 14, 0, 261, 0, 0, 0, 0, - 203, 204, 258, 451, 0, 259, 257, 260, 0, 0, - 0, 0, 0, 0, 0, 0, 244, 0, 192, 0, - 0, 0, 0, 257, 194, 195, 196, 197, 198, 199, - 200, 201, 14, 0, 0, 192, 0, 0, 0, 203, - 204, 194, 195, 196, 197, 198, 199, 200, 201, 14, - 0, 0, 261, 0, 0, 0, 203, 204, 0, 258, - 453, 0, 259, 247, 260, 0, 0, 0, 0, 261, - 0, 0, 0, 0, 0, 0, 258, 465, 0, 259, - 0, 260, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 247, 247, 247, 247, 247, 247, 247, 247, - 0, 0, 0, 0, 222, 222, 222, 222, 261, 0, - 0, 222, 0, 257, 0, 258, 0, 0, 259, 0, - 260, 0, 0, 0, 0, 192, 0, 0, 0, 0, - 257, 194, 195, 196, 197, 198, 199, 200, 201, 14, - 0, 0, 192, 0, 0, 0, 203, 204, 194, 195, - 196, 197, 198, 199, 200, 201, 14, 0, 0, 0, - 0, 0, 0, 203, 204, 246, 246, 0, 0, 246, - 246, 246, 246, 246, 257, 246, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 192, 246, 246, 0, - 246, 257, 194, 195, 196, 197, 198, 199, 200, 201, - 14, 0, 0, 192, 0, 0, 0, 203, 204, 194, - 195, 196, 197, 198, 199, 200, 201, 14, 0, 0, - 192, 0, 246, 0, 203, 204, 194, 195, 196, 197, - 198, 199, 200, 201, 14, 0, 0, 257, 0, 0, - 0, 203, 204, 0, 0, 0, 0, 0, 0, 192, - 0, 0, 246, 0, 0, 194, 195, 196, 197, 198, - 199, 200, 201, 14, 0, 0, 0, 0, 260, 0, - 203, 204, 260, 260, 260, 260, 260, 260, 260, 251, - 251, 0, 0, 251, 251, 251, 251, 251, 251, 251, - 260, 260, 0, 260, 257, 0, 0, 0, 0, 0, - 0, 251, 251, 0, 251, 0, 192, 0, 0, 0, - 0, 257, 194, 195, 196, 197, 198, 199, 200, 201, - 14, 0, 0, 192, 0, 260, 0, 203, 204, 194, - 195, 196, 197, 198, 199, 200, 201, 14, 0, 0, - 1, 0, 0, 0, 203, 204, 4, 0, 0, 0, - 257, 0, 5, 0, 0, 260, 0, 0, 0, 7, - 8, 9, 192, 11, 12, 0, 251, 13, 194, 195, - 196, 197, 198, 199, 200, 201, 14, 0, 0, 0, - 0, 0, 0, 203, 204, 76, 76, 0, 76, 76, - 76, 76, 76, 76, 76, 76, 0, 0, 0, 1, - 2, 246, 0, 0, 3, 4, 0, 76, 0, 0, - 76, 5, 0, 0, 0, 0, 6, 0, 7, 8, - 9, 10, 11, 12, 0, 0, 13, 0, 0, 0, - 246, 246, 246, 246, 246, 246, 246, 246, 0, 76, - 239, 239, 76, 14, 239, 239, 239, 239, 239, 239, - 239, 0, 0, 0, 1, 0, 0, 0, 0, 0, - 48, 0, 239, 239, 0, 239, 5, 0, 0, 0, - 0, 76, 76, 7, 8, 9, 0, 0, 49, 0, - 0, 13, 0, 0, 214, 214, 0, 0, 214, 214, - 214, 214, 214, 214, 214, 0, 0, 239, 0, 0, - 0, 0, 1, 0, 260, 0, 214, 214, 4, 214, - 0, 0, 0, 0, 5, 251, 0, 0, 0, 0, - 0, 7, 8, 9, 0, 0, 12, 0, 0, 13, - 0, 0, 0, 260, 260, 260, 260, 260, 260, 260, - 260, 214, 0, 0, 251, 251, 251, 251, 251, 251, - 251, 251, 203, 203, 0, 0, 203, 203, 203, 203, - 203, 203, 203, 0, 0, 0, 0, 0, 0, 0, - 0, 214, 0, 0, 203, 203, 0, 203, 247, 247, - 0, 0, 247, 247, 247, 247, 247, 0, 247, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 247, 247, 0, 247, 0, 76, 76, 0, 0, 203, - 76, 76, 0, 0, 0, 0, 0, 76, 0, 0, - 0, 76, 76, 0, 76, 76, 76, 76, 76, 76, - 76, 0, 76, 0, 0, 247, 261, 0, 0, 203, - 261, 261, 261, 261, 261, 261, 261, 0, 0, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 261, 261, - 0, 261, 240, 240, 0, 247, 240, 240, 240, 240, - 240, 240, 240, 252, 252, 0, 239, 252, 252, 252, - 252, 252, 252, 252, 240, 240, 0, 240, 0, 0, - 0, 0, 0, 261, 0, 252, 252, 0, 252, 0, - 0, 0, 0, 0, 0, 239, 239, 239, 239, 239, - 239, 239, 239, 0, 0, 0, 0, 0, 0, 240, - 214, 215, 215, 261, 0, 215, 215, 215, 215, 215, - 215, 215, 0, 0, 0, 0, 0, 0, 0, 0, - 136, 0, 0, 215, 215, 0, 215, 0, 0, 214, - 214, 214, 214, 214, 0, 214, 214, 0, 136, 0, - 252, 0, 0, 0, 282, 282, 0, 0, 282, 282, - 0, 282, 0, 282, 282, 271, 271, 0, 215, 271, - 271, 271, 271, 271, 271, 271, 282, 282, 203, 282, - 0, 0, 0, 0, 0, 0, 0, 271, 271, 0, - 271, 0, 0, 0, 0, 0, 0, 0, 215, 0, - 0, 0, 0, 0, 247, 0, 0, 203, 203, 203, - 203, 282, 203, 203, 203, 0, 0, 0, 0, 0, - 272, 272, 271, 0, 272, 272, 272, 272, 272, 272, - 272, 0, 0, 247, 247, 247, 247, 247, 247, 247, - 247, 282, 272, 272, 0, 272, 0, 0, 0, 274, - 274, 0, 271, 274, 274, 274, 274, 274, 274, 274, - 283, 0, 261, 283, 0, 283, 283, 283, 283, 0, - 0, 274, 0, 0, 0, 0, 0, 272, 0, 0, - 0, 283, 283, 0, 283, 0, 0, 0, 240, 0, - 0, 261, 261, 261, 261, 261, 261, 261, 261, 252, - 0, 0, 0, 0, 275, 275, 274, 272, 275, 275, - 275, 275, 275, 275, 275, 0, 283, 240, 240, 240, - 240, 240, 240, 240, 240, 0, 275, 0, 252, 252, - 252, 252, 252, 252, 252, 252, 274, 0, 0, 0, - 0, 0, 0, 136, 136, 0, 283, 215, 136, 136, - 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, - 136, 275, 136, 136, 136, 136, 136, 136, 0, 0, - 136, 0, 0, 0, 168, 0, 215, 215, 215, 215, - 215, 0, 215, 215, 0, 0, 0, 136, 0, 284, - 282, 275, 284, 168, 284, 284, 284, 284, 0, 0, - 0, 271, 0, 0, 0, 0, 0, 0, 0, 0, - 284, 284, 0, 284, 0, 0, 0, 0, 0, 282, - 282, 282, 282, 282, 282, 282, 282, 0, 0, 0, - 0, 271, 271, 0, 271, 271, 271, 271, 0, 0, - 0, 0, 0, 0, 0, 284, 285, 0, 0, 285, - 0, 285, 285, 285, 285, 0, 272, 168, 0, 168, - 0, 0, 0, 0, 0, 0, 89, 285, 285, 0, - 285, 0, 0, 0, 0, 284, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 272, 272, 0, 272, - 272, 272, 272, 0, 0, 283, 0, 0, 0, 0, - 0, 0, 285, 207, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 274, 0, 0, 274, 274, 274, - 274, 274, 205, 0, 283, 283, 283, 283, 283, 283, - 283, 283, 285, 257, 257, 0, 0, 257, 257, 257, - 257, 257, 257, 257, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 257, 257, 0, 257, 0, - 0, 207, 0, 0, 0, 0, 0, 0, 0, 275, - 0, 0, 275, 275, 275, 275, 275, 0, 0, 0, - 205, 0, 0, 0, 0, 0, 140, 0, 206, 0, - 257, 0, 168, 0, 0, 0, 168, 0, 0, 0, - 0, 200, 0, 0, 0, 168, 168, 0, 168, 0, - 0, 0, 0, 0, 0, 0, 0, 168, 207, 0, - 257, 168, 0, 0, 284, 0, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 0, 205, 0, 0, - 0, 0, 168, 168, 140, 0, 299, 0, 0, 0, - 0, 0, 0, 284, 284, 284, 284, 284, 284, 284, - 284, 0, 0, 1, 2, 0, 207, 0, 3, 0, - 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, - 6, 285, 7, 8, 9, 205, 0, 0, 0, 0, - 13, 0, 0, 0, 0, 0, 0, 165, 0, 0, - 0, 140, 0, 317, 0, 0, 0, 118, 0, 0, - 285, 285, 285, 285, 285, 285, 285, 285, 0, 0, - 0, 2, 207, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 189, 190, 0, 6, 0, 0, - 0, 205, 0, 0, 0, 0, 191, 0, 0, 140, - 192, 370, 0, 0, 0, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 0, 0, 0, 0, 257, - 207, 203, 204, 0, 0, 0, 0, 0, 0, 2, - 0, 0, 0, 3, 0, 0, 0, 0, 0, 205, - 0, 0, 189, 190, 0, 6, 0, 0, 257, 257, - 257, 257, 257, 257, 191, 140, 0, 371, 298, 207, - 0, 0, 0, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 202, 0, 0, 0, 0, 0, 205, 203, - 204, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, 207, 189, - 190, 0, 6, 140, 0, 415, 0, 0, 0, 0, - 0, 191, 0, 0, 0, 192, 0, 205, 0, 0, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 0, 0, 0, 0, 2, 0, 203, 204, 3, 0, - 0, 0, 140, 0, 0, 0, 0, 189, 190, 0, - 6, 0, 0, 0, 0, 0, 0, 0, 0, 191, - 138, 0, 0, 192, 0, 0, 0, 0, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, 138, 0, - 0, 140, 0, 0, 203, 204, 0, 0, 0, 0, - 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 0, 189, 190, 89, 6, 0, 0, 0, - 0, 0, 0, 0, 0, 191, 0, 0, 0, 192, - 0, 0, 0, 0, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 0, 89, 0, 0, 2, 0, - 203, 204, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 256, 260, 0, 0, 0, 203, 204, 0, 257, + 0, 0, 258, 192, 259, 0, 0, 0, 0, 194, + 195, 196, 197, 198, 199, 200, 201, 14, 256, 0, + 0, 0, 0, 0, 203, 204, 0, 0, 0, 0, + 192, 0, 0, 0, 0, 0, 194, 195, 196, 197, + 198, 199, 200, 201, 14, 0, 0, 0, 0, 0, + 0, 203, 204, 74, 74, 0, 74, 74, 74, 74, + 74, 74, 0, 74, 0, 134, 134, 0, 0, 0, + 134, 134, 0, 0, 0, 74, 0, 134, 74, 256, + 0, 0, 134, 0, 134, 134, 134, 134, 134, 134, + 0, 192, 134, 0, 0, 0, 0, 194, 195, 196, + 197, 198, 199, 200, 201, 14, 0, 74, 256, 134, + 74, 0, 203, 204, 0, 0, 0, 0, 0, 0, + 192, 0, 0, 0, 0, 256, 194, 195, 196, 197, + 198, 199, 200, 201, 14, 0, 0, 192, 0, 74, + 74, 203, 204, 194, 195, 196, 197, 198, 199, 200, + 201, 14, 0, 0, 256, 0, 0, 0, 203, 204, + 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, + 0, 0, 194, 195, 196, 197, 198, 199, 200, 201, + 14, 0, 0, 0, 0, 258, 0, 203, 204, 258, + 258, 258, 258, 258, 258, 258, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 256, 258, 258, 0, + 258, 0, 0, 0, 0, 0, 0, 0, 192, 0, + 0, 0, 0, 0, 194, 195, 196, 197, 198, 199, + 200, 201, 14, 0, 0, 0, 0, 0, 0, 203, + 204, 0, 258, 0, 0, 0, 192, 0, 0, 0, + 0, 0, 194, 195, 196, 197, 198, 199, 200, 201, + 14, 0, 0, 0, 0, 0, 0, 203, 204, 0, + 0, 0, 258, 74, 74, 0, 0, 0, 74, 74, + 0, 0, 0, 0, 0, 74, 0, 0, 0, 74, + 74, 0, 74, 74, 74, 74, 74, 74, 74, 0, + 74, 0, 0, 0, 249, 249, 0, 0, 249, 249, + 249, 249, 249, 249, 249, 0, 0, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 249, 249, 0, 249, + 237, 237, 0, 0, 237, 237, 237, 237, 237, 237, + 237, 212, 212, 0, 0, 212, 212, 212, 212, 212, + 212, 212, 237, 237, 0, 237, 0, 0, 0, 0, + 0, 0, 0, 212, 212, 0, 212, 0, 0, 0, + 0, 0, 0, 0, 0, 271, 271, 0, 0, 271, + 271, 271, 271, 271, 271, 271, 0, 237, 0, 0, + 0, 249, 0, 0, 0, 0, 0, 271, 212, 0, + 0, 201, 201, 0, 0, 201, 201, 201, 201, 201, + 201, 201, 245, 245, 0, 0, 245, 245, 245, 245, + 245, 258, 245, 201, 201, 0, 201, 0, 212, 0, + 0, 0, 271, 0, 245, 245, 0, 245, 259, 0, + 0, 0, 259, 259, 259, 259, 259, 259, 259, 0, + 258, 258, 258, 258, 258, 258, 258, 258, 201, 0, + 259, 259, 271, 259, 0, 0, 0, 0, 0, 245, + 0, 0, 0, 0, 0, 250, 250, 0, 0, 250, + 250, 250, 250, 250, 250, 250, 0, 0, 201, 0, + 0, 0, 0, 0, 0, 259, 0, 250, 250, 245, + 250, 238, 238, 0, 0, 238, 238, 238, 238, 238, + 238, 238, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 238, 238, 259, 238, 213, 213, 0, + 0, 213, 213, 213, 213, 213, 213, 213, 0, 0, + 249, 0, 0, 0, 0, 0, 0, 0, 0, 213, + 213, 0, 213, 0, 0, 0, 0, 0, 238, 0, + 0, 0, 250, 0, 0, 0, 237, 0, 0, 249, + 249, 249, 249, 249, 249, 249, 249, 212, 0, 0, + 0, 0, 0, 0, 213, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 237, 237, 237, 237, 237, + 237, 237, 237, 0, 0, 0, 212, 212, 212, 212, + 212, 0, 212, 212, 213, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 280, + 280, 0, 0, 280, 280, 0, 280, 201, 280, 280, + 271, 0, 0, 271, 271, 271, 271, 271, 245, 0, + 0, 280, 280, 0, 280, 0, 0, 0, 0, 0, + 0, 90, 0, 0, 0, 0, 201, 201, 201, 201, + 0, 201, 201, 201, 259, 0, 0, 245, 245, 245, + 245, 245, 245, 245, 245, 0, 280, 0, 0, 0, + 0, 0, 269, 269, 0, 0, 269, 269, 269, 269, + 269, 269, 269, 259, 259, 259, 259, 259, 259, 259, + 259, 250, 0, 0, 269, 269, 280, 269, 0, 0, + 0, 0, 0, 0, 0, 0, 272, 272, 0, 0, + 272, 272, 272, 272, 272, 272, 272, 238, 0, 0, + 250, 250, 250, 250, 250, 250, 250, 250, 272, 269, + 0, 0, 270, 270, 0, 0, 270, 270, 270, 270, + 270, 270, 270, 213, 0, 0, 238, 238, 238, 238, + 238, 238, 238, 238, 270, 270, 0, 270, 0, 269, + 273, 273, 0, 272, 273, 273, 273, 273, 273, 273, + 273, 0, 213, 213, 213, 213, 213, 0, 213, 213, + 281, 0, 273, 281, 0, 281, 281, 281, 281, 270, + 0, 0, 0, 272, 0, 0, 0, 0, 0, 0, + 282, 281, 281, 282, 281, 282, 282, 282, 282, 0, + 0, 0, 0, 0, 0, 0, 0, 273, 0, 270, + 0, 282, 282, 0, 282, 0, 0, 283, 0, 0, + 283, 0, 283, 283, 283, 283, 281, 0, 1, 2, + 0, 0, 0, 3, 0, 280, 0, 273, 283, 283, + 5, 283, 0, 0, 0, 6, 282, 7, 8, 9, + 0, 0, 0, 0, 0, 13, 281, 0, 0, 0, + 0, 0, 165, 0, 280, 280, 280, 280, 280, 280, + 280, 280, 118, 283, 166, 0, 282, 0, 0, 0, + 0, 0, 255, 255, 0, 0, 255, 255, 255, 255, + 255, 255, 255, 166, 1, 2, 0, 0, 269, 3, + 4, 0, 0, 283, 255, 255, 5, 255, 0, 0, + 0, 6, 0, 7, 8, 9, 10, 11, 12, 0, + 0, 13, 0, 207, 1, 0, 0, 0, 269, 269, + 4, 269, 269, 269, 269, 0, 5, 0, 14, 255, + 0, 0, 205, 7, 8, 9, 0, 0, 12, 0, + 0, 13, 0, 0, 0, 0, 0, 166, 270, 166, + 0, 272, 0, 0, 272, 272, 272, 272, 272, 255, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 207, + 0, 0, 0, 0, 0, 0, 0, 0, 270, 270, + 0, 270, 270, 270, 270, 0, 0, 0, 205, 0, + 0, 0, 0, 0, 0, 281, 140, 0, 206, 0, + 0, 0, 0, 0, 0, 273, 0, 0, 273, 273, + 273, 273, 273, 0, 207, 282, 0, 0, 0, 0, + 0, 0, 0, 0, 281, 281, 281, 281, 281, 281, + 281, 281, 0, 205, 0, 0, 0, 0, 0, 0, + 0, 0, 283, 0, 282, 282, 282, 282, 282, 282, + 282, 282, 140, 0, 299, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 207, 0, 0, 0, + 0, 283, 283, 283, 283, 283, 283, 283, 283, 0, + 0, 0, 166, 0, 0, 205, 166, 0, 0, 0, + 0, 198, 0, 0, 0, 166, 166, 140, 166, 317, + 0, 0, 0, 0, 0, 0, 0, 166, 255, 0, + 207, 166, 0, 0, 0, 0, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 0, 0, 0, 205, + 0, 2, 166, 166, 0, 3, 0, 255, 255, 255, + 255, 255, 255, 0, 189, 190, 0, 6, 0, 140, + 0, 370, 0, 0, 0, 0, 191, 0, 207, 0, + 192, 0, 0, 0, 0, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 0, 0, 205, 0, 0, + 0, 203, 204, 0, 0, 0, 0, 2, 0, 0, + 0, 3, 0, 140, 0, 371, 0, 0, 207, 0, + 189, 190, 0, 6, 0, 0, 0, 0, 0, 0, + 0, 0, 191, 0, 0, 0, 298, 205, 0, 0, + 0, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 207, 2, 0, 0, 0, 3, 203, 204, 0, + 0, 140, 0, 415, 0, 189, 190, 0, 6, 0, + 205, 0, 0, 0, 0, 0, 0, 191, 0, 0, + 0, 192, 0, 0, 0, 0, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 0, 0, 0, 0, + 0, 140, 203, 204, 2, 0, 0, 0, 3, 136, + 0, 0, 0, 0, 0, 0, 0, 189, 190, 0, + 6, 0, 0, 0, 0, 0, 0, 136, 0, 191, + 0, 0, 0, 192, 140, 0, 0, 0, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 2, 0, + 0, 0, 3, 90, 203, 204, 0, 0, 0, 0, 0, 189, 190, 0, 6, 0, 0, 0, 0, 0, - 0, 0, 0, 191, 0, 0, 89, 192, 0, 0, - 90, 0, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 0, 0, 0, 0, 0, 0, 203, 204, - 189, 436, 0, 0, 0, 0, 89, 0, 0, 0, - 119, 0, 191, 0, 0, 0, 192, 0, 0, 0, - 0, 437, 194, 195, 196, 197, 198, 199, 200, 201, - 14, 0, 0, 0, 61, 0, 0, 203, 204, 189, - 190, 154, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 191, 0, 0, 0, 192, 0, 0, + 0, 0, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 0, 90, 0, 0, 2, 0, 203, 204, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 189, + 190, 0, 6, 0, 0, 0, 0, 0, 91, 0, + 0, 191, 0, 90, 0, 192, 0, 0, 0, 0, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, + 0, 0, 0, 0, 0, 0, 203, 204, 0, 189, + 436, 90, 0, 0, 0, 0, 0, 0, 119, 0, 0, 191, 0, 0, 0, 192, 0, 0, 0, 0, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 14, - 0, 175, 0, 0, 0, 0, 203, 204, 0, 0, - 0, 0, 0, 138, 138, 0, 0, 0, 138, 138, - 0, 0, 0, 0, 0, 138, 0, 0, 0, 0, - 138, 0, 138, 138, 138, 138, 138, 138, 0, 0, - 138, 0, 1, 2, 0, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 5, 0, 0, 138, 0, 6, - 0, 7, 8, 9, 0, 0, 0, 0, 0, 86, - 0, 0, 1, 2, 0, 0, 87, 3, 0, 0, - 0, 0, 0, 0, 5, 0, 88, 0, 0, 6, - 0, 7, 8, 9, 0, 0, 0, 0, 0, 13, - 0, 0, 0, 1, 2, 0, 87, 0, 3, 143, - 0, 0, 0, 148, 0, 5, 118, 0, 0, 0, - 6, 0, 7, 8, 9, 0, 162, 167, 0, 0, - 86, 0, 0, 1, 2, 0, 0, 87, 3, 0, - 0, 0, 0, 0, 0, 5, 148, 88, 162, 167, - 6, 0, 7, 8, 9, 0, 0, 0, 0, 0, - 13, 61, 61, 0, 0, 0, 61, 87, 0, 249, - 0, 250, 0, 61, 0, 0, 0, 118, 61, 0, - 61, 61, 61, 439, 443, 0, 0, 291, 61, 0, - 295, 0, 0, 0, 449, 61, 0, 0, 0, 250, - 0, 295, 0, 0, 0, 61, 0, 0, 0, 0, - 0, 0, 0, 460, 461, 0, 463, 0, 0, 0, + 437, 194, 195, 196, 197, 198, 199, 200, 201, 14, + 0, 61, 189, 190, 0, 0, 203, 204, 154, 0, + 0, 0, 0, 0, 191, 0, 0, 0, 192, 0, + 0, 0, 0, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 14, 0, 0, 0, 175, 0, 0, 203, + 204, 0, 136, 136, 0, 0, 0, 136, 136, 0, + 0, 0, 0, 0, 136, 0, 0, 0, 0, 136, + 0, 136, 136, 136, 136, 136, 136, 0, 0, 136, + 1, 2, 0, 0, 0, 3, 0, 0, 0, 0, + 0, 0, 5, 0, 0, 0, 136, 6, 0, 7, + 8, 9, 0, 0, 0, 0, 0, 87, 0, 0, + 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, + 1, 2, 0, 0, 89, 3, 0, 143, 0, 0, + 0, 148, 5, 0, 0, 0, 0, 6, 0, 7, + 8, 9, 0, 0, 162, 167, 0, 13, 0, 0, + 1, 2, 0, 0, 88, 3, 0, 0, 0, 0, + 0, 0, 5, 148, 118, 162, 167, 6, 0, 7, + 8, 9, 0, 0, 0, 0, 0, 87, 1, 2, + 0, 0, 0, 3, 88, 0, 248, 0, 249, 0, + 5, 0, 0, 0, 89, 6, 0, 7, 8, 9, + 0, 0, 0, 0, 291, 13, 0, 295, 61, 61, + 0, 0, 88, 61, 0, 0, 249, 0, 295, 0, + 61, 0, 118, 439, 443, 61, 0, 61, 61, 61, + 0, 0, 0, 0, 449, 61, 0, 0, 0, 0, + 0, 0, 61, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 61, 460, 461, 0, 463, 0, 0, 0, 0, 469, 0, 0, 0, 470, 0, 471, 472, 0, 0, 0, 0, 0, 0, 0, 476, 439, 443, 0, 0, 0, 469, 0, 0, 0, 0, 0, 0, 0, @@ -3779,336 +3760,329 @@ case 289: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 365, 366, + 0, 365, 366, }; - protected short yyCheck[] = new short[2927]; + protected short yyCheck[] = new short[2874]; } class yyCheck0 { - protected static final short yyCheck0 [] = { 10, - 11, 91, 42, 59, 55, 56, 86, 159, 137, 41, - 40, 41, 170, 93, 44, 66, 46, 152, 0, 214, - 44, 60, 123, 41, 59, 27, 123, 144, 123, 59, - 60, 61, 89, 46, 123, 59, 60, 61, 123, 191, - 44, 37, 38, 160, 26, 41, 42, 43, 44, 45, - 46, 47, 91, 46, 59, 203, 204, 57, 44, 41, - 111, 91, 59, 59, 44, 47, 59, 91, 59, 301, - 59, 41, 66, 55, 56, 57, 140, 128, 44, 40, - 308, 309, 62, 59, 66, 67, 75, 60, 20, 62, - 207, 301, 57, 59, 140, 61, 96, 59, 94, 60, - 41, 152, 59, 105, 104, 300, 170, 67, 61, 91, - 59, 259, 260, 261, 96, 44, 59, 111, 123, 123, - 52, 91, 257, 105, 170, 127, 123, 244, 124, 111, - 59, 96, 123, 140, 128, 59, 60, 123, 120, 104, - 59, 258, 124, 301, 133, 127, 128, 123, 130, 149, - 214, 75, 69, 305, 306, 137, 156, 309, 140, 76, - 120, 123, 144, 170, 59, 59, 123, 268, 214, 321, - 152, 268, 369, 44, 123, 304, 40, 372, 160, 268, - 123, 282, 301, 268, 166, 282, 110, 282, 170, 104, - 247, 62, 203, 204, 140, 392, 44, 61, 346, 347, - 348, 44, 44, 168, 123, 340, 257, 214, 60, 133, - 134, 301, 40, 44, 62, 91, 59, 334, 46, 136, - 62, 373, 351, 375, 170, 207, 258, 424, 123, 123, - 262, 62, 214, 61, 149, 144, 300, 301, 91, 44, - 258, 321, 274, 420, 262, 393, 60, 212, 259, 260, - 261, 160, 308, 309, 300, 301, 274, 62, 40, 183, - 140, 301, 301, 91, 46, 417, 59, 419, 214, 301, - 422, 301, 46, 308, 309, 257, 258, 301, 308, 309, - 93, 433, 434, 301, 314, 315, 316, 317, 46, 340, - 170, 321, 60, 300, 301, 308, 309, 474, 475, 140, - 273, 59, 479, 455, 456, 457, 302, 93, 372, 305, - 306, 307, 308, 309, 57, 308, 309, 258, 300, 301, - 41, 262, 304, 44, 67, 44, 372, 301, 67, 170, - 303, 304, 301, 274, 214, 346, 347, 348, 349, 350, - 59, 352, 353, 354, 355, 356, 357, 358, 359, 360, - 361, 362, 334, 96, 300, 301, 420, 421, 340, 46, - 301, 314, 315, 316, 317, 372, 105, 431, 321, 351, - 20, 268, 59, 214, 420, 421, 140, 120, 44, 258, - 30, 120, 393, 262, 29, 431, 450, 451, 127, 453, - 372, 474, 475, 59, 458, 274, 479, 123, 462, 44, - 464, 465, 52, 301, 450, 451, 170, 453, 53, 473, - 474, 475, 458, 420, 421, 479, 462, 40, 464, 465, - 300, 301, 301, 289, 431, 37, 372, 473, 474, 475, - 42, 59, 77, 479, 302, 47, 258, 305, 41, 41, - 262, 44, 44, 450, 451, 41, 453, 61, 44, 123, - 214, 458, 274, 41, 301, 462, 44, 464, 465, 300, - 301, 352, 353, 354, 355, 59, 473, 474, 475, 291, - 356, 357, 479, 301, 420, 421, 349, 350, 258, 301, - 308, 309, 262, 301, 59, 431, 314, 315, 316, 317, - 301, 33, 372, 321, 274, 38, 41, 41, 40, 44, - 44, 43, 40, 45, 450, 451, 258, 453, 40, 40, - 262, 291, 458, 43, 329, 45, 462, 59, 464, 465, - 44, 301, 274, 59, 143, 46, 59, 473, 474, 475, - 59, 372, 44, 479, 38, 33, 300, 301, 94, 124, - 420, 421, 40, 162, 307, 43, 306, 45, 167, 301, - 40, 431, 33, 59, 301, 40, 59, 41, 41, 40, - 41, 59, 43, 40, 45, 59, 59, 59, 59, 41, - 450, 451, 0, 453, 40, 40, 267, 59, 458, 420, - 421, 41, 462, 41, 464, 465, 41, 41, 41, 267, - 431, 0, 0, 473, 474, 475, 0, 0, 26, 479, - 59, 301, 59, 47, 120, 48, 30, 49, 372, 450, - 451, 75, 453, 41, 76, 33, 96, 458, 258, 47, - 334, 462, 40, 464, 465, 43, 358, 45, 359, 57, - 249, 250, 473, 474, 475, 360, 332, 361, 479, 67, - 362, 138, 332, 65, 105, -1, 169, -1, -1, -1, - -1, -1, -1, -1, 33, -1, 420, 421, -1, -1, - -1, 40, 41, 91, 43, -1, 45, 431, 96, -1, - -1, 33, 291, -1, -1, -1, 295, 105, 40, -1, - -1, 43, -1, 45, -1, -1, 450, 451, -1, 453, - -1, -1, 120, -1, 458, -1, 124, 59, 462, 127, - 464, 465, 130, -1, -1, 123, -1, -1, -1, 473, - 474, 475, -1, -1, -1, 479, 144, 37, 38, -1, - -1, 41, 42, 43, 44, 45, -1, 47, -1, -1, - -1, -1, 160, 275, -1, -1, -1, -1, 166, 59, - 60, 61, 62, -1, -1, 287, 365, 366, -1, -1, - -1, 293, 294, 295, 296, 297, 298, 299, 300, 301, - -1, 33, -1, -1, -1, -1, 308, 309, 40, 41, - -1, 43, -1, 45, 94, -1, -1, 275, 33, 207, - -1, -1, -1, -1, -1, 40, 41, -1, 43, 287, - 45, -1, -1, -1, 275, 293, 294, 295, 296, 297, - 298, 299, 300, 301, 124, -1, 287, -1, -1, -1, - 308, 309, 293, 294, 295, 296, 297, 298, 299, 300, - 301, -1, 33, -1, -1, -1, -1, 308, 309, 40, - 258, -1, 43, -1, 45, -1, -1, -1, -1, 33, - -1, -1, -1, -1, -1, -1, 40, 41, 59, 43, - -1, 45, -1, -1, -1, -1, 33, 275, -1, -1, - -1, -1, -1, 40, -1, -1, 43, -1, 45, 287, - -1, -1, -1, -1, -1, 293, 294, 295, 296, 297, - 298, 299, 300, 301, -1, 33, -1, -1, -1, -1, - 308, 309, 40, 41, -1, 43, 275, 45, -1, -1, - -1, -1, -1, -1, -1, -1, 334, -1, 287, -1, - -1, -1, -1, 275, 293, 294, 295, 296, 297, 298, - 299, 300, 301, -1, -1, 287, -1, -1, -1, 308, - 309, 293, 294, 295, 296, 297, 298, 299, 300, 301, - -1, -1, 33, -1, -1, -1, 308, 309, -1, 40, - 41, -1, 43, 273, 45, -1, -1, -1, -1, 33, - -1, -1, -1, -1, -1, -1, 40, 41, -1, 43, - -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 302, 303, 304, 305, 306, 307, 308, 309, - -1, -1, -1, -1, 314, 315, 316, 317, 33, -1, + protected static final short yyCheck0 [] = { 46, + 0, 59, 140, 40, 41, 56, 57, 44, 123, 46, + 10, 11, 59, 61, 123, 66, 41, 137, 152, 46, + 213, 41, 59, 60, 61, 46, 144, 42, 28, 123, + 90, 123, 170, 60, 44, 123, 46, 170, 44, 21, + 58, 301, 160, 60, 44, 59, 59, 59, 48, 59, + 60, 61, 44, 41, 91, 46, 56, 57, 58, 76, + 105, 112, 46, 87, 91, 69, 66, 67, 67, 60, + 94, 53, 59, 77, 29, 213, 60, 128, 59, 97, + 144, 91, 59, 59, 140, 41, 60, 105, 62, 207, + 59, 59, 92, 301, 58, 302, 160, 97, 305, 58, + 91, 152, 40, 91, 149, 59, 106, 300, 67, 123, + 123, 123, 112, 59, 170, 301, 133, 123, 44, 59, + 120, 120, 256, 61, 124, 243, 61, 127, 128, 66, + 130, 123, 136, 97, 91, 140, 62, 137, 97, 257, + 140, 105, 123, 420, 144, 46, 123, 123, 58, 44, + 168, 106, 152, 268, 123, 123, 91, 213, 59, 268, + 160, 120, 300, 301, 59, 170, 166, 282, 301, 123, + 170, 41, 127, 282, 44, 112, 268, 123, 21, 372, + 268, 44, 140, 123, 304, 149, 246, 97, 282, 32, + 59, 128, 156, 211, 40, 40, 106, 474, 475, 62, + 46, 46, 479, 203, 204, 256, 340, 207, 213, 44, + 53, 44, 170, 213, 60, 91, 334, 140, 37, 38, + 44, 44, 41, 42, 43, 44, 45, 62, 47, 62, + 44, 351, 60, 258, 372, 59, 46, 262, 258, 62, + 59, 60, 262, 62, 300, 301, 301, 170, 62, 274, + 308, 309, 46, 60, 274, 213, 256, 257, 258, 259, + 260, 308, 309, 93, 301, 59, 314, 315, 316, 317, + 301, 308, 309, 321, 301, 94, 301, 314, 315, 316, + 317, 301, 420, 421, 321, 159, 301, 308, 309, 340, + 213, 301, 44, 431, 93, 300, 301, 321, 37, 273, + 300, 301, 258, 42, 304, 124, 262, 59, 47, 61, + 301, 41, 450, 451, 44, 453, 372, 191, 274, 268, + 458, 308, 309, 44, 462, 41, 464, 465, 44, 303, + 304, 67, 203, 204, 334, 473, 474, 475, 59, 123, + 340, 479, 300, 301, 40, 301, 346, 347, 348, 349, + 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, + 360, 361, 362, 61, 420, 421, 301, 372, 44, 301, + 106, 140, 372, 308, 309, 431, 289, 300, 301, 314, + 315, 316, 317, 59, 120, 40, 321, 258, 259, 260, + 43, 127, 45, 393, 450, 451, 258, 453, 474, 475, + 262, 170, 458, 479, 308, 309, 462, 140, 464, 465, + 41, 31, 274, 44, 372, 420, 421, 473, 474, 475, + 349, 350, 42, 479, 258, 38, 431, 369, 262, 291, + 41, 305, 306, 44, 54, 309, 59, 170, 41, 301, + 274, 44, 356, 357, 213, 450, 451, 321, 453, 372, + 392, 301, 41, 458, 273, 44, 123, 462, 78, 464, + 465, 301, 420, 421, 59, 59, 0, 301, 473, 474, + 475, 40, 301, 431, 479, 346, 347, 348, 40, 40, + 213, 44, 424, 302, 303, 304, 305, 306, 307, 308, + 309, 59, 450, 451, 28, 453, 46, 420, 421, 373, + 458, 375, 60, 61, 462, 59, 464, 465, 431, 329, + 44, 59, 44, 38, 48, 473, 474, 475, 76, 94, + 124, 479, 393, 306, 58, 307, 40, 450, 451, 59, + 453, 300, 301, 67, 301, 458, 40, 59, 41, 462, + 40, 464, 465, 417, 41, 419, 59, 59, 422, 59, + 473, 474, 475, 111, 33, 41, 479, 59, 92, 433, + 434, 40, 40, 97, 43, 59, 45, 300, 301, 40, + 267, 41, 106, 41, 41, 133, 134, 41, 41, 267, + 59, 455, 456, 457, 258, 0, 120, 0, 262, 0, + 124, 0, 301, 127, 59, 33, 130, 59, 59, 48, + 274, 120, 40, 372, 49, 43, 50, 45, 97, 32, + 144, 77, 37, 38, 257, 334, 41, 42, 43, 44, + 45, 59, 47, 76, 258, 183, 160, 301, 262, 358, + 361, 359, 166, 360, 59, 60, 61, 62, 362, 372, + 274, 332, 143, 332, 65, 138, 33, 352, 353, 354, + 355, 420, 421, 40, 41, 106, 43, 291, 45, 257, + 169, 162, 431, -1, -1, 263, 167, 301, -1, 94, + -1, 269, -1, 207, -1, -1, -1, -1, 276, 277, + 278, 450, 451, 281, 453, -1, 284, 420, 421, 458, + 33, -1, -1, 462, -1, 464, 465, 40, 431, 124, + 43, -1, 45, -1, 473, 474, 475, -1, -1, -1, + 479, -1, -1, -1, -1, -1, -1, 450, 451, -1, + 453, -1, -1, 257, -1, 458, 33, -1, -1, 462, + -1, 464, 465, 40, 41, -1, 43, -1, 45, 257, + 473, 474, 475, 33, -1, 263, 479, 248, 249, -1, + 40, 269, -1, 43, -1, 45, -1, -1, 276, 277, + 278, -1, 280, 281, -1, -1, 284, -1, -1, 59, + -1, 33, -1, -1, -1, -1, -1, -1, 40, 41, + 123, 43, -1, 45, -1, -1, -1, -1, -1, -1, + 291, -1, -1, -1, 295, -1, 275, -1, -1, 33, + 334, -1, -1, -1, -1, -1, 40, 41, 287, 43, + -1, 45, -1, -1, 293, 294, 295, 296, 297, 298, + 299, 300, 301, -1, -1, -1, 33, -1, -1, 308, + 309, -1, -1, 40, -1, -1, 43, 275, 45, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 273, 287, + -1, -1, 59, -1, -1, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 365, 366, -1, -1, -1, -1, + 308, 309, -1, -1, -1, -1, -1, 302, 303, 304, + 305, 306, 307, 308, 309, -1, -1, 33, 275, 314, + 315, 316, 317, -1, 40, 41, 321, 43, -1, 45, + 287, -1, 44, -1, -1, -1, 293, 294, 295, 296, + 297, 298, 299, 300, 301, -1, 33, -1, -1, -1, + 62, 308, 309, 40, 41, -1, 43, -1, 45, -1, + -1, -1, 275, 33, -1, -1, -1, -1, -1, -1, + 40, 41, -1, 43, 287, 45, -1, -1, -1, -1, + 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, + -1, -1, 33, -1, -1, 308, 309, -1, 275, 40, + 41, -1, 43, -1, 45, -1, -1, -1, -1, -1, + 287, -1, -1, -1, -1, 275, 293, 294, 295, 296, + 297, 298, 299, 300, 301, -1, -1, 287, -1, -1, }; } class yyCheck1 { protected static final short yyCheck1 [] = { -1, - 321, -1, 275, -1, 40, -1, -1, 43, -1, 45, - -1, -1, -1, -1, 287, -1, -1, -1, -1, 275, + 308, 309, 293, 294, 295, 296, 297, 298, 299, 300, + 301, -1, 275, 33, -1, -1, -1, 308, 309, -1, + 40, -1, -1, 43, 287, 45, -1, -1, -1, -1, 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, - -1, 287, -1, -1, -1, 308, 309, 293, 294, 295, - 296, 297, 298, 299, 300, 301, -1, -1, -1, -1, - -1, -1, 308, 309, 37, 38, -1, -1, 41, 42, - 43, 44, 45, 275, 47, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 287, 59, 60, -1, 62, - 275, 293, 294, 295, 296, 297, 298, 299, 300, 301, - -1, -1, 287, -1, -1, -1, 308, 309, 293, 294, - 295, 296, 297, 298, 299, 300, 301, -1, -1, 287, - -1, 94, -1, 308, 309, 293, 294, 295, 296, 297, - 298, 299, 300, 301, -1, -1, 275, -1, -1, -1, - 308, 309, -1, -1, -1, -1, -1, -1, 287, -1, - -1, 124, -1, -1, 293, 294, 295, 296, 297, 298, - 299, 300, 301, -1, -1, -1, -1, 37, -1, 308, - 309, 41, 42, 43, 44, 45, 46, 47, 37, 38, - -1, -1, 41, 42, 43, 44, 45, 46, 47, 59, - 60, -1, 62, 275, -1, -1, -1, -1, -1, -1, - 59, 60, -1, 62, -1, 287, -1, -1, -1, -1, - 275, 293, 294, 295, 296, 297, 298, 299, 300, 301, - -1, -1, 287, -1, 94, -1, 308, 309, 293, 294, - 295, 296, 297, 298, 299, 300, 301, -1, -1, 257, - -1, -1, -1, 308, 309, 263, -1, -1, -1, 275, - -1, 269, -1, -1, 124, -1, -1, -1, 276, 277, - 278, 287, 280, 281, -1, 124, 284, 293, 294, 295, - 296, 297, 298, 299, 300, 301, -1, -1, -1, -1, - -1, -1, 308, 309, 37, 38, -1, 40, 41, 42, - 43, 44, 45, 46, 47, -1, -1, -1, 257, 258, - 273, -1, -1, 262, 263, -1, 59, -1, -1, 62, - 269, -1, -1, -1, -1, 274, -1, 276, 277, 278, - 279, 280, 281, -1, -1, 284, -1, -1, -1, 302, - 303, 304, 305, 306, 307, 308, 309, -1, 91, 37, - 38, 94, 301, 41, 42, 43, 44, 45, 46, 47, - -1, -1, -1, 257, -1, -1, -1, -1, -1, 263, - -1, 59, 60, -1, 62, 269, -1, -1, -1, -1, - 123, 124, 276, 277, 278, -1, -1, 281, -1, -1, - 284, -1, -1, 37, 38, -1, -1, 41, 42, 43, - 44, 45, 46, 47, -1, -1, 94, -1, -1, -1, - -1, 257, -1, 273, -1, 59, 60, 263, 62, -1, - -1, -1, -1, 269, 273, -1, -1, -1, -1, -1, - 276, 277, 278, -1, -1, 281, -1, -1, 284, -1, - -1, -1, 302, 303, 304, 305, 306, 307, 308, 309, - 94, -1, -1, 302, 303, 304, 305, 306, 307, 308, - 309, 37, 38, -1, -1, 41, 42, 43, 44, 45, - 46, 47, -1, -1, -1, -1, -1, -1, -1, -1, - 124, -1, -1, 59, 60, -1, 62, 37, 38, -1, - -1, 41, 42, 43, 44, 45, -1, 47, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, - 60, -1, 62, -1, 257, 258, -1, -1, 94, 262, - 263, -1, -1, -1, -1, -1, 269, -1, -1, -1, - 273, 274, -1, 276, 277, 278, 279, 280, 281, 282, - -1, 284, -1, -1, 94, 37, -1, -1, 124, 41, - 42, 43, 44, 45, 46, 47, -1, -1, 301, 302, - 303, 304, 305, 306, 307, 308, 309, 59, 60, -1, - 62, 37, 38, -1, 124, 41, 42, 43, 44, 45, - 46, 47, 37, 38, -1, 273, 41, 42, 43, 44, - 45, 46, 47, 59, 60, -1, 62, -1, -1, -1, - -1, -1, 94, -1, 59, 60, -1, 62, -1, -1, + 275, 33, -1, -1, -1, 308, 309, -1, 40, -1, + -1, 43, 287, 45, -1, -1, -1, -1, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 275, -1, -1, + -1, -1, -1, 308, 309, -1, -1, -1, -1, 287, + -1, -1, -1, -1, -1, 293, 294, 295, 296, 297, + 298, 299, 300, 301, -1, -1, -1, -1, -1, -1, + 308, 309, 37, 38, -1, 40, 41, 42, 43, 44, + 45, -1, 47, -1, 257, 258, -1, -1, -1, 262, + 263, -1, -1, -1, 59, -1, 269, 62, 275, -1, + -1, 274, -1, 276, 277, 278, 279, 280, 281, -1, + 287, 284, -1, -1, -1, -1, 293, 294, 295, 296, + 297, 298, 299, 300, 301, -1, 91, 275, 301, 94, + -1, 308, 309, -1, -1, -1, -1, -1, -1, 287, + -1, -1, -1, -1, 275, 293, 294, 295, 296, 297, + 298, 299, 300, 301, -1, -1, 287, -1, 123, 124, + 308, 309, 293, 294, 295, 296, 297, 298, 299, 300, + 301, -1, -1, 275, -1, -1, -1, 308, 309, -1, + -1, -1, -1, -1, -1, 287, -1, -1, -1, -1, + -1, 293, 294, 295, 296, 297, 298, 299, 300, 301, + -1, -1, -1, -1, 37, -1, 308, 309, 41, 42, + 43, 44, 45, 46, 47, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 275, 59, 60, -1, 62, + -1, -1, -1, -1, -1, -1, -1, 287, -1, -1, + -1, -1, -1, 293, 294, 295, 296, 297, 298, 299, + 300, 301, -1, -1, -1, -1, -1, -1, 308, 309, + -1, 94, -1, -1, -1, 287, -1, -1, -1, -1, + -1, 293, 294, 295, 296, 297, 298, 299, 300, 301, + -1, -1, -1, -1, -1, -1, 308, 309, -1, -1, + -1, 124, 257, 258, -1, -1, -1, 262, 263, -1, + -1, -1, -1, -1, 269, -1, -1, -1, 273, 274, + -1, 276, 277, 278, 279, 280, 281, 282, -1, 284, + -1, -1, -1, 37, 38, -1, -1, 41, 42, 43, + 44, 45, 46, 47, -1, -1, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 59, 60, -1, 62, 37, + 38, -1, -1, 41, 42, 43, 44, 45, 46, 47, + 37, 38, -1, -1, 41, 42, 43, 44, 45, 46, + 47, 59, 60, -1, 62, -1, -1, -1, -1, -1, + -1, -1, 59, 60, -1, 62, -1, -1, -1, -1, + -1, -1, -1, -1, 37, 38, -1, -1, 41, 42, + 43, 44, 45, 46, 47, -1, 94, -1, -1, -1, + 124, -1, -1, -1, -1, -1, 59, 94, -1, -1, + 37, 38, -1, -1, 41, 42, 43, 44, 45, 46, + 47, 37, 38, -1, -1, 41, 42, 43, 44, 45, + 273, 47, 59, 60, -1, 62, -1, 124, -1, -1, + -1, 94, -1, 59, 60, -1, 62, 37, -1, -1, + -1, 41, 42, 43, 44, 45, 46, 47, -1, 302, + 303, 304, 305, 306, 307, 308, 309, 94, -1, 59, + 60, 124, 62, -1, -1, -1, -1, -1, 94, -1, + -1, -1, -1, -1, 37, 38, -1, -1, 41, 42, + 43, 44, 45, 46, 47, -1, -1, 124, -1, -1, + -1, -1, -1, -1, 94, -1, 59, 60, 124, 62, + 37, 38, -1, -1, 41, 42, 43, 44, 45, 46, + 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 59, 60, 124, 62, 37, 38, -1, -1, + 41, 42, 43, 44, 45, 46, 47, -1, -1, 273, + -1, -1, -1, -1, -1, -1, -1, -1, 59, 60, + -1, 62, -1, -1, -1, -1, -1, 94, -1, -1, + -1, 124, -1, -1, -1, 273, -1, -1, 302, 303, + 304, 305, 306, 307, 308, 309, 273, -1, -1, -1, + -1, -1, -1, 94, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 302, 303, 304, 305, 306, 307, - 308, 309, -1, -1, -1, -1, -1, -1, 94, 273, - 37, 38, 124, -1, 41, 42, 43, 44, 45, 46, - 47, -1, -1, -1, -1, -1, -1, -1, -1, 44, - -1, -1, 59, 60, -1, 62, -1, -1, 302, 303, - 304, 305, 306, -1, 308, 309, -1, 62, -1, 124, - -1, -1, -1, 37, 38, -1, -1, 41, 42, -1, - 44, -1, 46, 47, 37, 38, -1, 94, 41, 42, - 43, 44, 45, 46, 47, 59, 60, 273, 62, -1, - -1, -1, -1, -1, -1, -1, 59, 60, -1, 62, - -1, -1, -1, -1, -1, -1, -1, 124, -1, -1, - -1, -1, -1, 273, -1, -1, 302, 303, 304, 305, - 94, 307, 308, 309, -1, -1, -1, -1, -1, 37, - 38, 94, -1, 41, 42, 43, 44, 45, 46, 47, - -1, -1, 302, 303, 304, 305, 306, 307, 308, 309, - 124, 59, 60, -1, 62, -1, -1, -1, 37, 38, - -1, 124, 41, 42, 43, 44, 45, 46, 47, 38, - -1, 273, 41, -1, 43, 44, 45, 46, -1, -1, - 59, -1, -1, -1, -1, -1, 94, -1, -1, -1, - 59, 60, -1, 62, -1, -1, -1, 273, -1, -1, - 302, 303, 304, 305, 306, 307, 308, 309, 273, -1, - -1, -1, -1, 37, 38, 94, 124, 41, 42, 43, - 44, 45, 46, 47, -1, 94, 302, 303, 304, 305, - 306, 307, 308, 309, -1, 59, -1, 302, 303, 304, - 305, 306, 307, 308, 309, 124, -1, -1, -1, -1, - -1, -1, 257, 258, -1, 124, 273, 262, 263, -1, - -1, -1, -1, -1, 269, -1, -1, -1, -1, 274, - 94, 276, 277, 278, 279, 280, 281, -1, -1, 284, - -1, -1, -1, 40, -1, 302, 303, 304, 305, 306, - -1, 308, 309, -1, -1, -1, 301, -1, 38, 273, - 124, 41, 59, 43, 44, 45, 46, -1, -1, -1, - 273, -1, -1, -1, -1, -1, -1, -1, -1, 59, - 60, -1, 62, -1, -1, -1, -1, -1, 302, 303, - 304, 305, 306, 307, 308, 309, -1, -1, -1, -1, - 303, 304, -1, 306, 307, 308, 309, -1, -1, -1, - -1, -1, -1, -1, 94, 38, -1, -1, 41, -1, - 43, 44, 45, 46, -1, 273, 123, -1, 125, -1, - -1, -1, -1, -1, -1, 60, 59, 60, -1, 62, - -1, -1, -1, -1, 124, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 303, 304, -1, 306, 307, - 308, 309, -1, -1, 273, -1, -1, -1, -1, -1, + 308, 309, -1, -1, -1, 302, 303, 304, 305, 306, + -1, 308, 309, 124, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 37, 38, + -1, -1, 41, 42, -1, 44, 273, 46, 47, 302, + -1, -1, 305, 306, 307, 308, 309, 273, -1, -1, + 59, 60, -1, 62, -1, -1, -1, -1, -1, -1, + 60, -1, -1, -1, -1, 302, 303, 304, 305, -1, + 307, 308, 309, 273, -1, -1, 302, 303, 304, 305, + 306, 307, 308, 309, -1, 94, -1, -1, -1, -1, + -1, 37, 38, -1, -1, 41, 42, 43, 44, 45, + 46, 47, 302, 303, 304, 305, 306, 307, 308, 309, + 273, -1, -1, 59, 60, 124, 62, -1, -1, -1, + -1, -1, -1, -1, -1, 37, 38, -1, -1, 41, + 42, 43, 44, 45, 46, 47, 273, -1, -1, 302, + 303, 304, 305, 306, 307, 308, 309, 59, 94, -1, + -1, 37, 38, -1, -1, 41, 42, 43, 44, 45, + 46, 47, 273, -1, -1, 302, 303, 304, 305, 306, + 307, 308, 309, 59, 60, -1, 62, -1, 124, 37, + 38, -1, 94, 41, 42, 43, 44, 45, 46, 47, + -1, 302, 303, 304, 305, 306, -1, 308, 309, 38, + -1, 59, 41, -1, 43, 44, 45, 46, 94, -1, + -1, -1, 124, -1, -1, -1, -1, -1, -1, 38, + 59, 60, 41, 62, 43, 44, 45, 46, -1, -1, + -1, -1, -1, -1, -1, -1, 94, -1, 124, -1, + 59, 60, -1, 62, -1, -1, 38, -1, -1, 41, + -1, 43, 44, 45, 46, 94, -1, 257, 258, -1, + -1, -1, 262, -1, 273, -1, 124, 59, 60, 269, + 62, -1, -1, -1, 274, 94, 276, 277, 278, -1, + -1, -1, -1, -1, 284, 124, -1, -1, -1, -1, + -1, 291, -1, 302, 303, 304, 305, 306, 307, 308, + 309, 301, 94, 40, -1, 124, -1, -1, -1, -1, + -1, 37, 38, -1, -1, 41, 42, 43, 44, 45, + 46, 47, 59, 257, 258, -1, -1, 273, 262, 263, + -1, -1, 124, 59, 60, 269, 62, -1, -1, -1, + 274, -1, 276, 277, 278, 279, 280, 281, -1, -1, }; } class yyCheck2 { - protected static final short yyCheck2 [] = { -1, - 94, 40, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 302, -1, -1, 305, 306, 307, 308, 309, - 59, -1, 302, 303, 304, 305, 306, 307, 308, 309, - 124, 37, 38, -1, -1, 41, 42, 43, 44, 45, - 46, 47, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 59, 60, -1, 62, -1, -1, 40, - -1, -1, -1, -1, -1, -1, -1, 302, -1, -1, - 305, 306, 307, 308, 309, -1, -1, -1, 59, -1, - -1, -1, -1, -1, 123, -1, 125, -1, 94, -1, - 258, -1, -1, -1, 262, -1, -1, -1, -1, 267, - -1, -1, -1, 271, 272, -1, 274, -1, -1, -1, - -1, -1, -1, -1, -1, 283, 40, -1, 124, 287, - -1, -1, 273, -1, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 301, -1, 59, -1, -1, -1, -1, - 308, 309, 123, -1, 125, -1, -1, -1, -1, -1, - -1, 302, 303, 304, 305, 306, 307, 308, 309, -1, - -1, 257, 258, -1, 40, -1, 262, -1, -1, -1, - -1, -1, -1, 269, -1, -1, -1, -1, 274, 273, - 276, 277, 278, 59, -1, -1, -1, -1, 284, -1, - -1, -1, -1, -1, -1, 291, -1, -1, -1, 123, - -1, 125, -1, -1, -1, 301, -1, -1, 302, 303, - 304, 305, 306, 307, 308, 309, -1, -1, -1, 258, - 40, -1, -1, 262, -1, -1, -1, -1, -1, -1, - -1, -1, 271, 272, -1, 274, -1, -1, -1, 59, - -1, -1, -1, -1, 283, -1, -1, 123, 287, 125, + protected static final short yyCheck2 [] = { 284, + -1, 40, 257, -1, -1, -1, 303, 304, 263, 306, + 307, 308, 309, -1, 269, -1, 301, 94, -1, -1, + 59, 276, 277, 278, -1, -1, 281, -1, -1, 284, + -1, -1, -1, -1, -1, 123, 273, 125, -1, 302, + -1, -1, 305, 306, 307, 308, 309, 124, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 40, -1, -1, + -1, -1, -1, -1, -1, -1, 303, 304, -1, 306, + 307, 308, 309, -1, -1, -1, 59, -1, -1, -1, + -1, -1, -1, 273, 123, -1, 125, -1, -1, -1, + -1, -1, -1, 302, -1, -1, 305, 306, 307, 308, + 309, -1, 40, 273, -1, -1, -1, -1, -1, -1, + -1, -1, 302, 303, 304, 305, 306, 307, 308, 309, + -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, + 273, -1, 302, 303, 304, 305, 306, 307, 308, 309, + 123, -1, 125, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 40, -1, -1, -1, -1, 302, + 303, 304, 305, 306, 307, 308, 309, -1, -1, -1, + 258, -1, -1, 59, 262, -1, -1, -1, -1, 267, + -1, -1, -1, 271, 272, 123, 274, 125, -1, -1, + -1, -1, -1, -1, -1, 283, 273, -1, 40, 287, + -1, -1, -1, -1, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, -1, -1, -1, 59, -1, 258, + 308, 309, -1, 262, -1, 302, 303, 304, 305, 306, + 307, -1, 271, 272, -1, 274, -1, 123, -1, 125, + -1, -1, -1, -1, 283, -1, 40, -1, 287, -1, -1, -1, -1, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, -1, -1, -1, -1, 273, 40, 308, - 309, -1, -1, -1, -1, -1, -1, 258, -1, -1, - -1, 262, -1, -1, -1, -1, -1, 59, -1, -1, - 271, 272, -1, 274, -1, -1, 302, 303, 304, 305, - 306, 307, 283, 123, -1, 125, 287, 40, -1, -1, - -1, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 301, -1, -1, -1, -1, -1, 59, 308, 309, -1, - -1, -1, -1, -1, 258, -1, -1, -1, 262, -1, - -1, -1, -1, -1, -1, -1, 40, 271, 272, -1, - 274, 123, -1, 125, -1, -1, -1, -1, -1, 283, - -1, -1, -1, 287, -1, 59, -1, -1, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 301, -1, -1, - -1, -1, 258, -1, 308, 309, 262, -1, -1, -1, - 123, -1, -1, -1, -1, 271, 272, -1, 274, -1, - -1, -1, -1, -1, -1, -1, -1, 283, 44, -1, - -1, 287, -1, -1, -1, -1, 292, 293, 294, 295, - 296, 297, 298, 299, 300, 301, 62, -1, -1, 123, - -1, -1, 308, 309, -1, -1, -1, -1, 258, -1, - -1, -1, 262, -1, -1, -1, -1, -1, -1, -1, - -1, 271, 272, 60, 274, -1, -1, -1, -1, -1, - -1, -1, -1, 283, -1, -1, -1, 287, -1, -1, - -1, -1, 292, 293, 294, 295, 296, 297, 298, 299, - 300, 301, -1, 60, -1, -1, 258, -1, 308, 309, - 262, -1, -1, -1, -1, -1, -1, -1, -1, 271, + 299, 300, 301, -1, -1, 59, -1, -1, -1, 308, + 309, -1, -1, -1, -1, 258, -1, -1, -1, 262, + -1, 123, -1, 125, -1, -1, 40, -1, 271, 272, + -1, 274, -1, -1, -1, -1, -1, -1, -1, -1, + 283, -1, -1, -1, 287, 59, -1, -1, -1, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, 40, + 258, -1, -1, -1, 262, 308, 309, -1, -1, 123, + -1, 125, -1, 271, 272, -1, 274, -1, 59, -1, + -1, -1, -1, -1, -1, 283, -1, -1, -1, 287, + -1, -1, -1, -1, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, -1, -1, -1, -1, -1, 123, + 308, 309, 258, -1, -1, -1, 262, 44, -1, -1, + -1, -1, -1, -1, -1, 271, 272, -1, 274, -1, + -1, -1, -1, -1, -1, 62, -1, 283, -1, -1, + -1, 287, 123, -1, -1, -1, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 258, -1, -1, -1, + 262, 60, 308, 309, -1, -1, -1, -1, -1, 271, 272, -1, 274, -1, -1, -1, -1, -1, -1, -1, - -1, 283, -1, -1, 60, 287, -1, -1, 125, -1, + -1, 283, -1, -1, -1, 287, -1, -1, -1, -1, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, - -1, -1, -1, -1, -1, -1, 308, 309, 271, 272, - -1, -1, -1, -1, 60, -1, -1, -1, 125, -1, - 283, -1, -1, -1, 287, -1, -1, -1, -1, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, - -1, -1, 60, -1, -1, 308, 309, 271, 272, 125, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 283, + -1, 60, -1, -1, 258, -1, 308, 309, 262, -1, + -1, -1, -1, -1, -1, -1, -1, 271, 272, -1, + 274, -1, -1, -1, -1, -1, 125, -1, -1, 283, + -1, 60, -1, 287, -1, -1, -1, -1, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, -1, -1, + -1, -1, -1, -1, 308, 309, -1, 271, 272, 60, + -1, -1, -1, -1, -1, -1, 125, -1, -1, 283, -1, -1, -1, 287, -1, -1, -1, -1, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 301, -1, 125, - -1, -1, -1, -1, 308, 309, -1, -1, -1, -1, - -1, 257, 258, -1, -1, -1, 262, 263, -1, -1, - -1, -1, -1, 269, -1, -1, -1, -1, 274, -1, - 276, 277, 278, 279, 280, 281, -1, -1, 284, -1, - 257, 258, -1, -1, -1, 262, -1, -1, -1, -1, - -1, -1, 269, -1, -1, 301, -1, 274, -1, 276, - 277, 278, -1, -1, -1, -1, -1, 284, -1, -1, - 257, 258, -1, -1, 291, 262, -1, -1, -1, -1, - -1, -1, 269, -1, 301, -1, -1, 274, -1, 276, - 277, 278, -1, -1, -1, -1, -1, 284, -1, -1, - -1, 257, 258, -1, 291, -1, 262, 87, -1, -1, - -1, 91, -1, 269, 301, -1, -1, -1, 274, -1, - 276, 277, 278, -1, 104, 105, -1, -1, 284, -1, - -1, 257, 258, -1, -1, 291, 262, -1, -1, -1, - -1, -1, -1, 269, 124, 301, 126, 127, 274, -1, - 276, 277, 278, -1, -1, -1, -1, -1, 284, 257, - 258, -1, -1, -1, 262, 291, -1, 147, -1, 149, - -1, 269, -1, -1, -1, 301, 274, -1, 276, 277, - 278, 420, 421, -1, -1, 165, 284, -1, 168, -1, - -1, -1, 431, 291, -1, -1, -1, 177, -1, 179, - -1, -1, -1, 301, -1, -1, -1, -1, -1, -1, - -1, 450, 451, -1, 453, -1, -1, -1, -1, 458, + 294, 295, 296, 297, 298, 299, 300, 301, -1, 60, + 271, 272, -1, -1, 308, 309, 125, -1, -1, -1, + -1, -1, 283, -1, -1, -1, 287, -1, -1, -1, + -1, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, -1, -1, -1, 125, -1, -1, 308, 309, -1, + 257, 258, -1, -1, -1, 262, 263, -1, -1, -1, + -1, -1, 269, -1, -1, -1, -1, 274, -1, 276, + 277, 278, 279, 280, 281, -1, -1, 284, 257, 258, + -1, -1, -1, 262, -1, -1, -1, -1, -1, -1, + 269, -1, -1, -1, 301, 274, -1, 276, 277, 278, + -1, -1, -1, -1, -1, 284, -1, -1, -1, -1, + -1, -1, 291, -1, -1, -1, -1, -1, 257, 258, + -1, -1, 301, 262, -1, 88, -1, -1, -1, 92, + 269, -1, -1, -1, -1, 274, -1, 276, 277, 278, + -1, -1, 105, 106, -1, 284, -1, -1, 257, 258, + -1, -1, 291, 262, -1, -1, -1, -1, -1, -1, + 269, 124, 301, 126, 127, 274, -1, 276, 277, 278, + -1, -1, -1, -1, -1, 284, 257, 258, -1, -1, + -1, 262, 291, -1, 147, -1, 149, -1, 269, -1, + -1, -1, 301, 274, -1, 276, 277, 278, -1, -1, + -1, -1, 165, 284, -1, 168, 257, 258, -1, -1, + 291, 262, -1, -1, 177, -1, 179, -1, 269, -1, + 301, 420, 421, 274, -1, 276, 277, 278, -1, -1, + -1, -1, 431, 284, -1, -1, -1, -1, -1, -1, + 291, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 301, 450, 451, -1, 453, -1, -1, -1, -1, 458, -1, -1, -1, 462, -1, 464, 465, -1, -1, -1, -1, -1, -1, -1, 473, 474, 475, -1, -1, -1, 479, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 292, 293, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 292, + 293, }; } class yyCheckInit { - static short[] yyCheck = new short[2927]; + static short[] yyCheck = new short[2874]; protected static void yyCheckInit () { int numyycheck; int yyCheckerun = 0; for (numyycheck = 0; numyycheck <= 1000; numyycheck++) { - if (yyCheckerun < 2927) { + if (yyCheckerun < 2874) { yyCheck[yyCheckerun] = yyCheck0.yyCheck0[numyycheck]; yyCheckerun++; } } for (numyycheck = 0; numyycheck <= 1000; numyycheck++) { - if (yyCheckerun < 2927) { + if (yyCheckerun < 2874) { yyCheck[yyCheckerun] = yyCheck1.yyCheck1[numyycheck]; yyCheckerun++; } } for (numyycheck = 0; numyycheck <= 1000; numyycheck++) { - if (yyCheckerun < 2927) { + if (yyCheckerun < 2874) { yyCheck[yyCheckerun] = yyCheck2.yyCheck2[numyycheck]; yyCheckerun++; } diff --git a/src/mycompiler/myparser/JavaParser.jay b/src/mycompiler/myparser/JavaParser.jay index 16b86385..120563f0 100755 --- a/src/mycompiler/myparser/JavaParser.jay +++ b/src/mycompiler/myparser/JavaParser.jay @@ -787,20 +787,8 @@ classbodydeclaration : classmemberdeclaration $$=$1; } //*/ - -typename : simplename - { - $$=$1; - } - | IDENTIFIER '.' typename - { - UsedId UI = new UsedId($1.getOffset()); - UI.set_Name( $1.getLexem() + "." + $3 ); - UI.setOffset($1.getOffset());//hinzugef�gt hoth: 07.04.2006 - $$ = UI; - } -classorinterfacetype : simplename parameter +classorinterfacetype : name parameter { if ($2 != null) { //$1.set_ParaList($2.get_ParaList()); @@ -1254,12 +1242,6 @@ type : primitivetype { $$=$1; } - /* - | referencelongtype - { - $$=$1; - } - */ |referencetype '[' ']' { $1.setArray(true); diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest17.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest17.jav new file mode 100644 index 00000000..7a42eb93 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest17.jav @@ -0,0 +1,9 @@ +class ConstructorTest1{} + +class ConstructorTest2{ +var; + void method(){ + var = new ConstructorTest1(); + } + +} \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest17.java b/test/plugindevelopment/TypeInsertTests/LambdaTest17.java new file mode 100644 index 00000000..5cfc558a --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest17.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class LambdaTest17 { + private static final String TEST_FILE = "LambdaTest17.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + //mustContain.add("A a"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest18.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest18.jav new file mode 100644 index 00000000..161680c7 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest18.jav @@ -0,0 +1,6 @@ + +class Test{ +java.lang.Integer var; +var2 = var; + +} \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest18.java b/test/plugindevelopment/TypeInsertTests/LambdaTest18.java new file mode 100644 index 00000000..69332a60 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest18.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class LambdaTest18 { + private static final String TEST_FILE = "LambdaTest18.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + mustContain.add("java.lang.Integer var2"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} From 63a10f4775d1f231f160c65779b442c9835c34e9 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 7 Aug 2014 14:26:02 +0200 Subject: [PATCH 09/31] Fehler behoben --- src/mycompiler/myclass/FieldDeclaration.java | 1 + src/mycompiler/myparser/JavaParser.java | 298 +++++++++--------- src/mycompiler/mystatement/IfStmt.java | 2 +- src/mycompiler/mystatement/WhileStmt.java | 2 +- .../TypeInsertTests/LambdaTest19.jav | 14 + .../TypeInsertTests/LambdaTest19.java | 16 + .../TypeInsertTests/LambdaTest20.jav | 11 + .../TypeInsertTests/LambdaTest20.java | 16 + .../TypeInsertTests/LambdaTest21.jav | 9 + .../MultipleTypesInsertTester.java | 2 +- 10 files changed, 219 insertions(+), 152 deletions(-) create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest19.jav create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest19.java create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest20.jav create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest20.java create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest21.jav diff --git a/src/mycompiler/myclass/FieldDeclaration.java b/src/mycompiler/myclass/FieldDeclaration.java index 39393a04..694c9e35 100644 --- a/src/mycompiler/myclass/FieldDeclaration.java +++ b/src/mycompiler/myclass/FieldDeclaration.java @@ -128,6 +128,7 @@ public class FieldDeclaration extends Field{ } @Override public ConstraintsSet TYPE(TypeAssumptions publicAssumptions) { + if(this.wert == null)throw new TypeinferenceException("Typlose Felder müssen mit Wert initialisiert werden", this); ConstraintsSet ret = new ConstraintsSet(); TypeAssumptions localAssumptions = publicAssumptions.clone(); diff --git a/src/mycompiler/myparser/JavaParser.java b/src/mycompiler/myparser/JavaParser.java index 970b48cd..4a72fd29 100644 --- a/src/mycompiler/myparser/JavaParser.java +++ b/src/mycompiler/myparser/JavaParser.java @@ -1855,13 +1855,13 @@ case 136: } break; case 137: - // line 1252 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1246 "./../src/mycompiler/myparser/JavaParser.jay" { ((RefType)yyVals[-2+yyTop]).setArray(true); } break; case 138: - // line 1256 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1250 "./../src/mycompiler/myparser/JavaParser.jay" { FieldDeclaration IVD = new FieldDeclaration(((DeclId)yyVals[0+yyTop]).getOffset()); IVD.getDeclIdVector().addElement( ((DeclId)yyVals[0+yyTop]) ); @@ -1870,20 +1870,20 @@ case 138: } break; case 139: - // line 1263 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1257 "./../src/mycompiler/myparser/JavaParser.jay" { ((FieldDeclaration)yyVals[-2+yyTop]).getDeclIdVector().addElement(((DeclId)yyVals[0+yyTop])); yyVal=((FieldDeclaration)yyVals[-2+yyTop]); } break; case 140: - // line 1269 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1263 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; case 141: - // line 1274 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1268 "./../src/mycompiler/myparser/JavaParser.jay" { Block Blstat = new Block(); Blstat.set_Statement(((Statement)yyVals[0+yyTop])); @@ -1891,14 +1891,14 @@ case 141: } break; case 142: - // line 1281 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1275 "./../src/mycompiler/myparser/JavaParser.jay" { ((Block)yyVals[-1+yyTop]).set_Statement(((Statement)yyVals[0+yyTop])); yyVal=((Block)yyVals[-1+yyTop]); } break; case 143: - // line 1287 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1281 "./../src/mycompiler/myparser/JavaParser.jay" { ParameterList PL = new ParameterList(); PL.set_AddParameter(((FormalParameter)yyVals[0+yyTop])); @@ -1906,21 +1906,21 @@ case 143: } break; case 144: - // line 1293 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1287 "./../src/mycompiler/myparser/JavaParser.jay" { ((ParameterList)yyVals[-2+yyTop]).set_AddParameter(((FormalParameter)yyVals[0+yyTop])); yyVal = ((ParameterList)yyVals[-2+yyTop]); } break; case 145: - // line 1299 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1293 "./../src/mycompiler/myparser/JavaParser.jay" { This THCON = new This(((Token)yyVals[-3+yyTop]).getOffset(),((Token)yyVals[-3+yyTop]).getLexem().length()); yyVal=THCON; } break; case 146: - // line 1304 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1298 "./../src/mycompiler/myparser/JavaParser.jay" { This THCONargl = new This(((Token)yyVals[-4+yyTop]).getOffset(),((Token)yyVals[-4+yyTop]).getLexem().length()); THCONargl.set_ArgumentList(((ArgumentList)yyVals[-2+yyTop])); @@ -1928,7 +1928,7 @@ case 146: } break; case 147: - // line 1313 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1307 "./../src/mycompiler/myparser/JavaParser.jay" { RefType RT = new RefType(-1); RT.set_UsedId(((UsedId)yyVals[0+yyTop])); @@ -1937,7 +1937,7 @@ case 147: } break; case 148: - // line 1320 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1314 "./../src/mycompiler/myparser/JavaParser.jay" { ((RefType)yyVals[-2+yyTop]).set_UsedId(((UsedId)yyVals[0+yyTop])); ((RefType)yyVals[-2+yyTop]).setName(((RefType)yyVals[-2+yyTop]).get_UsedId().get_Name_1Element()); @@ -1945,7 +1945,7 @@ case 148: } break; case 149: - // line 1327 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1321 "./../src/mycompiler/myparser/JavaParser.jay" { Method met = new Method(((Token)yyVals[-2+yyTop]).getOffset()); /* #JB# 10.04.2005 */ @@ -1960,7 +1960,7 @@ case 149: } break; case 150: - // line 1340 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1334 "./../src/mycompiler/myparser/JavaParser.jay" { Method met_para = new Method(((Token)yyVals[-3+yyTop]).getOffset()); /* #JB# 10.04.2005 */ @@ -1976,7 +1976,7 @@ case 150: } break; case 151: - // line 1355 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1349 "./../src/mycompiler/myparser/JavaParser.jay" { BooleanType BT = new BooleanType(); /* #JB# 05.04.2005 */ @@ -1987,13 +1987,13 @@ case 151: } break; case 152: - // line 1364 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1358 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; case 153: - // line 1369 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1363 "./../src/mycompiler/myparser/JavaParser.jay" { if (((Vector)yyVals[0+yyTop]) != null) { /*$1.set_ParaList($2.get_ParaList());*/ @@ -2016,7 +2016,7 @@ case 153: } break; case 154: - // line 1391 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1385 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->referenctype: " + ((UsedId)yyVals[0+yyTop])); RefType RT = new RefType(((UsedId)yyVals[0+yyTop]).getOffset()); @@ -2036,25 +2036,25 @@ case 154: } break; case 155: - // line 1413 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1407 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((DeclId)yyVals[0+yyTop]); } break; case 156: - // line 1434 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1428 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((LocalVarDecl)yyVals[0+yyTop]); } break; case 157: - // line 1438 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1432 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; case 158: - // line 1443 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1437 "./../src/mycompiler/myparser/JavaParser.jay" { FormalParameter FP = new FormalParameter(((DeclId)yyVals[0+yyTop])); FP.setType(((Type)yyVals[-1+yyTop])); @@ -2063,7 +2063,7 @@ case 158: } break; case 159: - // line 1468 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1462 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + ((DeclId)yyVals[0+yyTop]).name); @@ -2083,7 +2083,7 @@ case 159: } break; case 160: - // line 1487 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1481 "./../src/mycompiler/myparser/JavaParser.jay" { ArgumentList AL = new ArgumentList(); AL.expr.addElement(((Expr)yyVals[0+yyTop])); @@ -2091,20 +2091,20 @@ case 160: } break; case 161: - // line 1493 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1487 "./../src/mycompiler/myparser/JavaParser.jay" { ((ArgumentList)yyVals[-2+yyTop]).expr.addElement(((Expr)yyVals[0+yyTop])); yyVal=((ArgumentList)yyVals[-2+yyTop]); } break; case 162: - // line 1499 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1493 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; case 163: - // line 1504 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1498 "./../src/mycompiler/myparser/JavaParser.jay" { DeclId DI = new DeclId(); /* #JB# 10.04.2005 */ @@ -2117,61 +2117,61 @@ case 163: } break; case 164: - // line 1516 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1510 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 165: - // line 1521 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1515 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((LocalVarDecl)yyVals[-1+yyTop]); } break; case 166: - // line 1526 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1520 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; case 167: - // line 1530 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1524 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; case 168: - // line 1534 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1528 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; case 169: - // line 1538 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1532 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((WhileStmt)yyVals[0+yyTop]); } break; case 170: - // line 1542 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1536 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((ForStmt)yyVals[0+yyTop]); } break; case 171: - // line 1547 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1541 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 172: - // line 1551 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1545 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((NewClass)yyVals[0+yyTop]); } break; case 173: - // line 1556 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1550 "./../src/mycompiler/myparser/JavaParser.jay" { IntegerType IT = new IntegerType(); /* #JB# 05.04.2005 */ @@ -2182,7 +2182,7 @@ case 173: } break; case 174: - // line 1565 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1559 "./../src/mycompiler/myparser/JavaParser.jay" { CharacterType CT = new CharacterType(); /* #JB# 05.04.2005 */ @@ -2193,7 +2193,7 @@ case 174: } break; case 175: - // line 1575 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1569 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); LocalVarDecl LVD = new LocalVarDecl(((Type)yyVals[-1+yyTop]).getOffset(),((Type)yyVals[-1+yyTop]).getVariableLength()); @@ -2203,7 +2203,7 @@ case 175: } break; case 176: - // line 1586 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1580 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); LocalVarDecl LVD = new LocalVarDecl(((FieldDeclaration)yyVals[0+yyTop]).getOffset(),((FieldDeclaration)yyVals[0+yyTop]).getVariableLength()); @@ -2213,31 +2213,31 @@ case 176: } break; case 177: - // line 1596 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1590 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; case 178: - // line 1600 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1594 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((EmptyStmt)yyVals[0+yyTop]); } break; case 179: - // line 1604 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1598 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((ExprStmt)yyVals[0+yyTop]); } break; case 180: - // line 1608 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1602 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Return)yyVals[0+yyTop]); } break; case 181: - // line 1613 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1607 "./../src/mycompiler/myparser/JavaParser.jay" { IfStmt Ifst = new IfStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Ifst.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2246,7 +2246,7 @@ case 181: } break; case 182: - // line 1621 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1615 "./../src/mycompiler/myparser/JavaParser.jay" { IfStmt IfstElst = new IfStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); IfstElst.set_Expr(((Expr)yyVals[-4+yyTop])); @@ -2256,7 +2256,7 @@ case 182: } break; case 183: - // line 1630 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1624 "./../src/mycompiler/myparser/JavaParser.jay" { WhileStmt Whlst = new WhileStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Whlst.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2265,7 +2265,7 @@ case 183: } break; case 184: - // line 1641 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1635 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-6+yyTop]).getOffset(),((Expr)yyVals[-6+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-6+yyTop])); @@ -2278,7 +2278,7 @@ case 184: } break; case 185: - // line 1653 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1647 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-5+yyTop])); @@ -2290,7 +2290,7 @@ case 185: } break; case 186: - // line 1664 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1658 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-5+yyTop])); @@ -2302,7 +2302,7 @@ case 186: } break; case 187: - // line 1675 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1669 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); Fst.set_head_Condition(((Expr)yyVals[-4+yyTop])); @@ -2314,7 +2314,7 @@ case 187: } break; case 188: - // line 1686 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1680 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-4+yyTop])); @@ -2325,7 +2325,7 @@ case 188: } break; case 189: - // line 1696 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1690 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-3+yyTop]).getOffset(),((Expr)yyVals[-3+yyTop]).getVariableLength()); Fst.set_head_Condition(((Expr)yyVals[-3+yyTop])); @@ -2336,7 +2336,7 @@ case 189: } break; case 190: - // line 1706 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1700 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Fst.set_head_Loop_expr(((Expr)yyVals[-2+yyTop])); @@ -2347,7 +2347,7 @@ case 190: } break; case 191: - // line 1716 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1710 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Statement)yyVals[0+yyTop]).getOffset(),((Statement)yyVals[0+yyTop]).getVariableLength()); Fst.set_body_Loop_block(((Statement)yyVals[0+yyTop])); @@ -2357,40 +2357,40 @@ case 191: } break; case 192: - // line 1725 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1719 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("conditionalexpression"); yyVal=((Expr)yyVals[0+yyTop]); } break; case 193: - // line 1730 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1724 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Assign)yyVals[0+yyTop]); } break; case 194: - // line 1736 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1730 "./../src/mycompiler/myparser/JavaParser.jay" { EmptyStmt Empst = new EmptyStmt(); yyVal=Empst; } break; case 195: - // line 1742 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1736 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[-1+yyTop]); } break; case 196: - // line 1747 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1741 "./../src/mycompiler/myparser/JavaParser.jay" { Return ret = new Return(-1,-1); yyVal= ret; } break; case 197: - // line 1752 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1746 "./../src/mycompiler/myparser/JavaParser.jay" { Return retexp = new Return(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); retexp.set_ReturnExpr(((Expr)yyVals[-1+yyTop])); @@ -2398,31 +2398,31 @@ case 197: } break; case 198: - // line 1759 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1753 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; case 199: - // line 1763 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1757 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; case 200: - // line 1767 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1761 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((WhileStmt)yyVals[0+yyTop]); } break; case 201: - // line 1772 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1766 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 202: - // line 1778 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1772 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n"); Assign Ass = new Assign(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2449,7 +2449,7 @@ case 202: } break; case 203: - // line 1803 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1797 "./../src/mycompiler/myparser/JavaParser.jay" { Assign Ass =new Assign(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); LocalOrFieldVar LOFV = new LocalOrFieldVar(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2473,43 +2473,43 @@ case 203: } break; case 204: - // line 1826 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1820 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Assign)yyVals[0+yyTop]); } break; case 205: - // line 1830 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1824 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 206: - // line 1834 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1828 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 207: - // line 1838 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1832 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 208: - // line 1842 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1836 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 209: - // line 1846 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1840 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((MethodCall)yyVals[0+yyTop]); } break; case 210: - // line 1857 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1851 "./../src/mycompiler/myparser/JavaParser.jay" { IfStmt IfElno = new IfStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); IfElno.set_Expr(((Expr)yyVals[-4+yyTop])); @@ -2519,7 +2519,7 @@ case 210: } break; case 211: - // line 1866 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1860 "./../src/mycompiler/myparser/JavaParser.jay" { WhileStmt Whstno = new WhileStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Whstno.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2528,13 +2528,13 @@ case 211: } break; case 212: - // line 1874 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1868 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 213: - // line 1878 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1872 "./../src/mycompiler/myparser/JavaParser.jay" { Binary LogOr = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); OrOp OrO = new OrOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2546,19 +2546,19 @@ case 213: } break; case 214: - // line 1891 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1885 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=null; } break; case 215: - // line 1896 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1890 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; case 216: - // line 1900 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1894 "./../src/mycompiler/myparser/JavaParser.jay" { /*Lambdabody kann auch nur aus einer Expression bestehen. In diesem Fall wird ein Block erstellt, welcher als einziges Statement ein return statment mit der expression hat.*/ /*Bsp.: Aus der Expression |var=="hallo"| wird: |{return var=="hallo";}|*/ @@ -2569,19 +2569,19 @@ case 216: } break; case 217: - // line 1910 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1904 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=null; } break; case 218: - // line 1914 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1908 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((ParameterList)yyVals[-1+yyTop]); } break; case 219: - // line 1919 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1913 "./../src/mycompiler/myparser/JavaParser.jay" { LambdaExpression lambda = new LambdaExpression(/*((ParameSterList)$2).getOffset(),((ParameterList)$2).getVariableLength()*/0,0); if(((ParameterList)yyVals[-2+yyTop])!=null)lambda.setParameterList(((ParameterList)yyVals[-2+yyTop])); @@ -2590,54 +2590,54 @@ case 219: } break; case 220: - // line 1938 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1932 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((UsedId)yyVals[0+yyTop]); } break; case 221: - // line 1943 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1937 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=null; } break; case 222: - // line 1947 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1941 "./../src/mycompiler/myparser/JavaParser.jay" { TimesOp TEO = new TimesOp(-1,-1); yyVal=TEO; } break; case 223: - // line 1952 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1946 "./../src/mycompiler/myparser/JavaParser.jay" { DivideOp DEO = new DivideOp(-1,-1); yyVal=DEO; } break; case 224: - // line 1957 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1951 "./../src/mycompiler/myparser/JavaParser.jay" { ModuloOp MEO = new ModuloOp(-1,-1); yyVal=MEO; } break; case 225: - // line 1962 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1956 "./../src/mycompiler/myparser/JavaParser.jay" { PlusOp PEO = new PlusOp(-1,-1); yyVal=PEO; } break; case 226: - // line 1967 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1961 "./../src/mycompiler/myparser/JavaParser.jay" { MinusOp MEO = new MinusOp(-1,-1); yyVal=MEO; } break; case 227: - // line 1979 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1973 "./../src/mycompiler/myparser/JavaParser.jay" { PreIncExpr PRINC = new PreIncExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); PRINC.set_Expr(((Expr)yyVals[0+yyTop])); @@ -2645,7 +2645,7 @@ case 227: } break; case 228: - // line 1986 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1980 "./../src/mycompiler/myparser/JavaParser.jay" { PreDecExpr PRDEC = new PreDecExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); PRDEC.set_Expr(((Expr)yyVals[0+yyTop])); @@ -2653,7 +2653,7 @@ case 228: } break; case 229: - // line 1993 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1987 "./../src/mycompiler/myparser/JavaParser.jay" { PostIncExpr PIE = new PostIncExpr(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); PIE.set_Expr(((Expr)yyVals[-1+yyTop])); @@ -2661,7 +2661,7 @@ case 229: } break; case 230: - // line 2000 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1994 "./../src/mycompiler/myparser/JavaParser.jay" { PostDecExpr PDE = new PostDecExpr(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); PDE.set_Expr(((Expr)yyVals[-1+yyTop])); @@ -2669,7 +2669,7 @@ case 230: } break; case 231: - // line 2008 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2002 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M1"); MethodCall MC = new MethodCall(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2701,7 +2701,7 @@ case 231: } break; case 232: - // line 2038 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2032 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M2"); MethodCall MCarg = new MethodCall(((UsedId)yyVals[-3+yyTop]).getOffset(),((UsedId)yyVals[-3+yyTop]).getVariableLength()); @@ -2734,7 +2734,7 @@ case 232: } break; case 233: - // line 2069 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2063 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M3"); MethodCall MCpr = new MethodCall(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); @@ -2755,7 +2755,7 @@ case 233: } break; case 234: - // line 2088 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2082 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M4"); MethodCall MCPA = new MethodCall(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); @@ -2777,7 +2777,7 @@ case 234: } break; case 235: - // line 2111 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2105 "./../src/mycompiler/myparser/JavaParser.jay" { NewClass NC = new NewClass(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); NC.set_UsedId(((UsedId)yyVals[-2+yyTop])); @@ -2787,7 +2787,7 @@ case 235: } break; case 236: - // line 2119 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2113 "./../src/mycompiler/myparser/JavaParser.jay" { NewClass NCarg = new NewClass(((UsedId)yyVals[-3+yyTop]).getOffset(),((UsedId)yyVals[-3+yyTop]).getVariableLength()); NCarg.set_UsedId(((UsedId)yyVals[-3+yyTop])); @@ -2798,13 +2798,13 @@ case 236: } break; case 237: - // line 2129 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2123 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 238: - // line 2133 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2127 "./../src/mycompiler/myparser/JavaParser.jay" { Binary And = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); AndOp AndO = new AndOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2816,19 +2816,19 @@ case 238: } break; case 239: - // line 2149 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2143 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 240: - // line 2153 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2147 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 241: - // line 2157 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2151 "./../src/mycompiler/myparser/JavaParser.jay" { PositivExpr POSEX=new PositivExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryPlus UP= new UnaryPlus(); @@ -2838,7 +2838,7 @@ case 241: } break; case 242: - // line 2165 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2159 "./../src/mycompiler/myparser/JavaParser.jay" { NegativeExpr NEGEX=new NegativeExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryMinus UM=new UnaryMinus(); @@ -2848,19 +2848,19 @@ case 242: } break; case 243: - // line 2173 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2167 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 244: - // line 2178 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2172 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 245: - // line 2182 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2176 "./../src/mycompiler/myparser/JavaParser.jay" { if (((UsedId)yyVals[0+yyTop]).get_Name().size() > 1) { @@ -2880,37 +2880,37 @@ case 245: } break; case 246: - // line 2200 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2194 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 247: - // line 2204 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2198 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 248: - // line 2209 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2203 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 249: - // line 2214 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2208 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 251: - // line 2220 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2214 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Literal)yyVals[0+yyTop]); } break; case 252: - // line 2224 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2218 "./../src/mycompiler/myparser/JavaParser.jay" { This T = new This(((Token)yyVals[0+yyTop]).getOffset(),((Token)yyVals[0+yyTop]).getLexem().length()); UsedId UT = new UsedId(((Token)yyVals[0+yyTop]).getOffset()); @@ -2920,23 +2920,23 @@ case 252: } break; case 253: - // line 2245 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2239 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((MethodCall)yyVals[0+yyTop]); } break; case 254: - // line 2249 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2243 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 255: - // line 2254 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2248 "./../src/mycompiler/myparser/JavaParser.jay" {yyVal=((Expr)yyVals[0+yyTop]);} break; case 256: - // line 2256 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2250 "./../src/mycompiler/myparser/JavaParser.jay" {NotExpr NE=new NotExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryNot UN=new UnaryNot(); NE.set_UnaryNot(UN); @@ -2945,36 +2945,36 @@ case 256: } break; case 257: - // line 2262 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2256 "./../src/mycompiler/myparser/JavaParser.jay" {yyVal=((CastExpr)yyVals[0+yyTop]);} break; case 258: - // line 2264 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2258 "./../src/mycompiler/myparser/JavaParser.jay" {yyVal=((Expr)yyVals[0+yyTop]);} break; case 260: - // line 2269 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2263 "./../src/mycompiler/myparser/JavaParser.jay" {IntLiteral IL = new IntLiteral(); IL.set_Int(((Token)yyVals[0+yyTop]).String2Int()); yyVal = IL; } break; case 261: - // line 2274 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2268 "./../src/mycompiler/myparser/JavaParser.jay" {BoolLiteral BL = new BoolLiteral(); BL.set_Bool(((Token)yyVals[0+yyTop]).String2Bool()); yyVal = BL; } break; case 262: - // line 2278 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2272 "./../src/mycompiler/myparser/JavaParser.jay" {CharLiteral CL = new CharLiteral(); CL.set_Char(((Token)yyVals[0+yyTop]).CharInString()); yyVal=CL; } break; case 263: - // line 2283 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2277 "./../src/mycompiler/myparser/JavaParser.jay" { StringLiteral ST = new StringLiteral(); ST.set_String(((Token)yyVals[0+yyTop]).get_String()); @@ -2982,14 +2982,14 @@ case 263: } break; case 264: - // line 2288 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2282 "./../src/mycompiler/myparser/JavaParser.jay" { LongLiteral LL = new LongLiteral(); LL.set_Long(((Token)yyVals[0+yyTop]).String2Long()); yyVal = LL; } break; case 265: - // line 2292 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2286 "./../src/mycompiler/myparser/JavaParser.jay" { FloatLiteral FL = new FloatLiteral(); FL.set_Float(((Token)yyVals[0+yyTop]).String2Float()); @@ -2997,7 +2997,7 @@ case 265: } break; case 266: - // line 2297 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2291 "./../src/mycompiler/myparser/JavaParser.jay" { DoubleLiteral DL = new DoubleLiteral(); DL.set_Double(((Token)yyVals[0+yyTop]).String2Double()); @@ -3005,14 +3005,14 @@ case 266: } break; case 267: - // line 2303 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2297 "./../src/mycompiler/myparser/JavaParser.jay" { Null NN = new Null(); yyVal=NN; } break; case 268: - // line 2309 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2303 "./../src/mycompiler/myparser/JavaParser.jay" { CastExpr CaEx=new CastExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); CaEx.set_Type(((BaseType)yyVals[-2+yyTop])); @@ -3021,24 +3021,24 @@ case 268: } break; case 269: - // line 2318 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2312 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 270: - // line 2322 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2316 "./../src/mycompiler/myparser/JavaParser.jay" { } break; case 271: - // line 2326 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2320 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 272: - // line 2330 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2324 "./../src/mycompiler/myparser/JavaParser.jay" { Binary EQ = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); EqualOp EO = new EqualOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3050,7 +3050,7 @@ case 272: } break; case 273: - // line 2340 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2334 "./../src/mycompiler/myparser/JavaParser.jay" { Binary NEQ = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); NotEqualOp NEO = new NotEqualOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3062,13 +3062,13 @@ case 273: } break; case 274: - // line 2351 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2345 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 275: - // line 2355 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2349 "./../src/mycompiler/myparser/JavaParser.jay" { Binary LO = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); LessOp LOO = new LessOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3080,7 +3080,7 @@ case 275: } break; case 276: - // line 2365 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2359 "./../src/mycompiler/myparser/JavaParser.jay" { Binary GO = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); GreaterOp GOO = new GreaterOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3092,7 +3092,7 @@ case 276: } break; case 277: - // line 2375 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2369 "./../src/mycompiler/myparser/JavaParser.jay" { Binary LE = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); LessEquOp LEO = new LessEquOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3104,7 +3104,7 @@ case 277: } break; case 278: - // line 2385 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2379 "./../src/mycompiler/myparser/JavaParser.jay" { Binary GE = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); GreaterEquOp GEO = new GreaterEquOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3116,7 +3116,7 @@ case 278: } break; case 279: - // line 2395 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2389 "./../src/mycompiler/myparser/JavaParser.jay" { InstanceOf ISO=new InstanceOf(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); ISO.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -3125,19 +3125,19 @@ case 279: } break; case 280: - // line 2403 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2397 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 281: - // line 2408 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2402 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 282: - // line 2412 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2406 "./../src/mycompiler/myparser/JavaParser.jay" { Binary AD = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); PlusOp PO = new PlusOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3149,7 +3149,7 @@ case 282: } break; case 283: - // line 2422 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2416 "./../src/mycompiler/myparser/JavaParser.jay" { Binary MI = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); MinusOp MO = new MinusOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3161,13 +3161,13 @@ case 283: } break; case 284: - // line 2433 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2427 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 285: - // line 2437 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2431 "./../src/mycompiler/myparser/JavaParser.jay" { Binary ML = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); TimesOp TO = new TimesOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3179,7 +3179,7 @@ case 285: } break; case 286: - // line 2447 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2441 "./../src/mycompiler/myparser/JavaParser.jay" { Binary DV = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); DivideOp DO = new DivideOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3191,7 +3191,7 @@ case 286: } break; case 287: - // line 2457 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2451 "./../src/mycompiler/myparser/JavaParser.jay" { Binary MD = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); ModuloOp MO = new ModuloOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); diff --git a/src/mycompiler/mystatement/IfStmt.java b/src/mycompiler/mystatement/IfStmt.java index c79d1529..202cb6d1 100755 --- a/src/mycompiler/mystatement/IfStmt.java +++ b/src/mycompiler/mystatement/IfStmt.java @@ -389,7 +389,7 @@ public class IfStmt extends Statement ret.add(this.else_block.TYPEStmt(assumptions)); if(!(else_block.getType() instanceof Void))ret.add(new SingleConstraint(else_block.getType(),this.getType())); } - ret.add(new SingleConstraint(expr.getType(),new RefType("boolean",0))); //(expressionDesIfStmt)<.boolean + ret.add(new SingleConstraint(expr.getType(),assumptions.getTypeFor(new RefType("Boolean",0)))); //(expressionDesIfStmt)<.boolean if(!(then_block.getType() instanceof Void))ret.add(new SingleConstraint(then_block.getType(),this.getType())); if(then_block.getType() instanceof Void && (else_block == null || else_block.getType() instanceof Void))this.setType(new Void(this.getOffset())); diff --git a/src/mycompiler/mystatement/WhileStmt.java b/src/mycompiler/mystatement/WhileStmt.java index ff9989ee..aa382447 100755 --- a/src/mycompiler/mystatement/WhileStmt.java +++ b/src/mycompiler/mystatement/WhileStmt.java @@ -182,7 +182,7 @@ public class WhileStmt extends Statement public ConstraintsSet TYPEStmt(TypeAssumptions assumptions) { ConstraintsSet ret = new ConstraintsSet(); ret.add(expr.TYPEExpr(assumptions)); - SingleConstraint exprMustBeBool = new SingleConstraint(expr.getType(), new RefType("boolean", 0)); // while(expr){}; expr <. boolean + SingleConstraint exprMustBeBool = new SingleConstraint(expr.getType(), assumptions.getTypeFor(new RefType("Boolean", 0))); // while(expr){}; expr <. boolean ret.add(exprMustBeBool); ret.add(this.loop_block.TYPEStmt(assumptions)); this.setType(loop_block.getType()); diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest19.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest19.jav new file mode 100644 index 00000000..32bf4fce --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest19.jav @@ -0,0 +1,14 @@ + +class TestIfStmt { + +methode(){ + var; + if(true){ + var=this; + }else{ + var=this; + } + return 1; +} + +} \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest19.java b/test/plugindevelopment/TypeInsertTests/LambdaTest19.java new file mode 100644 index 00000000..f6c4a5e8 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest19.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class LambdaTest19 { + private static final String TEST_FILE = "LambdaTest19.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + mustContain.add("TestIfStmt var"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest20.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest20.jav new file mode 100644 index 00000000..79053b87 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest20.jav @@ -0,0 +1,11 @@ + +class WhileTest{ + + var; + public method(){ + while(true){ + var = "String"; + } + } + +} diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest20.java b/test/plugindevelopment/TypeInsertTests/LambdaTest20.java new file mode 100644 index 00000000..1cae420a --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest20.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class LambdaTest20 { + private static final String TEST_FILE = "LambdaTest21.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + //mustContain.add("TestIfStmt var"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest21.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest21.jav new file mode 100644 index 00000000..f510f0be --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest21.jav @@ -0,0 +1,9 @@ + +class Test{ + +void methode(){ + var; + var.toString(); +} + +} diff --git a/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java b/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java index 2c897b04..ca337c4b 100644 --- a/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java +++ b/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java @@ -65,8 +65,8 @@ public class MultipleTypesInsertTester extends TypeInsertTester{ System.out.println("Setze " + tip + " ein:"); inferedSource = point.insertType(tip, TypeInsertTester.getFileContent(rootDirectory + sourceFileToInfere)); System.out.println(inferedSource); + gesamterSrc += inferedSource; } - gesamterSrc += inferedSource; } } } catch (IOException | yyException e) { From 7ff5b6d9db7cbb920598d4db0ed7dcea9bc008ad Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 7 Aug 2014 16:09:07 +0200 Subject: [PATCH 10/31] makeBasicAssumptions fixed --- src/mycompiler/SourceFile.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mycompiler/SourceFile.java b/src/mycompiler/SourceFile.java index 6a873269..7e38a8b5 100755 --- a/src/mycompiler/SourceFile.java +++ b/src/mycompiler/SourceFile.java @@ -1186,7 +1186,7 @@ public class SourceFile for(int j=0;j Date: Thu, 7 Aug 2014 17:13:55 +0200 Subject: [PATCH 11/31] Wildcards werden nun auch geparst --- bin/mycompiler/myparser/JavaParser.jay | 13 +- src/mycompiler/SourceFile.java | 1 - src/mycompiler/myparser/JavaParser.java | 2504 ++++++++++++----------- src/mycompiler/myparser/JavaParser.jay | 13 +- src/mycompiler/mytype/ParaList.java | 17 +- 5 files changed, 1290 insertions(+), 1258 deletions(-) diff --git a/bin/mycompiler/myparser/JavaParser.jay b/bin/mycompiler/myparser/JavaParser.jay index 120563f0..851e8e65 100755 --- a/bin/mycompiler/myparser/JavaParser.jay +++ b/bin/mycompiler/myparser/JavaParser.jay @@ -810,11 +810,22 @@ typelist : type $1.add($3); $$=$1; } + | typelist ',' wildcardparameter + { + $1.add($3); + $$=$1; + } + | wildcardparameter + { + Vector tl = new Vector(); + tl.add($1); + $$ = tl; + } /* PL 05-07-28 erg�nzt, weil jeder classorinterfacetype auch parametrisiert sein kann */ //TODO: Das hier ist möglicherweise falsch. Ein Typ hat keine parameterliste, nur eine Liste von RefTypes parameter : { $$ = null; } - | '<'typelist'>'//'<'paralist'>'//typelist statt + | '<' typelist '>' //'<'paralist'>'//typelist statt { $$ = $2; } diff --git a/src/mycompiler/SourceFile.java b/src/mycompiler/SourceFile.java index 7e38a8b5..2697eb23 100755 --- a/src/mycompiler/SourceFile.java +++ b/src/mycompiler/SourceFile.java @@ -1094,7 +1094,6 @@ public class SourceFile mod.addModifier(new Public()); //Für Object: - //TODO: toString()-Methode gerät nicht in die BasicAssumptions imports.add(new UsedId("java.lang.Object",-1)); // Für jede einzelne Klasse diff --git a/src/mycompiler/myparser/JavaParser.java b/src/mycompiler/myparser/JavaParser.java index 4a72fd29..de680870 100644 --- a/src/mycompiler/myparser/JavaParser.java +++ b/src/mycompiler/myparser/JavaParser.java @@ -345,6 +345,8 @@ public Vector testPair = new Vector(); //t "classorinterfacetype : name parameter", //t "typelist : type", //t "typelist : typelist ',' type", +//t "typelist : typelist ',' wildcardparameter", +//t "typelist : wildcardparameter", //t "parameter :", //t "parameter : '<' typelist '>'", //t "interfacememberdeclaration : constantdeclaration", @@ -1351,42 +1353,57 @@ case 73: } break; case 74: - // line 816 "./../src/mycompiler/myparser/JavaParser.jay" - { yyVal = null; } + // line 814 "./../src/mycompiler/myparser/JavaParser.jay" + { + ((Vector)yyVals[-2+yyTop]).add(((WildcardType)yyVals[0+yyTop])); + yyVal=((Vector)yyVals[-2+yyTop]); + } break; case 75: - // line 818 "./../src/mycompiler/myparser/JavaParser.jay" + // line 819 "./../src/mycompiler/myparser/JavaParser.jay" + { + Vector tl = new Vector(); + tl.add(((WildcardType)yyVals[0+yyTop])); + yyVal = tl; + } + break; +case 76: + // line 827 "./../src/mycompiler/myparser/JavaParser.jay" + { yyVal = null; } + break; +case 77: + // line 829 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = ((Vector)yyVals[-1+yyTop]); } break; -case 76: - // line 823 "./../src/mycompiler/myparser/JavaParser.jay" +case 78: + // line 834 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Interfaces, Spezialform Konstantendef.*/ yyVal = ((Constant)yyVals[0+yyTop]); } break; -case 77: - // line 828 "./../src/mycompiler/myparser/JavaParser.jay" +case 79: + // line 839 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = ((Method)yyVals[0+yyTop]); } break; -case 78: - // line 833 "./../src/mycompiler/myparser/JavaParser.jay" +case 80: + // line 844 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Field)yyVals[0+yyTop]); } break; -case 79: - // line 837 "./../src/mycompiler/myparser/JavaParser.jay" +case 81: + // line 848 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Method)yyVals[0+yyTop]); } break; -case 80: - // line 842 "./../src/mycompiler/myparser/JavaParser.jay" +case 82: + // line 853 "./../src/mycompiler/myparser/JavaParser.jay" { Method STAT = new Method(((Token)yyVals[-1+yyTop]).getOffset()); DeclId DST = new DeclId(); @@ -1400,23 +1417,23 @@ case 80: yyVal=STAT; } break; -case 81: - // line 856 "./../src/mycompiler/myparser/JavaParser.jay" +case 83: + // line 867 "./../src/mycompiler/myparser/JavaParser.jay" { ((Constructor)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); yyVal = ((Constructor)yyVals[-1+yyTop]); } break; -case 82: - // line 861 "./../src/mycompiler/myparser/JavaParser.jay" +case 84: + // line 872 "./../src/mycompiler/myparser/JavaParser.jay" { ((Constructor)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); ((Constructor)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); yyVal = ((Constructor)yyVals[-1+yyTop]); } break; -case 83: - // line 868 "./../src/mycompiler/myparser/JavaParser.jay" +case 85: + // line 879 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Interface*/ Constant c = new Constant(((Token)yyVals[-3+yyTop]).getLexem(), ((Modifiers)yyVals[-5+yyTop])); @@ -1425,15 +1442,15 @@ case 83: yyVal = c; } break; -case 84: - // line 877 "./../src/mycompiler/myparser/JavaParser.jay" +case 86: + // line 888 "./../src/mycompiler/myparser/JavaParser.jay" { /* SCJU: Interface*/ yyVal = ((Method)yyVals[-1+yyTop]); } break; -case 85: - // line 902 "./../src/mycompiler/myparser/JavaParser.jay" +case 87: + // line 913 "./../src/mycompiler/myparser/JavaParser.jay" { FieldDeclaration ret = new FieldDeclaration(((DeclId)yyVals[-2+yyTop]).getOffset()); ret.set_DeclId(((DeclId)yyVals[-2+yyTop])); @@ -1441,58 +1458,58 @@ case 85: yyVal=ret; } break; -case 86: - // line 909 "./../src/mycompiler/myparser/JavaParser.jay" +case 88: + // line 920 "./../src/mycompiler/myparser/JavaParser.jay" { FieldDeclaration ret = new FieldDeclaration(((DeclId)yyVals[0+yyTop]).getOffset()); ret.set_DeclId(((DeclId)yyVals[0+yyTop])); yyVal=ret; } break; -case 87: - // line 916 "./../src/mycompiler/myparser/JavaParser.jay" +case 89: + // line 927 "./../src/mycompiler/myparser/JavaParser.jay" { GenericDeclarationList ret = new GenericDeclarationList(((GenericVarDeclarationList)yyVals[-1+yyTop]).getElements(),((GenericVarDeclarationList)yyVals[-1+yyTop]).getEndOffset()); yyVal = ret; } break; -case 88: - // line 923 "./../src/mycompiler/myparser/JavaParser.jay" +case 90: + // line 934 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; -case 89: - // line 927 "./../src/mycompiler/myparser/JavaParser.jay" +case 91: + // line 938 "./../src/mycompiler/myparser/JavaParser.jay" { ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; -case 90: - // line 932 "./../src/mycompiler/myparser/JavaParser.jay" +case 92: + // line 943 "./../src/mycompiler/myparser/JavaParser.jay" {/*angefügt von Andreas Stadelmeier*/ ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); ((FieldDeclaration)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; -case 91: - // line 939 "./../src/mycompiler/myparser/JavaParser.jay" +case 93: + // line 950 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; -case 92: - // line 944 "./../src/mycompiler/myparser/JavaParser.jay" +case 94: + // line 955 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + ((Type)yyVals[-2+yyTop])); ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); yyVal = ((FieldDeclaration)yyVals[-1+yyTop]); } break; -case 93: - // line 951 "./../src/mycompiler/myparser/JavaParser.jay" +case 95: + // line 962 "./../src/mycompiler/myparser/JavaParser.jay" { ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); for(int i=0;i<(((FieldDeclaration)yyVals[-1+yyTop]).getDeclIdVector().size());i++) @@ -1502,28 +1519,28 @@ case 93: yyVal = ((FieldDeclaration)yyVals[-1+yyTop]); } break; -case 94: - // line 961 "./../src/mycompiler/myparser/JavaParser.jay" +case 96: + // line 972 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); yyVal=((Method)yyVals[-1+yyTop]); } break; -case 95: - // line 968 "./../src/mycompiler/myparser/JavaParser.jay" +case 97: + // line 979 "./../src/mycompiler/myparser/JavaParser.jay" { Block Bl = new Block(); yyVal=Bl; } break; -case 96: - // line 974 "./../src/mycompiler/myparser/JavaParser.jay" +case 98: + // line 985 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Block)yyVals[-1+yyTop]); } break; -case 97: - // line 979 "./../src/mycompiler/myparser/JavaParser.jay" +case 99: + // line 990 "./../src/mycompiler/myparser/JavaParser.jay" { Constructor CON = new Constructor(null); /*TODO: Der Parser kann sowieso nicht zwischen einem Konstruktor und einer Methode unterscheiden. Das hier kann wegfallen...*/ DeclId DIDCon = new DeclId(); @@ -1532,8 +1549,8 @@ case 97: yyVal=CON; } break; -case 98: - // line 987 "./../src/mycompiler/myparser/JavaParser.jay" +case 100: + // line 998 "./../src/mycompiler/myparser/JavaParser.jay" { Constructor CONpara = new Constructor(null); DeclId DIconpara = new DeclId(); @@ -1543,29 +1560,29 @@ case 98: yyVal=CONpara; } break; -case 99: - // line 997 "./../src/mycompiler/myparser/JavaParser.jay" +case 101: + // line 1008 "./../src/mycompiler/myparser/JavaParser.jay" { Block CBL = new Block(); yyVal=CBL; } break; -case 100: - // line 1002 "./../src/mycompiler/myparser/JavaParser.jay" +case 102: + // line 1013 "./../src/mycompiler/myparser/JavaParser.jay" { Block CBLexpl = new Block(); CBLexpl.set_Statement(((Statement)yyVals[-1+yyTop])); yyVal=CBLexpl; } break; -case 101: - // line 1008 "./../src/mycompiler/myparser/JavaParser.jay" +case 103: + // line 1019 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Block)yyVals[-1+yyTop]); } break; -case 102: - // line 1012 "./../src/mycompiler/myparser/JavaParser.jay" +case 104: + // line 1023 "./../src/mycompiler/myparser/JavaParser.jay" { Block CBes = new Block(); CBes.set_Statement(((Statement)yyVals[-2+yyTop])); @@ -1576,51 +1593,51 @@ case 102: yyVal=CBes; } break; -case 103: - // line 1023 "./../src/mycompiler/myparser/JavaParser.jay" +case 105: + // line 1034 "./../src/mycompiler/myparser/JavaParser.jay" { ExceptionList EL = new ExceptionList(); EL.set_addElem(((RefType)yyVals[0+yyTop])); yyVal=EL; } break; -case 104: - // line 1030 "./../src/mycompiler/myparser/JavaParser.jay" +case 106: + // line 1041 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal = ((GenericTypeVar)yyVals[0+yyTop]); } break; -case 105: - // line 1035 "./../src/mycompiler/myparser/JavaParser.jay" +case 107: + // line 1046 "./../src/mycompiler/myparser/JavaParser.jay" { ParaList p = new ParaList(); p.add_ParaList(((GenericTypeVar)yyVals[0+yyTop])); yyVal=p; } break; -case 106: - // line 1041 "./../src/mycompiler/myparser/JavaParser.jay" +case 108: + // line 1052 "./../src/mycompiler/myparser/JavaParser.jay" { ((ParaList)yyVals[-2+yyTop]).add_ParaList(((GenericTypeVar)yyVals[0+yyTop])); yyVal=((ParaList)yyVals[-2+yyTop]); } break; -case 107: - // line 1048 "./../src/mycompiler/myparser/JavaParser.jay" +case 109: + // line 1059 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(),((Token)yyVals[0+yyTop]).getOffset()); } break; -case 108: - // line 1052 "./../src/mycompiler/myparser/JavaParser.jay" +case 110: + // line 1063 "./../src/mycompiler/myparser/JavaParser.jay" { BoundedGenericTypeVar gtv=new BoundedGenericTypeVar(((Token)yyVals[-2+yyTop]).getLexem(), ((BoundedClassIdentifierList)yyVals[0+yyTop]), ((Token)yyVals[-2+yyTop]).getOffset() ,((BoundedClassIdentifierList)yyVals[0+yyTop]).getEndOffset()); /*gtv.setBounds($3);*/ yyVal=gtv; } break; -case 109: - // line 1059 "./../src/mycompiler/myparser/JavaParser.jay" +case 111: + // line 1070 "./../src/mycompiler/myparser/JavaParser.jay" { Vector vec=new Vector(); vec.addElement(((RefType)yyVals[0+yyTop])); @@ -1628,8 +1645,8 @@ case 109: yyVal=new BoundedClassIdentifierList(vec, ((RefType)yyVals[0+yyTop]).getOffset()+((RefType)yyVals[0+yyTop]).getName().length()); } break; -case 110: - // line 1066 "./../src/mycompiler/myparser/JavaParser.jay" +case 112: + // line 1077 "./../src/mycompiler/myparser/JavaParser.jay" { ((BoundedClassIdentifierList)yyVals[-2+yyTop]).addElement(((RefType)yyVals[0+yyTop])); ((BoundedClassIdentifierList)yyVals[-2+yyTop]).addOffsetOff(((RefType)yyVals[0+yyTop])); @@ -1637,46 +1654,46 @@ case 110: yyVal=((BoundedClassIdentifierList)yyVals[-2+yyTop]); } break; -case 111: - // line 1074 "./../src/mycompiler/myparser/JavaParser.jay" +case 113: + // line 1085 "./../src/mycompiler/myparser/JavaParser.jay" { GenericVarDeclarationList vec=new GenericVarDeclarationList(); vec.addElement(((GenericTypeVar)yyVals[0+yyTop])); yyVal=vec; } break; -case 112: - // line 1080 "./../src/mycompiler/myparser/JavaParser.jay" +case 114: + // line 1091 "./../src/mycompiler/myparser/JavaParser.jay" { ((GenericVarDeclarationList)yyVals[-2+yyTop]).addElement(((GenericTypeVar)yyVals[0+yyTop])); yyVal=((GenericVarDeclarationList)yyVals[-2+yyTop]); } break; -case 113: - // line 1088 "./../src/mycompiler/myparser/JavaParser.jay" +case 115: + // line 1099 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-2+yyTop])); yyVal=((Method)yyVals[0+yyTop]); } break; -case 114: - // line 1094 "./../src/mycompiler/myparser/JavaParser.jay" +case 116: + // line 1105 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); yyVal=((Method)yyVals[0+yyTop]); } break; -case 115: - // line 1099 "./../src/mycompiler/myparser/JavaParser.jay" +case 117: + // line 1110 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); yyVal=((Method)yyVals[0+yyTop]); } break; -case 116: - // line 1105 "./../src/mycompiler/myparser/JavaParser.jay" +case 118: + // line 1116 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-2+yyTop])); @@ -1684,36 +1701,17 @@ case 116: yyVal=((Method)yyVals[0+yyTop]); } break; -case 117: - // line 1112 "./../src/mycompiler/myparser/JavaParser.jay" - { - ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); - ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); - yyVal=((Method)yyVals[-1+yyTop]); - } - break; -case 118: - // line 1118 "./../src/mycompiler/myparser/JavaParser.jay" - { - ((Method)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); - ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); - ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); - yyVal=((Method)yyVals[-1+yyTop]); - } - break; case 119: - // line 1125 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1123 "./../src/mycompiler/myparser/JavaParser.jay" { - ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); yyVal=((Method)yyVals[-1+yyTop]); } break; case 120: - // line 1132 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1129 "./../src/mycompiler/myparser/JavaParser.jay" { - ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-4+yyTop])); ((Method)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); @@ -1721,15 +1719,34 @@ case 120: } break; case 121: - // line 1140 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1136 "./../src/mycompiler/myparser/JavaParser.jay" + { + ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); + ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); + ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); + yyVal=((Method)yyVals[-1+yyTop]); + } + break; +case 122: + // line 1143 "./../src/mycompiler/myparser/JavaParser.jay" + { + ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-4+yyTop])); + ((Method)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); + ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); + ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); + yyVal=((Method)yyVals[-1+yyTop]); + } + break; +case 123: + // line 1151 "./../src/mycompiler/myparser/JavaParser.jay" { Void Voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).setType(Voit); yyVal=((Method)yyVals[0+yyTop]); } break; -case 122: - // line 1146 "./../src/mycompiler/myparser/JavaParser.jay" +case 124: + // line 1157 "./../src/mycompiler/myparser/JavaParser.jay" { Void voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); @@ -1737,8 +1754,8 @@ case 122: yyVal=((Method)yyVals[0+yyTop]); } break; -case 123: - // line 1153 "./../src/mycompiler/myparser/JavaParser.jay" +case 125: + // line 1164 "./../src/mycompiler/myparser/JavaParser.jay" { Void voyt = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).setType(voyt); @@ -1746,8 +1763,8 @@ case 123: yyVal=((Method)yyVals[-1+yyTop]); } break; -case 124: - // line 1160 "./../src/mycompiler/myparser/JavaParser.jay" +case 126: + // line 1171 "./../src/mycompiler/myparser/JavaParser.jay" { Void voyd = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); @@ -1756,8 +1773,8 @@ case 124: yyVal=((Method)yyVals[-1+yyTop]); } break; -case 125: - // line 1168 "./../src/mycompiler/myparser/JavaParser.jay" +case 127: + // line 1179 "./../src/mycompiler/myparser/JavaParser.jay" { Void Voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).setType(Voit); @@ -1765,8 +1782,8 @@ case 125: yyVal=((Method)yyVals[0+yyTop]); } break; -case 126: - // line 1175 "./../src/mycompiler/myparser/JavaParser.jay" +case 128: + // line 1186 "./../src/mycompiler/myparser/JavaParser.jay" { Void voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); @@ -1775,8 +1792,8 @@ case 126: yyVal=((Method)yyVals[0+yyTop]); } break; -case 127: - // line 1183 "./../src/mycompiler/myparser/JavaParser.jay" +case 129: + // line 1194 "./../src/mycompiler/myparser/JavaParser.jay" { Void voyt = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).setType(voyt); @@ -1785,8 +1802,8 @@ case 127: yyVal=((Method)yyVals[-1+yyTop]); } break; -case 128: - // line 1191 "./../src/mycompiler/myparser/JavaParser.jay" +case 130: + // line 1202 "./../src/mycompiler/myparser/JavaParser.jay" { Void voyd = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-4+yyTop])); @@ -1796,39 +1813,39 @@ case 128: yyVal=((Method)yyVals[-1+yyTop]); } break; -case 129: - // line 1201 "./../src/mycompiler/myparser/JavaParser.jay" +case 131: + // line 1212 "./../src/mycompiler/myparser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $1.setType(TypePlaceholder.fresh()); */ yyVal=((Method)yyVals[0+yyTop]); } break; -case 130: - // line 1206 "./../src/mycompiler/myparser/JavaParser.jay" +case 132: + // line 1217 "./../src/mycompiler/myparser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $4.setType(TypePlaceholder.fresh());*/ ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-1+yyTop])); yyVal=((Method)yyVals[0+yyTop]); } break; -case 131: - // line 1213 "./../src/mycompiler/myparser/JavaParser.jay" +case 133: + // line 1224 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-1+yyTop])); /*auskommentiert von Andreas Stadelmeier (a10023) $2.setType(TypePlaceholder.fresh());*/ yyVal=((Method)yyVals[0+yyTop]); } break; -case 132: - // line 1219 "./../src/mycompiler/myparser/JavaParser.jay" +case 134: + // line 1230 "./../src/mycompiler/myparser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $1.setType(TypePlaceholder.fresh());*/ ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); yyVal=((Method)yyVals[-1+yyTop]); } break; -case 133: - // line 1225 "./../src/mycompiler/myparser/JavaParser.jay" +case 135: + // line 1236 "./../src/mycompiler/myparser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); /*auskommentiert von Andreas Stadelmeier (a10023) $2.setType(TypePlaceholder.fresh());*/ @@ -1836,32 +1853,32 @@ case 133: yyVal=((Method)yyVals[-1+yyTop]); } break; -case 134: - // line 1234 "./../src/mycompiler/myparser/JavaParser.jay" +case 136: + // line 1245 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; -case 135: - // line 1238 "./../src/mycompiler/myparser/JavaParser.jay" +case 137: + // line 1249 "./../src/mycompiler/myparser/JavaParser.jay" { ((BaseType)yyVals[-2+yyTop]).setArray(true); } break; -case 136: - // line 1242 "./../src/mycompiler/myparser/JavaParser.jay" +case 138: + // line 1253 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((RefType)yyVals[0+yyTop]); } break; -case 137: - // line 1246 "./../src/mycompiler/myparser/JavaParser.jay" +case 139: + // line 1257 "./../src/mycompiler/myparser/JavaParser.jay" { ((RefType)yyVals[-2+yyTop]).setArray(true); } break; -case 138: - // line 1250 "./../src/mycompiler/myparser/JavaParser.jay" +case 140: + // line 1261 "./../src/mycompiler/myparser/JavaParser.jay" { FieldDeclaration IVD = new FieldDeclaration(((DeclId)yyVals[0+yyTop]).getOffset()); IVD.getDeclIdVector().addElement( ((DeclId)yyVals[0+yyTop]) ); @@ -1869,66 +1886,66 @@ case 138: yyVal = IVD; } break; -case 139: - // line 1257 "./../src/mycompiler/myparser/JavaParser.jay" +case 141: + // line 1268 "./../src/mycompiler/myparser/JavaParser.jay" { ((FieldDeclaration)yyVals[-2+yyTop]).getDeclIdVector().addElement(((DeclId)yyVals[0+yyTop])); yyVal=((FieldDeclaration)yyVals[-2+yyTop]); } break; -case 140: - // line 1263 "./../src/mycompiler/myparser/JavaParser.jay" +case 142: + // line 1274 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; -case 141: - // line 1268 "./../src/mycompiler/myparser/JavaParser.jay" +case 143: + // line 1279 "./../src/mycompiler/myparser/JavaParser.jay" { Block Blstat = new Block(); Blstat.set_Statement(((Statement)yyVals[0+yyTop])); yyVal=Blstat; } break; -case 142: - // line 1275 "./../src/mycompiler/myparser/JavaParser.jay" +case 144: + // line 1286 "./../src/mycompiler/myparser/JavaParser.jay" { ((Block)yyVals[-1+yyTop]).set_Statement(((Statement)yyVals[0+yyTop])); yyVal=((Block)yyVals[-1+yyTop]); } break; -case 143: - // line 1281 "./../src/mycompiler/myparser/JavaParser.jay" +case 145: + // line 1292 "./../src/mycompiler/myparser/JavaParser.jay" { ParameterList PL = new ParameterList(); PL.set_AddParameter(((FormalParameter)yyVals[0+yyTop])); yyVal = PL; } break; -case 144: - // line 1287 "./../src/mycompiler/myparser/JavaParser.jay" +case 146: + // line 1298 "./../src/mycompiler/myparser/JavaParser.jay" { ((ParameterList)yyVals[-2+yyTop]).set_AddParameter(((FormalParameter)yyVals[0+yyTop])); yyVal = ((ParameterList)yyVals[-2+yyTop]); } break; -case 145: - // line 1293 "./../src/mycompiler/myparser/JavaParser.jay" +case 147: + // line 1304 "./../src/mycompiler/myparser/JavaParser.jay" { This THCON = new This(((Token)yyVals[-3+yyTop]).getOffset(),((Token)yyVals[-3+yyTop]).getLexem().length()); yyVal=THCON; } break; -case 146: - // line 1298 "./../src/mycompiler/myparser/JavaParser.jay" +case 148: + // line 1309 "./../src/mycompiler/myparser/JavaParser.jay" { This THCONargl = new This(((Token)yyVals[-4+yyTop]).getOffset(),((Token)yyVals[-4+yyTop]).getLexem().length()); THCONargl.set_ArgumentList(((ArgumentList)yyVals[-2+yyTop])); yyVal=THCONargl; } break; -case 147: - // line 1307 "./../src/mycompiler/myparser/JavaParser.jay" +case 149: + // line 1318 "./../src/mycompiler/myparser/JavaParser.jay" { RefType RT = new RefType(-1); RT.set_UsedId(((UsedId)yyVals[0+yyTop])); @@ -1936,16 +1953,16 @@ case 147: yyVal=RT; } break; -case 148: - // line 1314 "./../src/mycompiler/myparser/JavaParser.jay" +case 150: + // line 1325 "./../src/mycompiler/myparser/JavaParser.jay" { ((RefType)yyVals[-2+yyTop]).set_UsedId(((UsedId)yyVals[0+yyTop])); ((RefType)yyVals[-2+yyTop]).setName(((RefType)yyVals[-2+yyTop]).get_UsedId().get_Name_1Element()); yyVal=((RefType)yyVals[-2+yyTop]); } break; -case 149: - // line 1321 "./../src/mycompiler/myparser/JavaParser.jay" +case 151: + // line 1332 "./../src/mycompiler/myparser/JavaParser.jay" { Method met = new Method(((Token)yyVals[-2+yyTop]).getOffset()); /* #JB# 10.04.2005 */ @@ -1959,8 +1976,8 @@ case 149: yyVal = met; } break; -case 150: - // line 1334 "./../src/mycompiler/myparser/JavaParser.jay" +case 152: + // line 1345 "./../src/mycompiler/myparser/JavaParser.jay" { Method met_para = new Method(((Token)yyVals[-3+yyTop]).getOffset()); /* #JB# 10.04.2005 */ @@ -1975,8 +1992,8 @@ case 150: yyVal = met_para; } break; -case 151: - // line 1349 "./../src/mycompiler/myparser/JavaParser.jay" +case 153: + // line 1360 "./../src/mycompiler/myparser/JavaParser.jay" { BooleanType BT = new BooleanType(); /* #JB# 05.04.2005 */ @@ -1986,14 +2003,14 @@ case 151: yyVal=BT; } break; -case 152: - // line 1358 "./../src/mycompiler/myparser/JavaParser.jay" +case 154: + // line 1369 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; -case 153: - // line 1363 "./../src/mycompiler/myparser/JavaParser.jay" +case 155: + // line 1374 "./../src/mycompiler/myparser/JavaParser.jay" { if (((Vector)yyVals[0+yyTop]) != null) { /*$1.set_ParaList($2.get_ParaList());*/ @@ -2015,8 +2032,8 @@ case 153: yyVal=RT; } break; -case 154: - // line 1385 "./../src/mycompiler/myparser/JavaParser.jay" +case 156: + // line 1396 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->referenctype: " + ((UsedId)yyVals[0+yyTop])); RefType RT = new RefType(((UsedId)yyVals[0+yyTop]).getOffset()); @@ -2035,26 +2052,26 @@ case 154: yyVal=RT; } break; -case 155: - // line 1407 "./../src/mycompiler/myparser/JavaParser.jay" +case 157: + // line 1418 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((DeclId)yyVals[0+yyTop]); } break; -case 156: - // line 1428 "./../src/mycompiler/myparser/JavaParser.jay" +case 158: + // line 1439 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((LocalVarDecl)yyVals[0+yyTop]); } break; -case 157: - // line 1432 "./../src/mycompiler/myparser/JavaParser.jay" +case 159: + // line 1443 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; -case 158: - // line 1437 "./../src/mycompiler/myparser/JavaParser.jay" +case 160: + // line 1448 "./../src/mycompiler/myparser/JavaParser.jay" { FormalParameter FP = new FormalParameter(((DeclId)yyVals[0+yyTop])); FP.setType(((Type)yyVals[-1+yyTop])); @@ -2062,8 +2079,8 @@ case 158: yyVal=FP; } break; -case 159: - // line 1462 "./../src/mycompiler/myparser/JavaParser.jay" +case 161: + // line 1473 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + ((DeclId)yyVals[0+yyTop]).name); @@ -2082,29 +2099,29 @@ case 159: yyVal=FP; } break; -case 160: - // line 1481 "./../src/mycompiler/myparser/JavaParser.jay" +case 162: + // line 1492 "./../src/mycompiler/myparser/JavaParser.jay" { ArgumentList AL = new ArgumentList(); AL.expr.addElement(((Expr)yyVals[0+yyTop])); yyVal=AL; } break; -case 161: - // line 1487 "./../src/mycompiler/myparser/JavaParser.jay" +case 163: + // line 1498 "./../src/mycompiler/myparser/JavaParser.jay" { ((ArgumentList)yyVals[-2+yyTop]).expr.addElement(((Expr)yyVals[0+yyTop])); yyVal=((ArgumentList)yyVals[-2+yyTop]); } break; -case 162: - // line 1493 "./../src/mycompiler/myparser/JavaParser.jay" +case 164: + // line 1504 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; -case 163: - // line 1498 "./../src/mycompiler/myparser/JavaParser.jay" +case 165: + // line 1509 "./../src/mycompiler/myparser/JavaParser.jay" { DeclId DI = new DeclId(); /* #JB# 10.04.2005 */ @@ -2116,62 +2133,62 @@ case 163: yyVal=DI; } break; -case 164: - // line 1510 "./../src/mycompiler/myparser/JavaParser.jay" +case 166: + // line 1521 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 165: - // line 1515 "./../src/mycompiler/myparser/JavaParser.jay" +case 167: + // line 1526 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((LocalVarDecl)yyVals[-1+yyTop]); } break; -case 166: - // line 1520 "./../src/mycompiler/myparser/JavaParser.jay" +case 168: + // line 1531 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; -case 167: - // line 1524 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((IfStmt)yyVals[0+yyTop]); - } - break; -case 168: - // line 1528 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((IfStmt)yyVals[0+yyTop]); - } - break; case 169: - // line 1532 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1535 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((IfStmt)yyVals[0+yyTop]); + } + break; +case 170: + // line 1539 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((IfStmt)yyVals[0+yyTop]); + } + break; +case 171: + // line 1543 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((WhileStmt)yyVals[0+yyTop]); } break; -case 170: - // line 1536 "./../src/mycompiler/myparser/JavaParser.jay" +case 172: + // line 1547 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((ForStmt)yyVals[0+yyTop]); } break; -case 171: - // line 1541 "./../src/mycompiler/myparser/JavaParser.jay" +case 173: + // line 1552 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 172: - // line 1545 "./../src/mycompiler/myparser/JavaParser.jay" +case 174: + // line 1556 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((NewClass)yyVals[0+yyTop]); } break; -case 173: - // line 1550 "./../src/mycompiler/myparser/JavaParser.jay" +case 175: + // line 1561 "./../src/mycompiler/myparser/JavaParser.jay" { IntegerType IT = new IntegerType(); /* #JB# 05.04.2005 */ @@ -2181,8 +2198,8 @@ case 173: yyVal=IT; } break; -case 174: - // line 1559 "./../src/mycompiler/myparser/JavaParser.jay" +case 176: + // line 1570 "./../src/mycompiler/myparser/JavaParser.jay" { CharacterType CT = new CharacterType(); /* #JB# 05.04.2005 */ @@ -2192,8 +2209,8 @@ case 174: yyVal=CT; } break; -case 175: - // line 1569 "./../src/mycompiler/myparser/JavaParser.jay" +case 177: + // line 1580 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); LocalVarDecl LVD = new LocalVarDecl(((Type)yyVals[-1+yyTop]).getOffset(),((Type)yyVals[-1+yyTop]).getVariableLength()); @@ -2202,8 +2219,8 @@ case 175: yyVal = LVD; } break; -case 176: - // line 1580 "./../src/mycompiler/myparser/JavaParser.jay" +case 178: + // line 1591 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); LocalVarDecl LVD = new LocalVarDecl(((FieldDeclaration)yyVals[0+yyTop]).getOffset(),((FieldDeclaration)yyVals[0+yyTop]).getVariableLength()); @@ -2212,32 +2229,32 @@ case 176: yyVal = LVD; } break; -case 177: - // line 1590 "./../src/mycompiler/myparser/JavaParser.jay" +case 179: + // line 1601 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; -case 178: - // line 1594 "./../src/mycompiler/myparser/JavaParser.jay" +case 180: + // line 1605 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((EmptyStmt)yyVals[0+yyTop]); } break; -case 179: - // line 1598 "./../src/mycompiler/myparser/JavaParser.jay" +case 181: + // line 1609 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((ExprStmt)yyVals[0+yyTop]); } break; -case 180: - // line 1602 "./../src/mycompiler/myparser/JavaParser.jay" +case 182: + // line 1613 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Return)yyVals[0+yyTop]); } break; -case 181: - // line 1607 "./../src/mycompiler/myparser/JavaParser.jay" +case 183: + // line 1618 "./../src/mycompiler/myparser/JavaParser.jay" { IfStmt Ifst = new IfStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Ifst.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2245,8 +2262,8 @@ case 181: yyVal=Ifst; } break; -case 182: - // line 1615 "./../src/mycompiler/myparser/JavaParser.jay" +case 184: + // line 1626 "./../src/mycompiler/myparser/JavaParser.jay" { IfStmt IfstElst = new IfStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); IfstElst.set_Expr(((Expr)yyVals[-4+yyTop])); @@ -2255,8 +2272,8 @@ case 182: yyVal=IfstElst; } break; -case 183: - // line 1624 "./../src/mycompiler/myparser/JavaParser.jay" +case 185: + // line 1635 "./../src/mycompiler/myparser/JavaParser.jay" { WhileStmt Whlst = new WhileStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Whlst.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2264,8 +2281,8 @@ case 183: yyVal=Whlst; } break; -case 184: - // line 1635 "./../src/mycompiler/myparser/JavaParser.jay" +case 186: + // line 1646 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-6+yyTop]).getOffset(),((Expr)yyVals[-6+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-6+yyTop])); @@ -2277,8 +2294,8 @@ case 184: yyVal = Fst; } break; -case 185: - // line 1647 "./../src/mycompiler/myparser/JavaParser.jay" +case 187: + // line 1658 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-5+yyTop])); @@ -2289,8 +2306,8 @@ case 185: yyVal = Fst; } break; -case 186: - // line 1658 "./../src/mycompiler/myparser/JavaParser.jay" +case 188: + // line 1669 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-5+yyTop])); @@ -2301,8 +2318,8 @@ case 186: yyVal = Fst; } break; -case 187: - // line 1669 "./../src/mycompiler/myparser/JavaParser.jay" +case 189: + // line 1680 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); Fst.set_head_Condition(((Expr)yyVals[-4+yyTop])); @@ -2313,8 +2330,8 @@ case 187: yyVal = Fst; } break; -case 188: - // line 1680 "./../src/mycompiler/myparser/JavaParser.jay" +case 190: + // line 1691 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-4+yyTop])); @@ -2324,8 +2341,8 @@ case 188: yyVal = Fst; } break; -case 189: - // line 1690 "./../src/mycompiler/myparser/JavaParser.jay" +case 191: + // line 1701 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-3+yyTop]).getOffset(),((Expr)yyVals[-3+yyTop]).getVariableLength()); Fst.set_head_Condition(((Expr)yyVals[-3+yyTop])); @@ -2335,8 +2352,8 @@ case 189: yyVal = Fst; } break; -case 190: - // line 1700 "./../src/mycompiler/myparser/JavaParser.jay" +case 192: + // line 1711 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Fst.set_head_Loop_expr(((Expr)yyVals[-2+yyTop])); @@ -2346,8 +2363,8 @@ case 190: yyVal = Fst; } break; -case 191: - // line 1710 "./../src/mycompiler/myparser/JavaParser.jay" +case 193: + // line 1721 "./../src/mycompiler/myparser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Statement)yyVals[0+yyTop]).getOffset(),((Statement)yyVals[0+yyTop]).getVariableLength()); Fst.set_body_Loop_block(((Statement)yyVals[0+yyTop])); @@ -2356,73 +2373,73 @@ case 191: yyVal = Fst; } break; -case 192: - // line 1719 "./../src/mycompiler/myparser/JavaParser.jay" +case 194: + // line 1730 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("conditionalexpression"); yyVal=((Expr)yyVals[0+yyTop]); } break; -case 193: - // line 1724 "./../src/mycompiler/myparser/JavaParser.jay" +case 195: + // line 1735 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Assign)yyVals[0+yyTop]); } break; -case 194: - // line 1730 "./../src/mycompiler/myparser/JavaParser.jay" - { - EmptyStmt Empst = new EmptyStmt(); - yyVal=Empst; - } - break; -case 195: - // line 1736 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[-1+yyTop]); - } - break; case 196: // line 1741 "./../src/mycompiler/myparser/JavaParser.jay" + { + EmptyStmt Empst = new EmptyStmt(); + yyVal=Empst; + } + break; +case 197: + // line 1747 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[-1+yyTop]); + } + break; +case 198: + // line 1752 "./../src/mycompiler/myparser/JavaParser.jay" { Return ret = new Return(-1,-1); yyVal= ret; } break; -case 197: - // line 1746 "./../src/mycompiler/myparser/JavaParser.jay" +case 199: + // line 1757 "./../src/mycompiler/myparser/JavaParser.jay" { Return retexp = new Return(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); retexp.set_ReturnExpr(((Expr)yyVals[-1+yyTop])); yyVal=retexp; } break; -case 198: - // line 1753 "./../src/mycompiler/myparser/JavaParser.jay" +case 200: + // line 1764 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; -case 199: - // line 1757 "./../src/mycompiler/myparser/JavaParser.jay" +case 201: + // line 1768 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; -case 200: - // line 1761 "./../src/mycompiler/myparser/JavaParser.jay" +case 202: + // line 1772 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((WhileStmt)yyVals[0+yyTop]); } break; -case 201: - // line 1766 "./../src/mycompiler/myparser/JavaParser.jay" +case 203: + // line 1777 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 202: - // line 1772 "./../src/mycompiler/myparser/JavaParser.jay" +case 204: + // line 1783 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n"); Assign Ass = new Assign(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2448,8 +2465,8 @@ case 202: yyVal=Ass; } break; -case 203: - // line 1797 "./../src/mycompiler/myparser/JavaParser.jay" +case 205: + // line 1808 "./../src/mycompiler/myparser/JavaParser.jay" { Assign Ass =new Assign(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); LocalOrFieldVar LOFV = new LocalOrFieldVar(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2472,44 +2489,44 @@ case 203: yyVal=Ass; } break; -case 204: - // line 1820 "./../src/mycompiler/myparser/JavaParser.jay" +case 206: + // line 1831 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Assign)yyVals[0+yyTop]); } break; -case 205: - // line 1824 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 206: - // line 1828 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; case 207: - // line 1832 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1835 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 208: - // line 1836 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1839 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 209: - // line 1840 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1843 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 210: + // line 1847 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 211: + // line 1851 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((MethodCall)yyVals[0+yyTop]); } break; -case 210: - // line 1851 "./../src/mycompiler/myparser/JavaParser.jay" +case 212: + // line 1862 "./../src/mycompiler/myparser/JavaParser.jay" { IfStmt IfElno = new IfStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); IfElno.set_Expr(((Expr)yyVals[-4+yyTop])); @@ -2518,8 +2535,8 @@ case 210: yyVal=IfElno; } break; -case 211: - // line 1860 "./../src/mycompiler/myparser/JavaParser.jay" +case 213: + // line 1871 "./../src/mycompiler/myparser/JavaParser.jay" { WhileStmt Whstno = new WhileStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Whstno.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2527,14 +2544,14 @@ case 211: yyVal=Whstno; } break; -case 212: - // line 1868 "./../src/mycompiler/myparser/JavaParser.jay" +case 214: + // line 1879 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 213: - // line 1872 "./../src/mycompiler/myparser/JavaParser.jay" +case 215: + // line 1883 "./../src/mycompiler/myparser/JavaParser.jay" { Binary LogOr = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); OrOp OrO = new OrOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2545,20 +2562,20 @@ case 213: yyVal=LogOr; } break; -case 214: - // line 1885 "./../src/mycompiler/myparser/JavaParser.jay" +case 216: + // line 1896 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=null; } break; -case 215: - // line 1890 "./../src/mycompiler/myparser/JavaParser.jay" +case 217: + // line 1901 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; -case 216: - // line 1894 "./../src/mycompiler/myparser/JavaParser.jay" +case 218: + // line 1905 "./../src/mycompiler/myparser/JavaParser.jay" { /*Lambdabody kann auch nur aus einer Expression bestehen. In diesem Fall wird ein Block erstellt, welcher als einziges Statement ein return statment mit der expression hat.*/ /*Bsp.: Aus der Expression |var=="hallo"| wird: |{return var=="hallo";}|*/ @@ -2568,20 +2585,20 @@ case 216: yyVal=ret; } break; -case 217: - // line 1904 "./../src/mycompiler/myparser/JavaParser.jay" +case 219: + // line 1915 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=null; } break; -case 218: - // line 1908 "./../src/mycompiler/myparser/JavaParser.jay" +case 220: + // line 1919 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((ParameterList)yyVals[-1+yyTop]); } break; -case 219: - // line 1913 "./../src/mycompiler/myparser/JavaParser.jay" +case 221: + // line 1924 "./../src/mycompiler/myparser/JavaParser.jay" { LambdaExpression lambda = new LambdaExpression(/*((ParameSterList)$2).getOffset(),((ParameterList)$2).getVariableLength()*/0,0); if(((ParameterList)yyVals[-2+yyTop])!=null)lambda.setParameterList(((ParameterList)yyVals[-2+yyTop])); @@ -2589,87 +2606,87 @@ case 219: yyVal=lambda; } break; -case 220: - // line 1932 "./../src/mycompiler/myparser/JavaParser.jay" +case 222: + // line 1943 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((UsedId)yyVals[0+yyTop]); } break; -case 221: - // line 1937 "./../src/mycompiler/myparser/JavaParser.jay" +case 223: + // line 1948 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=null; } break; -case 222: - // line 1941 "./../src/mycompiler/myparser/JavaParser.jay" +case 224: + // line 1952 "./../src/mycompiler/myparser/JavaParser.jay" { TimesOp TEO = new TimesOp(-1,-1); yyVal=TEO; } break; -case 223: - // line 1946 "./../src/mycompiler/myparser/JavaParser.jay" +case 225: + // line 1957 "./../src/mycompiler/myparser/JavaParser.jay" { DivideOp DEO = new DivideOp(-1,-1); yyVal=DEO; } break; -case 224: - // line 1951 "./../src/mycompiler/myparser/JavaParser.jay" +case 226: + // line 1962 "./../src/mycompiler/myparser/JavaParser.jay" { ModuloOp MEO = new ModuloOp(-1,-1); yyVal=MEO; } break; -case 225: - // line 1956 "./../src/mycompiler/myparser/JavaParser.jay" +case 227: + // line 1967 "./../src/mycompiler/myparser/JavaParser.jay" { PlusOp PEO = new PlusOp(-1,-1); yyVal=PEO; } break; -case 226: - // line 1961 "./../src/mycompiler/myparser/JavaParser.jay" +case 228: + // line 1972 "./../src/mycompiler/myparser/JavaParser.jay" { MinusOp MEO = new MinusOp(-1,-1); yyVal=MEO; } break; -case 227: - // line 1973 "./../src/mycompiler/myparser/JavaParser.jay" +case 229: + // line 1984 "./../src/mycompiler/myparser/JavaParser.jay" { PreIncExpr PRINC = new PreIncExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); PRINC.set_Expr(((Expr)yyVals[0+yyTop])); yyVal=PRINC; } break; -case 228: - // line 1980 "./../src/mycompiler/myparser/JavaParser.jay" +case 230: + // line 1991 "./../src/mycompiler/myparser/JavaParser.jay" { PreDecExpr PRDEC = new PreDecExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); PRDEC.set_Expr(((Expr)yyVals[0+yyTop])); yyVal=PRDEC; } break; -case 229: - // line 1987 "./../src/mycompiler/myparser/JavaParser.jay" +case 231: + // line 1998 "./../src/mycompiler/myparser/JavaParser.jay" { PostIncExpr PIE = new PostIncExpr(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); PIE.set_Expr(((Expr)yyVals[-1+yyTop])); yyVal=PIE; } break; -case 230: - // line 1994 "./../src/mycompiler/myparser/JavaParser.jay" +case 232: + // line 2005 "./../src/mycompiler/myparser/JavaParser.jay" { PostDecExpr PDE = new PostDecExpr(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); PDE.set_Expr(((Expr)yyVals[-1+yyTop])); yyVal=PDE; } break; -case 231: - // line 2002 "./../src/mycompiler/myparser/JavaParser.jay" +case 233: + // line 2013 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M1"); MethodCall MC = new MethodCall(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2700,8 +2717,8 @@ case 231: yyVal=MC; } break; -case 232: - // line 2032 "./../src/mycompiler/myparser/JavaParser.jay" +case 234: + // line 2043 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M2"); MethodCall MCarg = new MethodCall(((UsedId)yyVals[-3+yyTop]).getOffset(),((UsedId)yyVals[-3+yyTop]).getVariableLength()); @@ -2733,8 +2750,8 @@ case 232: yyVal=MCarg; } break; -case 233: - // line 2063 "./../src/mycompiler/myparser/JavaParser.jay" +case 235: + // line 2074 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M3"); MethodCall MCpr = new MethodCall(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); @@ -2754,8 +2771,8 @@ case 233: yyVal=MCpr; } break; -case 234: - // line 2082 "./../src/mycompiler/myparser/JavaParser.jay" +case 236: + // line 2093 "./../src/mycompiler/myparser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M4"); MethodCall MCPA = new MethodCall(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); @@ -2776,8 +2793,8 @@ case 234: yyVal=MCPA; } break; -case 235: - // line 2105 "./../src/mycompiler/myparser/JavaParser.jay" +case 237: + // line 2116 "./../src/mycompiler/myparser/JavaParser.jay" { NewClass NC = new NewClass(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); NC.set_UsedId(((UsedId)yyVals[-2+yyTop])); @@ -2786,8 +2803,8 @@ case 235: yyVal=NC; } break; -case 236: - // line 2113 "./../src/mycompiler/myparser/JavaParser.jay" +case 238: + // line 2124 "./../src/mycompiler/myparser/JavaParser.jay" { NewClass NCarg = new NewClass(((UsedId)yyVals[-3+yyTop]).getOffset(),((UsedId)yyVals[-3+yyTop]).getVariableLength()); NCarg.set_UsedId(((UsedId)yyVals[-3+yyTop])); @@ -2797,14 +2814,14 @@ case 236: yyVal=NCarg; } break; -case 237: - // line 2123 "./../src/mycompiler/myparser/JavaParser.jay" +case 239: + // line 2134 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 238: - // line 2127 "./../src/mycompiler/myparser/JavaParser.jay" +case 240: + // line 2138 "./../src/mycompiler/myparser/JavaParser.jay" { Binary And = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); AndOp AndO = new AndOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2815,20 +2832,20 @@ case 238: yyVal=And; } break; -case 239: - // line 2143 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 240: - // line 2147 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; case 241: - // line 2151 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2154 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 242: + // line 2158 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 243: + // line 2162 "./../src/mycompiler/myparser/JavaParser.jay" { PositivExpr POSEX=new PositivExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryPlus UP= new UnaryPlus(); @@ -2837,8 +2854,8 @@ case 241: yyVal=POSEX; } break; -case 242: - // line 2159 "./../src/mycompiler/myparser/JavaParser.jay" +case 244: + // line 2170 "./../src/mycompiler/myparser/JavaParser.jay" { NegativeExpr NEGEX=new NegativeExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryMinus UM=new UnaryMinus(); @@ -2847,20 +2864,20 @@ case 242: yyVal=NEGEX; } break; -case 243: - // line 2167 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 244: - // line 2172 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; case 245: - // line 2176 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2178 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 246: + // line 2183 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 247: + // line 2187 "./../src/mycompiler/myparser/JavaParser.jay" { if (((UsedId)yyVals[0+yyTop]).get_Name().size() > 1) { @@ -2879,38 +2896,38 @@ case 245: } } break; -case 246: - // line 2194 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 247: - // line 2198 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; case 248: - // line 2203 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2205 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 249: - // line 2208 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2209 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 250: + // line 2214 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 251: - // line 2214 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2219 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 253: + // line 2225 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Literal)yyVals[0+yyTop]); } break; -case 252: - // line 2218 "./../src/mycompiler/myparser/JavaParser.jay" +case 254: + // line 2229 "./../src/mycompiler/myparser/JavaParser.jay" { This T = new This(((Token)yyVals[0+yyTop]).getOffset(),((Token)yyVals[0+yyTop]).getLexem().length()); UsedId UT = new UsedId(((Token)yyVals[0+yyTop]).getOffset()); @@ -2919,24 +2936,24 @@ case 252: yyVal=T; } break; -case 253: - // line 2239 "./../src/mycompiler/myparser/JavaParser.jay" +case 255: + // line 2250 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((MethodCall)yyVals[0+yyTop]); } break; -case 254: - // line 2243 "./../src/mycompiler/myparser/JavaParser.jay" +case 256: + // line 2254 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 255: - // line 2248 "./../src/mycompiler/myparser/JavaParser.jay" +case 257: + // line 2259 "./../src/mycompiler/myparser/JavaParser.jay" {yyVal=((Expr)yyVals[0+yyTop]);} break; -case 256: - // line 2250 "./../src/mycompiler/myparser/JavaParser.jay" +case 258: + // line 2261 "./../src/mycompiler/myparser/JavaParser.jay" {NotExpr NE=new NotExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryNot UN=new UnaryNot(); NE.set_UnaryNot(UN); @@ -2944,75 +2961,75 @@ case 256: yyVal=NE; } break; -case 257: - // line 2256 "./../src/mycompiler/myparser/JavaParser.jay" +case 259: + // line 2267 "./../src/mycompiler/myparser/JavaParser.jay" {yyVal=((CastExpr)yyVals[0+yyTop]);} break; -case 258: - // line 2258 "./../src/mycompiler/myparser/JavaParser.jay" +case 260: + // line 2269 "./../src/mycompiler/myparser/JavaParser.jay" {yyVal=((Expr)yyVals[0+yyTop]);} break; -case 260: - // line 2263 "./../src/mycompiler/myparser/JavaParser.jay" +case 262: + // line 2274 "./../src/mycompiler/myparser/JavaParser.jay" {IntLiteral IL = new IntLiteral(); IL.set_Int(((Token)yyVals[0+yyTop]).String2Int()); yyVal = IL; } break; -case 261: - // line 2268 "./../src/mycompiler/myparser/JavaParser.jay" +case 263: + // line 2279 "./../src/mycompiler/myparser/JavaParser.jay" {BoolLiteral BL = new BoolLiteral(); BL.set_Bool(((Token)yyVals[0+yyTop]).String2Bool()); yyVal = BL; } break; -case 262: - // line 2272 "./../src/mycompiler/myparser/JavaParser.jay" +case 264: + // line 2283 "./../src/mycompiler/myparser/JavaParser.jay" {CharLiteral CL = new CharLiteral(); CL.set_Char(((Token)yyVals[0+yyTop]).CharInString()); yyVal=CL; } break; -case 263: - // line 2277 "./../src/mycompiler/myparser/JavaParser.jay" +case 265: + // line 2288 "./../src/mycompiler/myparser/JavaParser.jay" { StringLiteral ST = new StringLiteral(); ST.set_String(((Token)yyVals[0+yyTop]).get_String()); yyVal=ST; } break; -case 264: - // line 2282 "./../src/mycompiler/myparser/JavaParser.jay" +case 266: + // line 2293 "./../src/mycompiler/myparser/JavaParser.jay" { LongLiteral LL = new LongLiteral(); LL.set_Long(((Token)yyVals[0+yyTop]).String2Long()); yyVal = LL; } break; -case 265: - // line 2286 "./../src/mycompiler/myparser/JavaParser.jay" +case 267: + // line 2297 "./../src/mycompiler/myparser/JavaParser.jay" { FloatLiteral FL = new FloatLiteral(); FL.set_Float(((Token)yyVals[0+yyTop]).String2Float()); yyVal = FL; } break; -case 266: - // line 2291 "./../src/mycompiler/myparser/JavaParser.jay" +case 268: + // line 2302 "./../src/mycompiler/myparser/JavaParser.jay" { DoubleLiteral DL = new DoubleLiteral(); DL.set_Double(((Token)yyVals[0+yyTop]).String2Double()); yyVal = DL; } break; -case 267: - // line 2297 "./../src/mycompiler/myparser/JavaParser.jay" +case 269: + // line 2308 "./../src/mycompiler/myparser/JavaParser.jay" { Null NN = new Null(); yyVal=NN; } break; -case 268: - // line 2303 "./../src/mycompiler/myparser/JavaParser.jay" +case 270: + // line 2314 "./../src/mycompiler/myparser/JavaParser.jay" { CastExpr CaEx=new CastExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); CaEx.set_Type(((BaseType)yyVals[-2+yyTop])); @@ -3020,25 +3037,25 @@ case 268: yyVal=CaEx; } break; -case 269: - // line 2312 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 270: - // line 2316 "./../src/mycompiler/myparser/JavaParser.jay" - { - } - break; case 271: - // line 2320 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2323 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 272: - // line 2324 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2327 "./../src/mycompiler/myparser/JavaParser.jay" + { + } + break; +case 273: + // line 2331 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 274: + // line 2335 "./../src/mycompiler/myparser/JavaParser.jay" { Binary EQ = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); EqualOp EO = new EqualOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3049,8 +3066,8 @@ case 272: yyVal=EQ; } break; -case 273: - // line 2334 "./../src/mycompiler/myparser/JavaParser.jay" +case 275: + // line 2345 "./../src/mycompiler/myparser/JavaParser.jay" { Binary NEQ = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); NotEqualOp NEO = new NotEqualOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3061,14 +3078,14 @@ case 273: yyVal=NEQ; } break; -case 274: - // line 2345 "./../src/mycompiler/myparser/JavaParser.jay" +case 276: + // line 2356 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 275: - // line 2349 "./../src/mycompiler/myparser/JavaParser.jay" +case 277: + // line 2360 "./../src/mycompiler/myparser/JavaParser.jay" { Binary LO = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); LessOp LOO = new LessOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3079,8 +3096,8 @@ case 275: yyVal=LO; } break; -case 276: - // line 2359 "./../src/mycompiler/myparser/JavaParser.jay" +case 278: + // line 2370 "./../src/mycompiler/myparser/JavaParser.jay" { Binary GO = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); GreaterOp GOO = new GreaterOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3091,8 +3108,8 @@ case 276: yyVal=GO; } break; -case 277: - // line 2369 "./../src/mycompiler/myparser/JavaParser.jay" +case 279: + // line 2380 "./../src/mycompiler/myparser/JavaParser.jay" { Binary LE = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); LessEquOp LEO = new LessEquOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3103,8 +3120,8 @@ case 277: yyVal=LE; } break; -case 278: - // line 2379 "./../src/mycompiler/myparser/JavaParser.jay" +case 280: + // line 2390 "./../src/mycompiler/myparser/JavaParser.jay" { Binary GE = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); GreaterEquOp GEO = new GreaterEquOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3115,8 +3132,8 @@ case 278: yyVal=GE; } break; -case 279: - // line 2389 "./../src/mycompiler/myparser/JavaParser.jay" +case 281: + // line 2400 "./../src/mycompiler/myparser/JavaParser.jay" { InstanceOf ISO=new InstanceOf(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); ISO.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -3124,20 +3141,20 @@ case 279: yyVal=ISO; } break; -case 280: - // line 2397 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 281: - // line 2402 "./../src/mycompiler/myparser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; case 282: - // line 2406 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2408 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 283: + // line 2413 "./../src/mycompiler/myparser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; +case 284: + // line 2417 "./../src/mycompiler/myparser/JavaParser.jay" { Binary AD = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); PlusOp PO = new PlusOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3148,8 +3165,8 @@ case 282: yyVal=AD; } break; -case 283: - // line 2416 "./../src/mycompiler/myparser/JavaParser.jay" +case 285: + // line 2427 "./../src/mycompiler/myparser/JavaParser.jay" { Binary MI = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); MinusOp MO = new MinusOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3160,14 +3177,14 @@ case 283: yyVal=MI; } break; -case 284: - // line 2427 "./../src/mycompiler/myparser/JavaParser.jay" +case 286: + // line 2438 "./../src/mycompiler/myparser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 285: - // line 2431 "./../src/mycompiler/myparser/JavaParser.jay" +case 287: + // line 2442 "./../src/mycompiler/myparser/JavaParser.jay" { Binary ML = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); TimesOp TO = new TimesOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3178,8 +3195,8 @@ case 285: yyVal=ML; } break; -case 286: - // line 2441 "./../src/mycompiler/myparser/JavaParser.jay" +case 288: + // line 2452 "./../src/mycompiler/myparser/JavaParser.jay" { Binary DV = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); DivideOp DO = new DivideOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3190,8 +3207,8 @@ case 286: yyVal = DV; } break; -case 287: - // line 2451 "./../src/mycompiler/myparser/JavaParser.jay" +case 289: + // line 2462 "./../src/mycompiler/myparser/JavaParser.jay" { Binary MD = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); ModuloOp MO = new ModuloOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3202,7 +3219,7 @@ case 287: yyVal =MD; } break; - // line 3206 "-" + // line 3223 "-" } yyTop -= yyLen[yyN]; yyState = yyStates[yyTop]; @@ -3240,28 +3257,28 @@ case 287: 113, 116, 116, 116, 7, 7, 41, 41, 29, 33, 33, 3, 3, 34, 34, 16, 16, 42, 42, 42, 42, 42, 42, 30, 4, 4, 32, 17, 17, 17, - 31, 114, 114, 115, 115, 5, 5, 18, 18, 111, - 107, 107, 10, 6, 20, 20, 11, 12, 12, 12, - 12, 12, 12, 14, 43, 43, 108, 108, 109, 109, - 109, 109, 49, 95, 98, 98, 94, 94, 96, 96, - 97, 97, 13, 13, 13, 13, 13, 13, 13, 13, + 31, 114, 114, 114, 114, 115, 115, 5, 5, 18, + 18, 111, 107, 107, 10, 6, 20, 20, 11, 12, + 12, 12, 12, 12, 12, 14, 43, 43, 108, 108, + 109, 109, 109, 109, 49, 95, 98, 98, 94, 94, + 96, 96, 97, 97, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 40, 40, 40, 40, 19, 19, 44, - 45, 45, 51, 51, 110, 110, 39, 39, 15, 15, - 37, 37, 117, 38, 21, 81, 81, 50, 50, 104, - 104, 36, 22, 79, 47, 82, 82, 82, 82, 82, - 72, 72, 35, 35, 48, 48, 80, 80, 80, 80, - 87, 88, 84, 85, 85, 85, 85, 85, 85, 85, - 85, 70, 70, 90, 78, 91, 91, 83, 83, 83, - 69, 100, 100, 73, 73, 73, 73, 73, 73, 89, - 86, 68, 68, 102, 46, 46, 52, 52, 71, 103, - 101, 101, 101, 101, 101, 101, 74, 75, 76, 77, - 105, 105, 105, 105, 92, 92, 67, 67, 58, 58, - 58, 58, 58, 56, 56, 56, 56, 55, 66, 66, - 54, 54, 54, 54, 57, 57, 57, 65, 65, 53, - 53, 53, 53, 53, 53, 53, 53, 112, 64, 64, - 63, 63, 63, 62, 62, 62, 62, 62, 62, 61, - 60, 60, 60, 59, 59, 59, 59, + 13, 13, 13, 13, 13, 40, 40, 40, 40, 19, + 19, 44, 45, 45, 51, 51, 110, 110, 39, 39, + 15, 15, 37, 37, 117, 38, 21, 81, 81, 50, + 50, 104, 104, 36, 22, 79, 47, 82, 82, 82, + 82, 82, 72, 72, 35, 35, 48, 48, 80, 80, + 80, 80, 87, 88, 84, 85, 85, 85, 85, 85, + 85, 85, 85, 70, 70, 90, 78, 91, 91, 83, + 83, 83, 69, 100, 100, 73, 73, 73, 73, 73, + 73, 89, 86, 68, 68, 102, 46, 46, 52, 52, + 71, 103, 101, 101, 101, 101, 101, 101, 74, 75, + 76, 77, 105, 105, 105, 105, 92, 92, 67, 67, + 58, 58, 58, 58, 58, 56, 56, 56, 56, 55, + 66, 66, 54, 54, 54, 54, 57, 57, 57, 65, + 65, 53, 53, 53, 53, 53, 53, 53, 53, 112, + 64, 64, 63, 63, 63, 62, 62, 62, 62, 62, + 62, 61, 60, 60, 60, 59, 59, 59, 59, }; protected static final short yyLen [] = { 2, 1, 2, 3, 2, 3, 3, 1, 2, 3, 1, @@ -3271,818 +3288,811 @@ case 287: 3, 1, 3, 3, 2, 3, 1, 2, 2, 2, 3, 2, 3, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, - 2, 1, 3, 0, 3, 1, 1, 1, 1, 2, - 2, 3, 6, 2, 3, 1, 3, 2, 3, 4, - 2, 3, 4, 2, 2, 3, 3, 4, 2, 3, - 3, 4, 2, 1, 1, 3, 1, 3, 1, 3, - 1, 3, 3, 2, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, - 2, 2, 3, 1, 3, 1, 3, 1, 3, 1, - 1, 2, 1, 3, 4, 5, 1, 3, 3, 4, - 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, - 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, - 5, 7, 5, 9, 8, 8, 8, 7, 7, 7, - 6, 1, 1, 1, 2, 2, 3, 1, 1, 1, - 1, 3, 3, 1, 1, 1, 1, 1, 1, 7, - 5, 1, 3, 1, 1, 1, 2, 3, 3, 1, - 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, - 3, 4, 5, 6, 4, 5, 1, 3, 1, 1, - 2, 2, 1, 1, 1, 1, 1, 1, 1, 3, - 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, - 1, 1, 1, 1, 1, 1, 1, 4, 1, 3, - 1, 3, 3, 1, 3, 3, 3, 3, 3, 1, - 1, 3, 3, 1, 3, 3, 3, + 2, 1, 3, 3, 1, 0, 3, 1, 1, 1, + 1, 2, 2, 3, 6, 2, 3, 1, 3, 2, + 3, 4, 2, 3, 4, 2, 2, 3, 3, 4, + 2, 3, 3, 4, 2, 1, 1, 3, 1, 3, + 1, 3, 1, 3, 3, 2, 3, 4, 3, 4, + 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, + 1, 2, 2, 2, 3, 1, 3, 1, 3, 1, + 3, 1, 1, 2, 1, 3, 4, 5, 1, 3, + 3, 4, 1, 1, 2, 1, 1, 1, 1, 2, + 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, + 1, 1, 5, 7, 5, 9, 8, 8, 8, 7, + 7, 7, 6, 1, 1, 1, 2, 2, 3, 1, + 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, + 1, 7, 5, 1, 3, 1, 1, 1, 2, 3, + 3, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 3, 4, 5, 6, 4, 5, 1, 3, + 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, + 3, 1, 1, 1, 1, 1, 1, 1, 1, 4, + 1, 3, 1, 3, 3, 1, 3, 3, 3, 3, + 3, 1, 1, 3, 3, 1, 3, 3, 3, }; protected static final short yyDefRed [] = { 0, - 62, 151, 174, 0, 63, 173, 60, 59, 58, 0, + 62, 153, 176, 0, 63, 175, 60, 59, 58, 0, 0, 0, 61, 19, 0, 14, 15, 13, 12, 7, - 0, 0, 154, 162, 152, 0, 0, 0, 0, 47, + 0, 0, 156, 164, 154, 0, 0, 0, 0, 47, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 71, 0, 0, 0, 0, 0, 48, 11, 0, 0, 0, 0, 0, 0, 20, 0, 0, 6, 9, 0, 0, 0, 0, 32, 0, 16, - 72, 0, 135, 137, 5, 0, 0, 0, 0, 104, - 105, 0, 49, 64, 67, 50, 0, 0, 0, 0, - 45, 0, 78, 0, 79, 0, 0, 56, 68, 0, - 0, 0, 155, 0, 0, 0, 70, 0, 69, 22, - 0, 0, 24, 0, 18, 0, 54, 0, 52, 0, - 65, 77, 76, 0, 0, 0, 0, 0, 34, 0, - 75, 21, 0, 0, 33, 0, 0, 0, 31, 0, - 80, 0, 0, 0, 111, 0, 0, 130, 0, 140, - 94, 0, 132, 46, 57, 0, 91, 88, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 81, 26, 51, 29, 53, 66, 0, 84, 0, 55, - 73, 23, 0, 25, 35, 109, 0, 106, 0, 0, - 0, 252, 0, 260, 264, 266, 265, 261, 267, 262, - 263, 0, 0, 0, 194, 95, 0, 0, 138, 0, - 0, 177, 0, 156, 0, 0, 251, 248, 0, 0, - 254, 0, 205, 206, 0, 0, 179, 166, 141, 157, - 169, 170, 167, 168, 178, 180, 204, 0, 0, 123, - 149, 159, 0, 143, 0, 0, 87, 0, 0, 0, - 0, 147, 0, 163, 139, 0, 0, 0, 0, 0, - 0, 0, 243, 284, 0, 0, 274, 0, 0, 0, - 0, 0, 0, 0, 192, 171, 85, 239, 240, 246, - 247, 172, 193, 253, 257, 97, 0, 117, 92, 89, - 0, 0, 0, 133, 0, 0, 82, 0, 99, 0, - 0, 0, 27, 0, 0, 0, 196, 0, 0, 0, - 227, 228, 217, 0, 0, 0, 96, 142, 165, 214, - 0, 0, 229, 230, 195, 225, 226, 222, 223, 224, - 221, 0, 158, 0, 150, 112, 127, 118, 90, 0, - 0, 0, 241, 242, 256, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 98, 124, 0, 0, 119, 93, 0, 101, - 100, 0, 0, 110, 0, 0, 0, 197, 0, 218, - 231, 160, 0, 215, 219, 216, 0, 202, 203, 144, - 148, 0, 0, 285, 286, 287, 0, 0, 279, 277, - 278, 275, 276, 0, 0, 0, 0, 0, 0, 0, - 128, 120, 0, 0, 102, 0, 0, 0, 0, 0, - 0, 0, 232, 0, 235, 0, 268, 145, 0, 83, - 0, 0, 0, 0, 0, 0, 0, 0, 181, 0, - 200, 199, 183, 161, 233, 0, 236, 146, 191, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 234, 190, - 189, 0, 188, 0, 0, 0, 0, 0, 182, 187, - 186, 185, 0, 0, 0, 184, 0, 211, 0, 210, + 0, 72, 0, 75, 137, 139, 5, 0, 0, 0, + 0, 106, 107, 0, 49, 64, 67, 50, 0, 0, + 0, 0, 45, 0, 80, 0, 81, 0, 0, 56, + 68, 0, 0, 0, 157, 0, 0, 0, 70, 0, + 69, 22, 0, 0, 24, 0, 18, 0, 54, 0, + 52, 0, 65, 79, 78, 0, 0, 0, 0, 0, + 34, 0, 0, 0, 77, 21, 0, 0, 33, 0, + 0, 0, 31, 0, 82, 0, 0, 0, 113, 0, + 0, 132, 0, 142, 96, 0, 134, 46, 57, 0, + 93, 90, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 83, 26, 51, 29, 53, 66, + 0, 86, 0, 55, 43, 44, 73, 74, 23, 0, + 25, 35, 111, 0, 108, 0, 0, 0, 254, 0, + 262, 266, 268, 267, 263, 269, 264, 265, 0, 0, + 0, 196, 97, 0, 0, 140, 0, 0, 179, 0, + 158, 0, 0, 253, 250, 0, 0, 256, 0, 207, + 208, 0, 0, 181, 168, 143, 159, 171, 172, 169, + 170, 180, 182, 206, 0, 0, 125, 151, 161, 0, + 145, 0, 0, 89, 0, 0, 0, 0, 149, 0, + 165, 141, 0, 0, 0, 0, 0, 0, 0, 245, + 286, 0, 0, 276, 0, 0, 0, 0, 0, 0, + 0, 194, 173, 87, 241, 242, 248, 249, 174, 195, + 255, 259, 99, 0, 119, 94, 91, 0, 0, 0, + 135, 0, 0, 84, 0, 101, 0, 0, 0, 27, + 0, 0, 0, 198, 0, 0, 0, 229, 230, 219, + 0, 0, 0, 98, 144, 167, 216, 0, 0, 231, + 232, 197, 227, 228, 224, 225, 226, 223, 0, 160, + 0, 152, 114, 129, 120, 92, 0, 0, 0, 243, + 244, 258, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, + 126, 0, 0, 121, 95, 0, 103, 102, 0, 0, + 112, 0, 0, 0, 199, 0, 220, 233, 162, 0, + 217, 221, 218, 0, 204, 205, 146, 150, 0, 0, + 287, 288, 289, 0, 0, 281, 279, 280, 277, 278, + 0, 0, 0, 0, 0, 0, 0, 130, 122, 0, + 0, 104, 0, 0, 0, 0, 0, 0, 0, 234, + 0, 237, 0, 270, 147, 0, 85, 0, 0, 0, + 0, 0, 0, 0, 0, 183, 0, 202, 201, 185, + 163, 235, 0, 238, 148, 193, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 236, 192, 191, 0, 190, + 0, 0, 0, 0, 0, 184, 189, 188, 187, 0, + 0, 0, 186, 0, 213, 0, 212, }; protected static final short yyDgoto [] = { 15, - 16, 17, 68, 120, 121, 122, 59, 35, 40, 123, - 92, 93, 94, 95, 96, 97, 98, 99, 208, 101, - 209, 103, 18, 19, 37, 20, 21, 261, 60, 83, - 23, 86, 61, 69, 24, 25, 26, 27, 253, 211, - 29, 30, 212, 151, 213, 385, 214, 215, 153, 244, - 314, 216, 217, 218, 219, 262, 263, 264, 265, 266, - 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, - 221, 382, 222, 278, 279, 280, 281, 227, 0, 228, - 229, 230, 440, 231, 232, 441, 233, 234, 442, 235, - 236, 282, 31, 80, 81, 187, 146, 82, 32, 283, - 332, 321, 238, 383, 284, 33, 107, 108, 171, 301, - 109, 285, 0, 72, 45, 0, 0, + 16, 17, 68, 122, 123, 124, 59, 35, 40, 125, + 94, 95, 96, 97, 98, 99, 100, 101, 215, 103, + 216, 105, 18, 19, 37, 20, 21, 268, 60, 85, + 23, 88, 61, 69, 24, 25, 26, 27, 260, 218, + 29, 30, 219, 155, 220, 392, 221, 222, 157, 251, + 321, 223, 224, 225, 226, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 228, 389, 229, 285, 286, 287, 288, 234, 0, 235, + 236, 237, 447, 238, 239, 448, 240, 241, 449, 242, + 243, 289, 31, 82, 83, 194, 150, 84, 32, 290, + 339, 328, 245, 390, 291, 33, 109, 110, 175, 308, + 111, 292, 0, 73, 45, 74, 0, }; - protected static final short yySindex [] = { 1718, - 0, 0, 0, -259, 0, 0, 0, 0, 0, -207, - -207, -185, 0, 0, 0, 0, 0, 0, 0, 0, - 483, 17, 0, 0, 0, 44, 125, 167, 403, 0, - 1748, 483, 0, 173, -114, 100, 132, 191, 194, -91, - 0, 1748, -54, 167, 0, 171, 202, 1718, -259, -185, - 0, 0, 483, 1748, -30, -207, -207, 2364, 0, -93, - -5, 0, 0, -14, -30, -207, 2404, 0, 9, 0, - 0, 75, 0, 0, 0, -114, -91, 1748, 52, 0, - 0, 138, 0, 0, 0, 0, 217, 69, 305, -30, - 0, 139, 0, 217, 0, 88, 2434, 0, 0, 106, - 378, 303, 0, 346, 151, 1652, 0, 334, 0, 0, - -5, -207, 0, 0, 0, 166, 0, 305, 0, 2462, - 0, 0, 0, 139, 406, 69, 1652, -207, 0, 167, - 0, 0, -93, -5, 0, 9, -207, -30, 0, 1964, - 0, 305, 88, -24, 0, 168, 69, 0, 151, 0, - 0, -207, 0, 0, 0, 161, 0, 0, 982, -19, - 305, 88, 177, 407, 69, 367, 88, 151, 334, 2020, - 0, 0, 0, 0, 0, 0, 69, 0, 172, 0, - 0, 0, -5, 0, 0, 0, 388, 0, 432, 439, - 522, 0, 440, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1010, 1010, 0, 0, 45, 438, 0, 155, - 161, 0, 2065, 0, 433, 181, 0, 0, 451, 97, - 0, 447, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -47, 0, 0, - 0, 0, 161, 0, 131, -30, 0, 88, 88, 453, - 303, 0, 469, 0, 0, -207, 45, 1010, 1010, 1010, - 156, 97, 0, 0, 262, 348, 0, 27, -206, 476, - 426, 397, 219, 218, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 271, 0, 0, 0, - 88, 69, 69, 0, 88, 280, 0, 487, 0, 2117, - 2161, 63, 0, -207, 563, 982, 0, 471, 982, 156, - 0, 0, 0, 285, 614, 438, 0, 0, 0, 0, - 658, 234, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 982, 0, 327, 0, 0, 0, 0, 0, -207, - 497, 13, 0, 0, 0, 1010, 1010, 1010, 1010, 1010, - -207, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, - 1010, 1010, 0, 0, 88, 88, 0, 0, 694, 0, - 0, 2209, 982, 0, 711, 479, 498, 0, 504, 0, - 0, 0, 370, 0, 0, 0, 501, 0, 0, 0, - 0, 739, 1010, 0, 0, 0, 262, 262, 0, 0, - 0, 0, 0, 27, 27, -206, 476, 426, 397, 219, - 0, 0, 488, 390, 0, 489, 767, 491, 794, 2249, - 2282, 982, 0, 855, 0, 398, 0, 0, 499, 0, - 2282, 515, 884, 901, 507, 523, 530, 0, 0, 304, - 0, 0, 0, 0, 0, 412, 0, 0, 0, 2282, - 2282, 531, 2282, 533, 930, 982, 982, 2282, 0, 0, - 0, 2282, 0, 2282, 2282, 534, 537, 538, 0, 0, - 0, 0, 2282, 2249, 2249, 0, 313, 0, 2249, 0, + protected static final short yySindex [] = { 2528, + 0, 0, 0, -247, 0, 0, 0, 0, 0, -216, + -216, -196, 0, 0, 0, 0, 0, 0, 0, 0, + 824, 20, 0, 0, 0, 41, 46, 188, 1436, 0, + 1530, 824, 0, 81, -89, 118, 130, 153, 171, -117, + 0, 1530, -68, -58, 0, 196, 217, 2528, -247, -196, + 0, 0, 824, 1530, -51, -216, -216, 1842, 0, -101, + 2, 0, 0, -40, -51, -216, 2299, 0, 30, 0, + -164, 0, 190, 0, 0, 0, 0, -89, -117, 1530, + 47, 0, 0, 327, 0, 0, 0, 0, 202, 36, + 311, -51, 0, 187, 0, 202, 0, 88, 2395, 0, + 0, 150, 324, 337, 0, 360, 101, 2463, 0, 281, + 0, 0, 2, -216, 0, 0, 0, 328, 0, 311, + 0, 2435, 0, 0, 0, 187, 366, 36, 2463, -216, + 0, -216, -216, -58, 0, 0, -101, 2, 0, 30, + -216, -51, 0, 1990, 0, 311, 88, -23, 0, 330, + 36, 0, 101, 0, 0, -216, 0, 0, 0, 111, + 0, 0, 860, -17, 311, 88, 277, 377, 36, 266, + 88, 101, 281, 2047, 0, 0, 0, 0, 0, 0, + 36, 0, 139, 0, 0, 0, 0, 0, 0, 2, + 0, 0, 0, 404, 0, 412, 425, 490, 0, 436, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 911, + 911, 0, 0, 19, 400, 0, 157, 111, 0, 2104, + 0, 433, 155, 0, 0, 452, -215, 0, 444, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -42, 0, 0, 0, 0, 111, + 0, 146, -51, 0, 88, 88, 448, 337, 0, 465, + 0, 0, -216, 19, 911, 911, 911, 184, -215, 0, + 0, 453, 237, 0, 112, -80, 489, 435, 413, 229, + 244, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 308, 0, 0, 0, 88, 36, 36, + 0, 88, 285, 0, 513, 0, 2149, 2210, 58, 0, + -216, 544, 860, 0, 504, 860, 184, 0, 0, 0, + 391, 398, 400, 0, 0, 0, 0, 624, 261, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 860, 0, + 264, 0, 0, 0, 0, 0, -216, 526, 10, 0, + 0, 0, 911, 911, 911, 911, 911, -216, 911, 911, + 911, 911, 911, 911, 911, 911, 911, 911, 911, 0, + 0, 88, 88, 0, 0, 473, 0, 0, 2254, 860, + 0, 571, 509, 529, 0, 532, 0, 0, 0, 428, + 0, 0, 0, 538, 0, 0, 0, 0, 641, 911, + 0, 0, 0, 453, 453, 0, 0, 0, 0, 0, + 112, 112, -80, 489, 435, 413, 229, 0, 0, 521, + 450, 0, 522, 668, 523, 699, 2310, 2350, 860, 0, + 716, 0, 503, 0, 0, 531, 0, 2350, 550, 760, + 777, 533, 561, 562, 0, 0, 338, 0, 0, 0, + 0, 0, 507, 0, 0, 0, 2350, 2350, 569, 2350, + 574, 816, 860, 860, 2350, 0, 0, 0, 2350, 0, + 2350, 2350, 579, 580, 586, 0, 0, 0, 0, 2350, + 2310, 2310, 0, 345, 0, 2310, 0, }; protected static final short yyRindex [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1067, 0, 0, 0, 859, 2336, 0, 0, 0, - 586, 0, 0, -108, 0, 0, 0, 0, -87, 0, - 0, 588, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 590, 0, 0, 0, 0, 0, 0, + 0, 1133, 0, 0, 0, 764, 864, 0, 0, 0, + 629, 0, 0, -76, 0, 0, 0, 0, -114, 0, + 0, 635, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 592, 178, 0, - 0, 0, 0, 0, 0, 0, 2492, 0, -9, 0, - 0, 0, 0, 0, 0, -13, 0, 0, 0, 0, - 0, 325, 0, -26, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 207, 0, 0, 0, 10, 0, 0, + 347, 0, 0, 0, 0, 0, 0, 0, 0, 645, + 349, 0, 0, 0, 0, 0, 0, 0, 2498, 0, + 17, 0, 0, 0, 0, 0, 0, 13, 0, 0, + 0, 0, 0, 291, 0, -18, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 351, 0, 0, 0, -16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -12, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 249, -11, 0, 0, 0, 0, 20, 0, 0, 0, + 0, 0, 0, 0, 185, 24, 0, 0, 0, 0, + 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 187, 0, 0, 0, + 0, 0, 0, 352, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 414, 0, + 0, 0, 0, 0, 587, 0, 1678, 0, 0, 0, + 0, 0, 0, 0, 0, 1188, 0, 0, 0, 0, + 0, -55, 5, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -39, 0, 0, 0, 0, + 0, 0, 0, 0, 57, 79, 0, 588, 0, 100, + 0, 0, 0, 0, 0, 0, 0, 581, 1895, 0, + 0, 1775, 1616, 0, -6, 1644, 1199, 1225, 1262, 1273, + 1299, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 104, 0, 0, + 0, 117, 0, 0, -46, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1236, 0, 0, 0, + 0, 0, 590, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -36, 0, 0, 0, 0, 0, 536, 0, 66, - 0, 0, 0, 0, 0, 0, 0, 0, 182, 0, - 0, 0, 0, 0, -57, 14, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -46, 0, - 0, 0, 0, 0, 0, 0, 0, 24, 25, 0, - 539, 0, 32, 0, 0, 0, 0, 0, 0, 0, - 576, 1926, 0, 0, 1813, 1643, 0, 1389, 1706, 1199, - 1318, 1344, 1355, 1415, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 33, 0, 0, 0, 47, 0, 0, -20, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1426, - 0, 0, 0, 0, 0, 540, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 354, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 292, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 55, 61, 0, 0, 0, 0, + 0, 126, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1833, 1860, 0, 0, - 0, 0, 0, 1740, 1794, 1766, 1452, 1489, 1515, 1541, + 0, 0, 0, 1832, 1852, 0, 0, 0, 0, 0, + 1715, 1738, 1704, 1327, 1550, 1421, 1578, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1915, 0, 0, + 0, 0, 0, 0, 1945, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }; - protected static final short yyGindex [] = { 552, - 0, 0, -3, 0, 482, 0, 443, 556, 557, 0, - 265, 0, 2, 0, 2580, 0, 512, 0, -17, -44, - 37, -117, 91, 0, 0, 19, 578, 1, 548, -133, - -50, 64, -16, 535, 0, 0, 358, -119, 0, 467, - 42, 46, -23, 0, -132, 0, 0, 0, 500, 282, - -63, 0, 0, 0, 0, -137, 0, 130, 72, 0, - 296, 87, 272, 273, 274, 270, 277, 0, 0, 310, - 0, 127, 0, -55, -4, 43, 78, 0, 0, -276, - -192, 2344, -75, 0, 0, 0, 0, 0, 0, 0, - 0, 312, 158, -59, 508, 0, 0, 580, 0, 232, - 0, 0, 0, 59, 268, 381, 0, 550, 492, 0, 0, 0, 0, 0, 0, 0, 0, }; - protected static final short yyTable [] = { 253, - 22, 207, 220, 19, 163, 84, 85, 163, 58, 19, - 36, 38, 209, 331, 30, 85, 241, 186, 252, 13, - 318, 286, 163, 19, 19, 252, 242, 115, 22, 58, - 145, 67, 220, 13, 163, 28, 19, 300, 112, 41, - 100, 34, 242, 111, 22, 129, 121, 114, 22, 163, - 19, 163, 128, 393, 19, 19, 22, 22, 22, 134, - 164, 85, 43, 141, 13, 129, 22, 22, 125, 19, - 150, 41, 208, 135, 51, 220, 44, 85, 131, 100, - 245, 19, 125, 113, 223, 313, 354, 163, 355, 242, - 103, 122, 22, 14, 102, 356, 287, 22, 357, 106, - 19, 84, 144, 46, 250, 115, 22, 318, 127, 129, - 121, 114, 22, 126, 223, 39, 183, 58, 130, 116, - 22, 125, 341, 373, 22, 333, 220, 22, 22, 117, - 22, 67, 185, 102, 46, 224, 131, 22, 106, 242, - 210, 102, 131, 438, 22, 43, 125, 113, 104, 156, - 296, 51, 22, 56, 103, 122, 74, 223, 62, 30, - 22, 127, 220, 220, 157, 224, 22, 57, 372, 115, - 210, 335, 51, 30, 334, 173, 66, 126, 42, 318, - 28, 138, 225, 116, 374, 251, 336, 104, 57, 54, - 63, 180, 255, 316, 315, 315, 104, 438, 438, 139, - 43, 43, 438, 310, 310, 84, 391, 22, 224, 138, - 78, 246, 225, 210, 44, 47, 242, 226, 244, 244, - 156, 107, 244, 244, 244, 244, 244, 174, 244, 247, - 108, 399, 55, 2, 220, 289, 64, 3, 2, 107, - 244, 244, 3, 244, 223, 223, 70, 226, 108, 6, - 246, 246, 16, 65, 6, 225, 22, 22, 310, 310, - 310, 253, 253, 73, 19, 17, 326, 327, 328, 329, - 79, 19, 19, 330, 13, 244, 202, 19, 19, 19, - 19, 202, 220, 220, 19, 277, 114, 252, 252, 84, - 226, 19, 163, 220, 74, 224, 224, 384, 348, 351, - 210, 210, 2, 346, 22, 244, 3, 163, 347, 163, - 19, 363, 220, 220, 334, 220, 223, 308, 6, 137, - 220, 247, 247, 156, 220, 380, 220, 220, 334, 352, - 353, 124, 311, 312, 22, 220, 220, 220, 368, 140, - 22, 220, 225, 225, 144, 202, 310, 310, 310, 310, - 310, 22, 310, 310, 310, 310, 310, 310, 310, 310, - 310, 310, 310, 159, 223, 223, 74, 224, 138, 142, - 166, 237, 210, 245, 245, 223, 152, 226, 226, 220, - 220, 220, 220, 86, 124, 160, 220, 343, 344, 345, - 349, 166, 350, 310, 223, 223, 2, 223, 477, 478, - 3, 237, 223, 480, 323, 324, 223, 239, 223, 223, - 423, 52, 6, 422, 225, 224, 224, 223, 223, 223, - 397, 398, 52, 223, 2, 304, 224, 414, 3, 147, - 429, 376, 377, 422, 52, 379, 158, 239, 447, 118, - 6, 422, 404, 405, 237, 224, 224, 386, 224, 226, - 426, 161, 459, 224, 244, 422, 170, 224, 52, 224, - 224, 254, 225, 225, 178, 290, 28, 14, 224, 224, - 224, 305, 302, 225, 224, 394, 395, 396, 306, 309, - 239, 156, 446, 244, 244, 244, 244, 244, 244, 244, - 244, 319, 225, 225, 48, 225, 322, 226, 226, 416, - 225, 418, 110, 113, 225, 325, 225, 225, 226, 320, - 71, 339, 340, 358, 28, 225, 225, 225, 132, 359, - 360, 225, 427, 362, 105, 361, 369, 226, 226, 378, - 226, 237, 237, 126, 387, 226, 392, 419, 420, 226, - 424, 226, 226, 432, 421, 435, 428, 430, 444, 433, - 226, 226, 226, 172, 260, 450, 226, 448, 149, 452, - 454, 257, 456, 105, 258, 455, 259, 239, 239, 457, - 458, 462, 168, 464, 473, 182, 184, 474, 475, 479, - 307, 466, 467, 468, 2, 1, 126, 2, 3, 4, - 177, 3, 134, 179, 176, 260, 181, 86, 175, 75, - 6, 176, 257, 237, 76, 258, 77, 259, 155, 53, - 243, 136, 245, 245, 342, 390, 245, 245, 245, 245, - 245, 375, 245, 133, 2, 303, 243, 202, 3, 406, - 409, 407, 293, 408, 245, 245, 220, 245, 410, 239, - 6, 388, 240, 389, 116, 188, 260, 400, 401, 402, - 403, 237, 237, 257, 381, 169, 258, 292, 259, 1, - 297, 288, 237, 0, 0, 49, 294, 14, 0, 245, - 0, 5, 0, 243, 0, 0, 0, 0, 7, 8, - 9, 237, 237, 50, 237, 0, 13, 239, 239, 237, - 260, 0, 0, 237, 0, 237, 237, 257, 239, 245, - 258, 0, 259, 0, 237, 237, 237, 0, 0, 0, - 237, 0, 0, 0, 0, 0, 0, 239, 239, 0, - 239, 0, 0, 243, 0, 239, 260, 0, 0, 239, - 0, 239, 239, 257, 413, 0, 258, 0, 259, 1, - 239, 239, 239, 260, 0, 4, 239, 337, 338, 0, - 257, 5, 0, 258, 0, 259, 0, 0, 7, 8, - 9, 0, 11, 12, 0, 0, 13, 0, 0, 417, - 0, 260, 0, 0, 0, 0, 0, 0, 257, 425, - 140, 258, 0, 259, 0, 0, 0, 0, 0, 0, - 364, 0, 0, 0, 367, 0, 256, 0, 0, 260, - 243, 0, 0, 0, 0, 0, 257, 431, 192, 258, - 0, 259, 0, 0, 194, 195, 196, 197, 198, 199, - 200, 201, 14, 0, 0, 0, 260, 0, 0, 203, - 204, 0, 0, 257, 0, 0, 258, 256, 259, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 245, 192, - 0, 0, 434, 0, 0, 194, 195, 196, 197, 198, - 199, 200, 201, 14, 411, 412, 0, 0, 0, 0, - 203, 204, 0, 0, 0, 0, 0, 245, 245, 245, - 245, 245, 245, 245, 245, 0, 0, 260, 256, 220, - 220, 220, 220, 0, 257, 445, 220, 258, 0, 259, - 192, 0, 134, 0, 0, 0, 194, 195, 196, 197, - 198, 199, 200, 201, 14, 0, 260, 0, 0, 0, - 134, 203, 204, 257, 451, 0, 258, 0, 259, 0, - 0, 0, 256, 260, 0, 0, 0, 0, 0, 0, - 257, 453, 0, 258, 192, 259, 0, 0, 0, 0, - 194, 195, 196, 197, 198, 199, 200, 201, 14, 0, - 0, 0, 260, 0, 0, 203, 204, 0, 256, 257, - 465, 0, 258, 0, 259, 0, 0, 0, 0, 0, - 192, 0, 0, 0, 0, 256, 194, 195, 196, 197, - 198, 199, 200, 201, 14, 0, 0, 192, 0, 0, - 0, 203, 204, 194, 195, 196, 197, 198, 199, 200, - 201, 14, 0, 256, 260, 0, 0, 0, 203, 204, - 0, 257, 0, 0, 258, 192, 259, 0, 0, 0, - 0, 194, 195, 196, 197, 198, 199, 200, 201, 14, - 0, 256, 260, 0, 0, 0, 203, 204, 0, 257, - 0, 0, 258, 192, 259, 0, 0, 0, 0, 194, - 195, 196, 197, 198, 199, 200, 201, 14, 256, 0, - 0, 0, 0, 0, 203, 204, 0, 0, 0, 0, - 192, 0, 0, 0, 0, 0, 194, 195, 196, 197, - 198, 199, 200, 201, 14, 0, 0, 0, 0, 0, - 0, 203, 204, 74, 74, 0, 74, 74, 74, 74, - 74, 74, 0, 74, 0, 134, 134, 0, 0, 0, - 134, 134, 0, 0, 0, 74, 0, 134, 74, 256, - 0, 0, 134, 0, 134, 134, 134, 134, 134, 134, - 0, 192, 134, 0, 0, 0, 0, 194, 195, 196, - 197, 198, 199, 200, 201, 14, 0, 74, 256, 134, - 74, 0, 203, 204, 0, 0, 0, 0, 0, 0, - 192, 0, 0, 0, 0, 256, 194, 195, 196, 197, - 198, 199, 200, 201, 14, 0, 0, 192, 0, 74, - 74, 203, 204, 194, 195, 196, 197, 198, 199, 200, - 201, 14, 0, 0, 256, 0, 0, 0, 203, 204, - 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, - 0, 0, 194, 195, 196, 197, 198, 199, 200, 201, - 14, 0, 0, 0, 0, 258, 0, 203, 204, 258, - 258, 258, 258, 258, 258, 258, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 256, 258, 258, 0, - 258, 0, 0, 0, 0, 0, 0, 0, 192, 0, - 0, 0, 0, 0, 194, 195, 196, 197, 198, 199, - 200, 201, 14, 0, 0, 0, 0, 0, 0, 203, - 204, 0, 258, 0, 0, 0, 192, 0, 0, 0, - 0, 0, 194, 195, 196, 197, 198, 199, 200, 201, - 14, 0, 0, 0, 0, 0, 0, 203, 204, 0, - 0, 0, 258, 74, 74, 0, 0, 0, 74, 74, - 0, 0, 0, 0, 0, 74, 0, 0, 0, 74, - 74, 0, 74, 74, 74, 74, 74, 74, 74, 0, - 74, 0, 0, 0, 249, 249, 0, 0, 249, 249, - 249, 249, 249, 249, 249, 0, 0, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 249, 249, 0, 249, - 237, 237, 0, 0, 237, 237, 237, 237, 237, 237, - 237, 212, 212, 0, 0, 212, 212, 212, 212, 212, - 212, 212, 237, 237, 0, 237, 0, 0, 0, 0, - 0, 0, 0, 212, 212, 0, 212, 0, 0, 0, - 0, 0, 0, 0, 0, 271, 271, 0, 0, 271, - 271, 271, 271, 271, 271, 271, 0, 237, 0, 0, - 0, 249, 0, 0, 0, 0, 0, 271, 212, 0, - 0, 201, 201, 0, 0, 201, 201, 201, 201, 201, - 201, 201, 245, 245, 0, 0, 245, 245, 245, 245, - 245, 258, 245, 201, 201, 0, 201, 0, 212, 0, - 0, 0, 271, 0, 245, 245, 0, 245, 259, 0, - 0, 0, 259, 259, 259, 259, 259, 259, 259, 0, - 258, 258, 258, 258, 258, 258, 258, 258, 201, 0, - 259, 259, 271, 259, 0, 0, 0, 0, 0, 245, - 0, 0, 0, 0, 0, 250, 250, 0, 0, 250, - 250, 250, 250, 250, 250, 250, 0, 0, 201, 0, - 0, 0, 0, 0, 0, 259, 0, 250, 250, 245, - 250, 238, 238, 0, 0, 238, 238, 238, 238, 238, - 238, 238, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 238, 238, 259, 238, 213, 213, 0, - 0, 213, 213, 213, 213, 213, 213, 213, 0, 0, - 249, 0, 0, 0, 0, 0, 0, 0, 0, 213, - 213, 0, 213, 0, 0, 0, 0, 0, 238, 0, - 0, 0, 250, 0, 0, 0, 237, 0, 0, 249, - 249, 249, 249, 249, 249, 249, 249, 212, 0, 0, - 0, 0, 0, 0, 213, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 237, 237, 237, 237, 237, - 237, 237, 237, 0, 0, 0, 212, 212, 212, 212, - 212, 0, 212, 212, 213, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 280, - 280, 0, 0, 280, 280, 0, 280, 201, 280, 280, - 271, 0, 0, 271, 271, 271, 271, 271, 245, 0, - 0, 280, 280, 0, 280, 0, 0, 0, 0, 0, - 0, 90, 0, 0, 0, 0, 201, 201, 201, 201, - 0, 201, 201, 201, 259, 0, 0, 245, 245, 245, - 245, 245, 245, 245, 245, 0, 280, 0, 0, 0, - 0, 0, 269, 269, 0, 0, 269, 269, 269, 269, - 269, 269, 269, 259, 259, 259, 259, 259, 259, 259, - 259, 250, 0, 0, 269, 269, 280, 269, 0, 0, - 0, 0, 0, 0, 0, 0, 272, 272, 0, 0, - 272, 272, 272, 272, 272, 272, 272, 238, 0, 0, - 250, 250, 250, 250, 250, 250, 250, 250, 272, 269, - 0, 0, 270, 270, 0, 0, 270, 270, 270, 270, - 270, 270, 270, 213, 0, 0, 238, 238, 238, 238, - 238, 238, 238, 238, 270, 270, 0, 270, 0, 269, - 273, 273, 0, 272, 273, 273, 273, 273, 273, 273, - 273, 0, 213, 213, 213, 213, 213, 0, 213, 213, - 281, 0, 273, 281, 0, 281, 281, 281, 281, 270, - 0, 0, 0, 272, 0, 0, 0, 0, 0, 0, - 282, 281, 281, 282, 281, 282, 282, 282, 282, 0, - 0, 0, 0, 0, 0, 0, 0, 273, 0, 270, - 0, 282, 282, 0, 282, 0, 0, 283, 0, 0, - 283, 0, 283, 283, 283, 283, 281, 0, 1, 2, - 0, 0, 0, 3, 0, 280, 0, 273, 283, 283, - 5, 283, 0, 0, 0, 6, 282, 7, 8, 9, - 0, 0, 0, 0, 0, 13, 281, 0, 0, 0, - 0, 0, 165, 0, 280, 280, 280, 280, 280, 280, - 280, 280, 118, 283, 166, 0, 282, 0, 0, 0, - 0, 0, 255, 255, 0, 0, 255, 255, 255, 255, - 255, 255, 255, 166, 1, 2, 0, 0, 269, 3, - 4, 0, 0, 283, 255, 255, 5, 255, 0, 0, - 0, 6, 0, 7, 8, 9, 10, 11, 12, 0, - 0, 13, 0, 207, 1, 0, 0, 0, 269, 269, - 4, 269, 269, 269, 269, 0, 5, 0, 14, 255, - 0, 0, 205, 7, 8, 9, 0, 0, 12, 0, - 0, 13, 0, 0, 0, 0, 0, 166, 270, 166, - 0, 272, 0, 0, 272, 272, 272, 272, 272, 255, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 207, - 0, 0, 0, 0, 0, 0, 0, 0, 270, 270, - 0, 270, 270, 270, 270, 0, 0, 0, 205, 0, - 0, 0, 0, 0, 0, 281, 140, 0, 206, 0, - 0, 0, 0, 0, 0, 273, 0, 0, 273, 273, - 273, 273, 273, 0, 207, 282, 0, 0, 0, 0, - 0, 0, 0, 0, 281, 281, 281, 281, 281, 281, - 281, 281, 0, 205, 0, 0, 0, 0, 0, 0, - 0, 0, 283, 0, 282, 282, 282, 282, 282, 282, - 282, 282, 140, 0, 299, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 207, 0, 0, 0, - 0, 283, 283, 283, 283, 283, 283, 283, 283, 0, - 0, 0, 166, 0, 0, 205, 166, 0, 0, 0, - 0, 198, 0, 0, 0, 166, 166, 140, 166, 317, - 0, 0, 0, 0, 0, 0, 0, 166, 255, 0, - 207, 166, 0, 0, 0, 0, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 0, 0, 0, 205, - 0, 2, 166, 166, 0, 3, 0, 255, 255, 255, - 255, 255, 255, 0, 189, 190, 0, 6, 0, 140, - 0, 370, 0, 0, 0, 0, 191, 0, 207, 0, - 192, 0, 0, 0, 0, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 0, 0, 205, 0, 0, - 0, 203, 204, 0, 0, 0, 0, 2, 0, 0, - 0, 3, 0, 140, 0, 371, 0, 0, 207, 0, - 189, 190, 0, 6, 0, 0, 0, 0, 0, 0, - 0, 0, 191, 0, 0, 0, 298, 205, 0, 0, - 0, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 207, 2, 0, 0, 0, 3, 203, 204, 0, - 0, 140, 0, 415, 0, 189, 190, 0, 6, 0, - 205, 0, 0, 0, 0, 0, 0, 191, 0, 0, - 0, 192, 0, 0, 0, 0, 193, 194, 195, 196, - 197, 198, 199, 200, 201, 202, 0, 0, 0, 0, - 0, 140, 203, 204, 2, 0, 0, 0, 3, 136, - 0, 0, 0, 0, 0, 0, 0, 189, 190, 0, - 6, 0, 0, 0, 0, 0, 0, 136, 0, 191, - 0, 0, 0, 192, 140, 0, 0, 0, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, 2, 0, - 0, 0, 3, 90, 203, 204, 0, 0, 0, 0, - 0, 189, 190, 0, 6, 0, 0, 0, 0, 0, - 0, 0, 0, 191, 0, 0, 0, 192, 0, 0, - 0, 0, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 0, 90, 0, 0, 2, 0, 203, 204, - 3, 0, 0, 0, 0, 0, 0, 0, 0, 189, - 190, 0, 6, 0, 0, 0, 0, 0, 91, 0, - 0, 191, 0, 90, 0, 192, 0, 0, 0, 0, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 0, 0, 0, 0, 0, 0, 203, 204, 0, 189, - 436, 90, 0, 0, 0, 0, 0, 0, 119, 0, - 0, 191, 0, 0, 0, 192, 0, 0, 0, 0, - 437, 194, 195, 196, 197, 198, 199, 200, 201, 14, - 0, 61, 189, 190, 0, 0, 203, 204, 154, 0, - 0, 0, 0, 0, 191, 0, 0, 0, 192, 0, - 0, 0, 0, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 14, 0, 0, 0, 175, 0, 0, 203, - 204, 0, 136, 136, 0, 0, 0, 136, 136, 0, - 0, 0, 0, 0, 136, 0, 0, 0, 0, 136, - 0, 136, 136, 136, 136, 136, 136, 0, 0, 136, - 1, 2, 0, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 5, 0, 0, 0, 136, 6, 0, 7, - 8, 9, 0, 0, 0, 0, 0, 87, 0, 0, - 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, - 1, 2, 0, 0, 89, 3, 0, 143, 0, 0, - 0, 148, 5, 0, 0, 0, 0, 6, 0, 7, - 8, 9, 0, 0, 162, 167, 0, 13, 0, 0, - 1, 2, 0, 0, 88, 3, 0, 0, 0, 0, - 0, 0, 5, 148, 118, 162, 167, 6, 0, 7, - 8, 9, 0, 0, 0, 0, 0, 87, 1, 2, - 0, 0, 0, 3, 88, 0, 248, 0, 249, 0, - 5, 0, 0, 0, 89, 6, 0, 7, 8, 9, - 0, 0, 0, 0, 291, 13, 0, 295, 61, 61, - 0, 0, 88, 61, 0, 0, 249, 0, 295, 0, - 61, 0, 118, 439, 443, 61, 0, 61, 61, 61, - 0, 0, 0, 0, 449, 61, 0, 0, 0, 0, - 0, 0, 61, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 61, 460, 461, 0, 463, 0, 0, 0, - 0, 469, 0, 0, 0, 470, 0, 471, 472, 0, - 0, 0, 0, 0, 0, 0, 476, 439, 443, 0, - 0, 0, 469, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 365, 366, + protected static final short yyGindex [] = { 604, + 0, 0, -14, 0, 534, 0, 769, 605, 603, 0, + 265, 0, -11, 0, 2362, 0, 559, 0, -10, -57, + 45, -36, 280, 0, 0, 49, 630, 1, 585, -146, + -43, 25, 21, 589, 0, 0, 402, -116, 0, 62, + -15, 40, -81, 0, -148, 0, 0, 0, 422, 331, + -24, 0, 0, 0, 0, -141, 0, 460, 67, 0, + 272, 119, 314, 310, 313, 315, 318, 0, 0, 350, + 0, 135, 0, -52, -1, 39, 74, 0, 0, -191, + -193, 1843, 127, 0, 0, 0, 0, 0, 0, 0, + 0, 361, 290, -71, 546, 0, 0, 625, 0, 114, + 0, 0, 0, -139, 179, 353, 0, 594, 530, 0, + 0, 0, 0, 0, 0, 570, 0, }; - protected short yyCheck[] = new short[2874]; + protected static final short yyTable [] = { 254, + 22, 117, 227, 209, 71, 67, 255, 145, 28, 259, + 36, 38, 86, 87, 154, 185, 186, 248, 338, 211, + 149, 58, 87, 293, 193, 307, 325, 13, 22, 19, + 273, 273, 227, 58, 273, 273, 273, 273, 273, 273, + 273, 13, 108, 19, 22, 114, 30, 102, 22, 168, + 400, 129, 273, 34, 131, 127, 22, 22, 22, 320, + 165, 28, 19, 210, 139, 43, 22, 22, 51, 41, + 87, 131, 13, 130, 19, 165, 19, 165, 227, 44, + 113, 123, 116, 108, 14, 133, 87, 273, 102, 48, + 119, 230, 330, 331, 22, 257, 167, 148, 138, 22, + 46, 41, 104, 132, 39, 72, 129, 19, 22, 28, + 127, 249, 86, 325, 22, 127, 348, 273, 380, 107, + 133, 230, 22, 252, 58, 192, 22, 249, 128, 22, + 22, 46, 22, 22, 22, 131, 47, 115, 177, 294, + 55, 22, 231, 104, 217, 123, 116, 51, 22, 133, + 66, 104, 67, 28, 184, 153, 22, 190, 105, 379, + 107, 303, 124, 43, 22, 227, 227, 230, 51, 172, + 22, 361, 231, 362, 217, 117, 62, 249, 56, 127, + 57, 343, 232, 128, 128, 325, 342, 181, 63, 341, + 183, 30, 57, 160, 381, 187, 322, 258, 64, 2, + 398, 115, 43, 3, 262, 30, 118, 323, 161, 250, + 317, 317, 232, 340, 22, 6, 44, 233, 231, 86, + 217, 363, 105, 322, 364, 250, 124, 249, 165, 43, + 65, 300, 70, 134, 2, 445, 421, 227, 3, 117, + 2, 406, 14, 165, 3, 165, 391, 233, 128, 81, + 6, 135, 248, 248, 230, 230, 6, 244, 232, 433, + 116, 254, 254, 22, 22, 317, 317, 317, 255, 255, + 118, 333, 334, 335, 336, 250, 2, 209, 337, 356, + 3, 357, 13, 209, 19, 227, 227, 244, 75, 445, + 445, 453, 6, 233, 445, 273, 227, 284, 273, 273, + 273, 273, 273, 86, 249, 231, 231, 217, 217, 76, + 42, 22, 249, 249, 141, 227, 227, 19, 227, 209, + 160, 54, 246, 227, 144, 250, 230, 227, 160, 227, + 227, 126, 315, 244, 140, 296, 146, 106, 227, 227, + 227, 22, 80, 375, 227, 232, 232, 22, 370, 88, + 148, 341, 246, 317, 317, 317, 317, 317, 22, 317, + 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, + 142, 142, 170, 253, 230, 230, 156, 231, 106, 217, + 233, 233, 162, 52, 358, 230, 126, 106, 143, 178, + 42, 254, 109, 170, 52, 110, 16, 163, 246, 164, + 317, 165, 250, 174, 230, 230, 52, 230, 42, 17, + 109, 261, 230, 110, 359, 360, 230, 232, 230, 230, + 244, 244, 404, 405, 182, 231, 231, 230, 230, 230, + 267, 387, 52, 230, 341, 297, 231, 264, 388, 309, + 265, 311, 266, 160, 2, 2, 383, 384, 3, 3, + 386, 312, 233, 19, 165, 231, 231, 165, 231, 19, + 6, 6, 393, 231, 313, 232, 232, 231, 430, 231, + 231, 429, 165, 19, 19, 316, 232, 151, 231, 231, + 231, 411, 412, 327, 231, 246, 246, 120, 14, 355, + 436, 326, 244, 429, 353, 232, 232, 329, 232, 354, + 233, 233, 332, 232, 19, 267, 346, 232, 347, 232, + 232, 233, 264, 420, 423, 265, 425, 266, 232, 232, + 232, 2, 267, 2, 232, 3, 365, 3, 366, 264, + 233, 233, 265, 233, 266, 368, 367, 6, 233, 6, + 244, 244, 233, 454, 233, 233, 429, 466, 314, 369, + 429, 244, 376, 233, 233, 233, 299, 246, 439, 233, + 442, 394, 385, 451, 209, 399, 14, 426, 247, 427, + 244, 244, 428, 244, 459, 461, 267, 431, 244, 435, + 437, 440, 244, 264, 244, 244, 265, 295, 266, 455, + 457, 462, 301, 244, 244, 244, 473, 474, 475, 244, + 463, 464, 382, 267, 465, 246, 246, 484, 485, 469, + 264, 486, 487, 265, 471, 266, 246, 247, 247, 480, + 481, 247, 247, 247, 247, 247, 482, 247, 1, 424, + 407, 408, 409, 410, 2, 246, 246, 4, 246, 247, + 247, 222, 247, 246, 3, 178, 88, 246, 177, 246, + 246, 77, 79, 78, 136, 180, 267, 159, 246, 246, + 246, 53, 137, 264, 246, 349, 265, 140, 266, 318, + 319, 397, 263, 267, 247, 414, 344, 345, 413, 415, + 264, 432, 416, 265, 199, 266, 417, 195, 395, 118, + 201, 202, 203, 204, 205, 206, 207, 208, 14, 396, + 267, 173, 304, 188, 247, 210, 211, 264, 438, 0, + 265, 0, 266, 0, 19, 0, 0, 0, 0, 371, + 0, 19, 19, 374, 350, 351, 352, 19, 19, 19, + 19, 267, 0, 0, 19, 0, 0, 0, 264, 0, + 0, 265, 0, 266, 0, 0, 144, 263, 267, 0, + 0, 0, 0, 0, 0, 264, 452, 441, 265, 199, + 266, 0, 0, 0, 263, 201, 202, 203, 204, 205, + 206, 207, 208, 14, 0, 0, 199, 0, 0, 0, + 210, 211, 201, 202, 203, 204, 205, 206, 207, 208, + 14, 0, 267, 418, 419, 0, 0, 210, 211, 264, + 458, 0, 265, 0, 266, 0, 0, 136, 0, 267, + 0, 0, 401, 402, 403, 0, 264, 460, 263, 265, + 0, 266, 0, 0, 0, 136, 0, 0, 112, 115, + 199, 0, 0, 0, 0, 0, 201, 202, 203, 204, + 205, 206, 207, 208, 14, 263, 136, 0, 267, 0, + 0, 210, 211, 247, 0, 264, 472, 199, 265, 434, + 266, 0, 0, 201, 202, 203, 204, 205, 206, 207, + 208, 14, 0, 0, 0, 0, 0, 0, 210, 211, + 0, 176, 247, 247, 247, 247, 247, 247, 247, 247, + 0, 0, 267, 0, 222, 222, 222, 222, 263, 264, + 0, 222, 265, 0, 266, 189, 191, 138, 0, 0, + 199, 0, 0, 0, 0, 263, 201, 202, 203, 204, + 205, 206, 207, 208, 14, 138, 0, 199, 0, 0, + 0, 210, 211, 201, 202, 203, 204, 205, 206, 207, + 208, 14, 263, 267, 0, 0, 0, 0, 210, 211, + 264, 0, 0, 265, 199, 266, 0, 0, 310, 0, + 201, 202, 203, 204, 205, 206, 207, 208, 14, 0, + 0, 0, 0, 263, 0, 210, 211, 0, 0, 0, + 0, 0, 0, 0, 0, 199, 0, 0, 0, 0, + 263, 201, 202, 203, 204, 205, 206, 207, 208, 14, + 0, 0, 199, 0, 0, 0, 210, 211, 201, 202, + 203, 204, 205, 206, 207, 208, 14, 0, 0, 0, + 136, 136, 0, 210, 211, 136, 136, 0, 0, 0, + 0, 0, 136, 0, 263, 0, 0, 136, 0, 136, + 136, 136, 136, 136, 136, 0, 199, 136, 0, 0, + 0, 263, 201, 202, 203, 204, 205, 206, 207, 208, + 14, 0, 0, 199, 136, 0, 0, 210, 211, 201, + 202, 203, 204, 205, 206, 207, 208, 14, 0, 0, + 1, 0, 0, 0, 210, 211, 4, 0, 0, 0, + 263, 0, 5, 0, 0, 0, 0, 0, 0, 7, + 8, 9, 199, 11, 12, 0, 0, 13, 201, 202, + 203, 204, 205, 206, 207, 208, 14, 0, 0, 0, + 138, 138, 0, 210, 211, 138, 138, 0, 0, 0, + 0, 0, 138, 0, 263, 0, 0, 138, 0, 138, + 138, 138, 138, 138, 138, 0, 199, 138, 0, 0, + 0, 0, 201, 202, 203, 204, 205, 206, 207, 208, + 14, 0, 0, 0, 138, 0, 0, 210, 211, 76, + 76, 0, 76, 76, 76, 76, 76, 76, 0, 76, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 76, 0, 0, 76, 0, 0, 199, 0, 0, + 0, 0, 0, 201, 202, 203, 204, 205, 206, 207, + 208, 14, 0, 0, 0, 0, 0, 0, 210, 211, + 0, 0, 0, 76, 246, 246, 76, 0, 246, 246, + 246, 246, 246, 0, 246, 260, 0, 0, 0, 260, + 260, 260, 260, 260, 260, 260, 246, 246, 0, 246, + 0, 0, 0, 0, 0, 76, 76, 260, 260, 0, + 260, 251, 251, 0, 0, 251, 251, 251, 251, 251, + 251, 251, 247, 247, 0, 0, 247, 247, 247, 247, + 247, 246, 247, 251, 251, 0, 251, 0, 0, 0, + 0, 0, 260, 0, 247, 247, 0, 247, 239, 239, + 0, 0, 239, 239, 239, 239, 239, 239, 239, 214, + 214, 246, 0, 214, 214, 214, 214, 214, 214, 214, + 239, 239, 260, 239, 0, 0, 0, 0, 0, 247, + 0, 214, 214, 0, 214, 203, 203, 0, 0, 203, + 203, 203, 203, 203, 203, 203, 0, 0, 251, 0, + 0, 0, 0, 0, 0, 239, 0, 203, 203, 247, + 203, 0, 0, 261, 0, 0, 214, 261, 261, 261, + 261, 261, 261, 261, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 261, 261, 0, 261, 76, + 76, 0, 203, 0, 76, 76, 214, 0, 0, 0, + 0, 76, 0, 0, 0, 76, 76, 0, 76, 76, + 76, 76, 76, 76, 76, 0, 76, 0, 0, 0, + 261, 0, 203, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 76, 76, 76, 76, 76, 76, 76, + 76, 76, 0, 0, 0, 0, 0, 0, 0, 0, + 261, 0, 0, 0, 0, 0, 0, 240, 240, 0, + 246, 240, 240, 240, 240, 240, 240, 240, 0, 0, + 0, 260, 0, 0, 0, 0, 0, 0, 0, 240, + 240, 0, 240, 0, 0, 0, 0, 0, 0, 246, + 246, 246, 246, 246, 246, 246, 246, 251, 0, 0, + 260, 260, 260, 260, 260, 260, 260, 260, 247, 0, + 0, 0, 0, 0, 240, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 251, 251, 251, 251, + 251, 251, 251, 251, 239, 0, 0, 247, 247, 247, + 247, 247, 247, 247, 247, 214, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 239, 239, 239, 239, 239, 239, 239, + 239, 203, 0, 0, 214, 214, 214, 214, 214, 0, + 214, 214, 0, 0, 0, 0, 252, 252, 0, 0, + 252, 252, 252, 252, 252, 252, 252, 0, 0, 261, + 203, 203, 203, 203, 0, 203, 203, 203, 252, 252, + 0, 252, 0, 0, 215, 215, 0, 0, 215, 215, + 215, 215, 215, 215, 215, 0, 0, 0, 261, 261, + 261, 261, 261, 261, 261, 261, 215, 215, 0, 215, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 282, 282, 0, 0, 282, 282, 0, 282, + 0, 282, 282, 0, 0, 0, 0, 0, 0, 0, + 0, 215, 0, 252, 282, 282, 0, 282, 0, 0, + 271, 271, 0, 0, 271, 271, 271, 271, 271, 271, + 271, 0, 1, 240, 0, 0, 0, 0, 49, 0, + 0, 215, 271, 271, 5, 271, 0, 0, 0, 282, + 0, 7, 8, 9, 0, 0, 50, 0, 0, 13, + 0, 0, 240, 240, 240, 240, 240, 240, 240, 240, + 0, 0, 0, 0, 0, 0, 0, 271, 222, 282, + 272, 272, 0, 0, 272, 272, 272, 272, 272, 272, + 272, 274, 274, 0, 0, 274, 274, 274, 274, 274, + 274, 274, 272, 272, 0, 272, 0, 271, 76, 0, + 0, 0, 0, 274, 275, 275, 0, 0, 275, 275, + 275, 275, 275, 275, 275, 0, 1, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 275, 272, 5, 0, + 0, 0, 0, 0, 0, 7, 8, 9, 274, 0, + 12, 0, 283, 13, 0, 283, 0, 283, 283, 283, + 283, 0, 252, 0, 0, 0, 0, 272, 0, 0, + 0, 275, 0, 283, 283, 0, 283, 0, 274, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 215, 252, 252, 252, 252, 252, 252, 252, 252, 0, + 0, 275, 0, 0, 0, 0, 0, 0, 283, 284, + 0, 0, 284, 0, 284, 284, 284, 284, 0, 215, + 215, 215, 215, 215, 0, 215, 215, 0, 282, 285, + 284, 284, 285, 284, 285, 285, 285, 285, 283, 0, + 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, + 285, 285, 0, 285, 0, 0, 271, 282, 282, 282, + 282, 282, 282, 282, 282, 284, 0, 0, 0, 0, + 0, 257, 257, 0, 0, 257, 257, 257, 257, 257, + 257, 257, 0, 0, 0, 285, 271, 271, 0, 271, + 271, 271, 271, 257, 257, 284, 257, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 93, 0, 0, 0, + 0, 0, 0, 0, 0, 285, 272, 0, 76, 0, + 0, 0, 0, 0, 168, 247, 247, 0, 257, 0, + 0, 222, 222, 222, 222, 0, 0, 0, 222, 0, + 0, 0, 0, 168, 0, 0, 272, 272, 0, 272, + 272, 272, 272, 0, 0, 0, 274, 0, 257, 274, + 274, 274, 274, 274, 0, 0, 0, 0, 0, 214, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 275, + 0, 0, 275, 275, 275, 275, 275, 283, 212, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 168, 0, 168, + 0, 0, 0, 0, 0, 0, 283, 283, 283, 283, + 283, 283, 283, 283, 0, 0, 214, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, + 0, 0, 0, 3, 284, 212, 0, 0, 0, 0, + 5, 0, 144, 0, 213, 6, 0, 7, 8, 9, + 0, 0, 0, 0, 285, 89, 0, 0, 0, 0, + 0, 0, 90, 284, 284, 284, 284, 284, 284, 284, + 284, 0, 91, 214, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 285, 285, 285, 285, 285, 285, 285, + 285, 0, 212, 0, 0, 0, 0, 257, 0, 144, + 0, 306, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 214, 0, + 0, 0, 0, 0, 0, 0, 257, 257, 257, 257, + 257, 257, 168, 0, 0, 0, 168, 212, 0, 0, + 0, 200, 0, 0, 0, 168, 168, 0, 168, 0, + 0, 0, 0, 0, 0, 0, 144, 168, 324, 0, + 0, 168, 0, 0, 0, 0, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 0, 2, 0, 214, + 0, 3, 168, 168, 0, 0, 0, 0, 0, 0, + 196, 197, 0, 6, 0, 0, 0, 0, 212, 446, + 450, 144, 198, 377, 0, 0, 199, 0, 0, 0, + 456, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 0, 0, 214, 0, 0, 0, 210, 211, 467, + 468, 0, 470, 0, 2, 0, 0, 476, 3, 0, + 0, 477, 212, 478, 479, 0, 0, 196, 197, 0, + 6, 0, 483, 446, 450, 0, 0, 0, 476, 198, + 0, 0, 144, 305, 378, 0, 0, 0, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 0, 214, + 0, 0, 0, 0, 210, 211, 0, 0, 92, 0, + 0, 2, 0, 0, 0, 3, 0, 0, 212, 0, + 0, 0, 0, 0, 196, 197, 144, 6, 422, 0, + 0, 0, 0, 0, 0, 0, 198, 0, 0, 214, + 199, 0, 0, 0, 0, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 0, 2, 0, 212, 0, + 3, 210, 211, 0, 0, 0, 0, 0, 0, 196, + 197, 0, 6, 121, 0, 0, 0, 0, 0, 0, + 0, 198, 144, 0, 0, 199, 0, 0, 0, 0, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 0, 147, 0, 0, 92, 152, 210, 211, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 166, 171, + 0, 3, 144, 0, 0, 0, 0, 0, 0, 0, + 196, 197, 0, 6, 0, 0, 0, 152, 0, 166, + 171, 0, 198, 0, 92, 0, 199, 0, 0, 0, + 0, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 2, 255, 0, 256, 3, 0, 210, 211, 158, + 0, 0, 92, 0, 196, 197, 0, 6, 0, 0, + 298, 0, 0, 302, 0, 0, 198, 0, 0, 0, + 199, 0, 256, 0, 302, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 1, 2, 61, 0, 179, + 3, 210, 211, 0, 0, 0, 0, 5, 0, 0, + 0, 0, 6, 0, 7, 8, 9, 0, 0, 0, + 196, 443, 13, 0, 0, 0, 0, 0, 0, 90, + 0, 0, 198, 0, 0, 0, 199, 0, 0, 120, + 0, 444, 201, 202, 203, 204, 205, 206, 207, 208, + 14, 0, 0, 0, 0, 0, 0, 210, 211, 0, + 196, 197, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 198, 0, 0, 0, 199, 0, 0, 0, + 0, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 14, 1, 2, 0, 0, 0, 3, 210, 211, 0, + 372, 373, 0, 5, 0, 0, 0, 0, 6, 0, + 7, 8, 9, 0, 0, 0, 0, 0, 89, 0, + 0, 0, 0, 0, 0, 90, 0, 0, 0, 0, + 0, 1, 2, 0, 0, 91, 3, 0, 0, 0, + 0, 0, 0, 5, 0, 0, 0, 0, 6, 0, + 7, 8, 9, 0, 0, 0, 0, 0, 13, 1, + 2, 0, 0, 0, 3, 90, 0, 0, 0, 0, + 0, 5, 0, 0, 0, 120, 6, 0, 7, 8, + 9, 0, 0, 0, 0, 0, 13, 0, 0, 0, + 0, 0, 0, 169, 61, 61, 0, 0, 0, 61, + 0, 0, 0, 120, 0, 0, 61, 0, 0, 0, + 0, 61, 0, 61, 61, 61, 0, 0, 0, 0, + 0, 61, 0, 0, 1, 2, 0, 0, 61, 3, + 4, 0, 0, 0, 0, 0, 5, 0, 61, 0, + 0, 6, 0, 7, 8, 9, 10, 11, 12, 0, + 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 14, + }; + protected short yyCheck[] = new short[2830]; } class yyCheck0 { protected static final short yyCheck0 [] = { 46, - 0, 59, 140, 40, 41, 56, 57, 44, 123, 46, - 10, 11, 59, 61, 123, 66, 41, 137, 152, 46, - 213, 41, 59, 60, 61, 46, 144, 42, 28, 123, - 90, 123, 170, 60, 44, 123, 46, 170, 44, 21, - 58, 301, 160, 60, 44, 59, 59, 59, 48, 59, - 60, 61, 44, 41, 91, 46, 56, 57, 58, 76, - 105, 112, 46, 87, 91, 69, 66, 67, 67, 60, - 94, 53, 59, 77, 29, 213, 60, 128, 59, 97, - 144, 91, 59, 59, 140, 41, 60, 105, 62, 207, - 59, 59, 92, 301, 58, 302, 160, 97, 305, 58, - 91, 152, 40, 91, 149, 59, 106, 300, 67, 123, - 123, 123, 112, 59, 170, 301, 133, 123, 44, 59, - 120, 120, 256, 61, 124, 243, 61, 127, 128, 66, - 130, 123, 136, 97, 91, 140, 62, 137, 97, 257, - 140, 105, 123, 420, 144, 46, 123, 123, 58, 44, - 168, 106, 152, 268, 123, 123, 91, 213, 59, 268, - 160, 120, 300, 301, 59, 170, 166, 282, 301, 123, - 170, 41, 127, 282, 44, 112, 268, 123, 21, 372, - 268, 44, 140, 123, 304, 149, 246, 97, 282, 32, - 59, 128, 156, 211, 40, 40, 106, 474, 475, 62, - 46, 46, 479, 203, 204, 256, 340, 207, 213, 44, - 53, 44, 170, 213, 60, 91, 334, 140, 37, 38, - 44, 44, 41, 42, 43, 44, 45, 62, 47, 62, - 44, 351, 60, 258, 372, 59, 46, 262, 258, 62, - 59, 60, 262, 62, 300, 301, 301, 170, 62, 274, - 308, 309, 46, 60, 274, 213, 256, 257, 258, 259, - 260, 308, 309, 93, 301, 59, 314, 315, 316, 317, - 301, 308, 309, 321, 301, 94, 301, 314, 315, 316, - 317, 301, 420, 421, 321, 159, 301, 308, 309, 340, - 213, 301, 44, 431, 93, 300, 301, 321, 37, 273, - 300, 301, 258, 42, 304, 124, 262, 59, 47, 61, - 301, 41, 450, 451, 44, 453, 372, 191, 274, 268, - 458, 308, 309, 44, 462, 41, 464, 465, 44, 303, - 304, 67, 203, 204, 334, 473, 474, 475, 59, 123, - 340, 479, 300, 301, 40, 301, 346, 347, 348, 349, - 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, - 360, 361, 362, 61, 420, 421, 301, 372, 44, 301, - 106, 140, 372, 308, 309, 431, 289, 300, 301, 314, - 315, 316, 317, 59, 120, 40, 321, 258, 259, 260, - 43, 127, 45, 393, 450, 451, 258, 453, 474, 475, - 262, 170, 458, 479, 308, 309, 462, 140, 464, 465, - 41, 31, 274, 44, 372, 420, 421, 473, 474, 475, - 349, 350, 42, 479, 258, 38, 431, 369, 262, 291, - 41, 305, 306, 44, 54, 309, 59, 170, 41, 301, - 274, 44, 356, 357, 213, 450, 451, 321, 453, 372, - 392, 301, 41, 458, 273, 44, 123, 462, 78, 464, - 465, 301, 420, 421, 59, 59, 0, 301, 473, 474, - 475, 40, 301, 431, 479, 346, 347, 348, 40, 40, - 213, 44, 424, 302, 303, 304, 305, 306, 307, 308, - 309, 59, 450, 451, 28, 453, 46, 420, 421, 373, - 458, 375, 60, 61, 462, 59, 464, 465, 431, 329, - 44, 59, 44, 38, 48, 473, 474, 475, 76, 94, - 124, 479, 393, 306, 58, 307, 40, 450, 451, 59, - 453, 300, 301, 67, 301, 458, 40, 59, 41, 462, - 40, 464, 465, 417, 41, 419, 59, 59, 422, 59, - 473, 474, 475, 111, 33, 41, 479, 59, 92, 433, - 434, 40, 40, 97, 43, 59, 45, 300, 301, 40, - 267, 41, 106, 41, 41, 133, 134, 41, 41, 267, - 59, 455, 456, 457, 258, 0, 120, 0, 262, 0, - 124, 0, 301, 127, 59, 33, 130, 59, 59, 48, - 274, 120, 40, 372, 49, 43, 50, 45, 97, 32, - 144, 77, 37, 38, 257, 334, 41, 42, 43, 44, - 45, 59, 47, 76, 258, 183, 160, 301, 262, 358, - 361, 359, 166, 360, 59, 60, 61, 62, 362, 372, - 274, 332, 143, 332, 65, 138, 33, 352, 353, 354, - 355, 420, 421, 40, 41, 106, 43, 291, 45, 257, - 169, 162, 431, -1, -1, 263, 167, 301, -1, 94, - -1, 269, -1, 207, -1, -1, -1, -1, 276, 277, - 278, 450, 451, 281, 453, -1, 284, 420, 421, 458, - 33, -1, -1, 462, -1, 464, 465, 40, 431, 124, - 43, -1, 45, -1, 473, 474, 475, -1, -1, -1, - 479, -1, -1, -1, -1, -1, -1, 450, 451, -1, - 453, -1, -1, 257, -1, 458, 33, -1, -1, 462, - -1, 464, 465, 40, 41, -1, 43, -1, 45, 257, - 473, 474, 475, 33, -1, 263, 479, 248, 249, -1, - 40, 269, -1, 43, -1, 45, -1, -1, 276, 277, - 278, -1, 280, 281, -1, -1, 284, -1, -1, 59, - -1, 33, -1, -1, -1, -1, -1, -1, 40, 41, - 123, 43, -1, 45, -1, -1, -1, -1, -1, -1, - 291, -1, -1, -1, 295, -1, 275, -1, -1, 33, - 334, -1, -1, -1, -1, -1, 40, 41, 287, 43, - -1, 45, -1, -1, 293, 294, 295, 296, 297, 298, - 299, 300, 301, -1, -1, -1, 33, -1, -1, 308, - 309, -1, -1, 40, -1, -1, 43, 275, 45, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 273, 287, - -1, -1, 59, -1, -1, 293, 294, 295, 296, 297, - 298, 299, 300, 301, 365, 366, -1, -1, -1, -1, - 308, 309, -1, -1, -1, -1, -1, 302, 303, 304, - 305, 306, 307, 308, 309, -1, -1, 33, 275, 314, - 315, 316, 317, -1, 40, 41, 321, 43, -1, 45, - 287, -1, 44, -1, -1, -1, 293, 294, 295, 296, - 297, 298, 299, 300, 301, -1, 33, -1, -1, -1, - 62, 308, 309, 40, 41, -1, 43, -1, 45, -1, - -1, -1, 275, 33, -1, -1, -1, -1, -1, -1, - 40, 41, -1, 43, 287, 45, -1, -1, -1, -1, - 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, - -1, -1, 33, -1, -1, 308, 309, -1, 275, 40, - 41, -1, 43, -1, 45, -1, -1, -1, -1, -1, + 0, 42, 144, 59, 63, 123, 46, 89, 123, 156, + 10, 11, 56, 57, 96, 132, 133, 41, 61, 59, + 92, 123, 66, 41, 141, 174, 220, 46, 28, 46, + 37, 38, 174, 123, 41, 42, 43, 44, 45, 46, + 47, 60, 58, 60, 44, 44, 123, 58, 48, 107, + 41, 67, 59, 301, 69, 67, 56, 57, 58, 41, + 44, 0, 46, 59, 79, 46, 66, 67, 29, 21, + 114, 59, 91, 44, 91, 59, 60, 61, 220, 60, + 60, 59, 59, 99, 301, 59, 130, 94, 99, 28, + 66, 144, 308, 309, 94, 153, 107, 40, 78, 99, + 91, 53, 58, 268, 301, 44, 122, 91, 108, 48, + 122, 148, 156, 307, 114, 59, 263, 124, 61, 58, + 285, 174, 122, 148, 123, 140, 126, 164, 67, 129, + 130, 91, 132, 133, 134, 123, 91, 59, 114, 164, + 60, 141, 144, 99, 144, 123, 123, 108, 148, 123, + 268, 107, 123, 268, 130, 94, 156, 137, 59, 308, + 99, 172, 59, 46, 164, 307, 308, 220, 129, 108, + 170, 60, 174, 62, 174, 59, 59, 214, 268, 123, + 282, 253, 144, 122, 59, 379, 41, 126, 59, 44, + 129, 268, 282, 44, 311, 134, 40, 153, 46, 258, + 347, 123, 46, 262, 160, 282, 59, 218, 59, 148, + 210, 211, 174, 250, 214, 274, 60, 144, 220, 263, + 220, 302, 123, 40, 305, 164, 123, 264, 44, 46, + 60, 170, 301, 44, 258, 427, 376, 379, 262, 123, + 258, 358, 301, 59, 262, 61, 328, 174, 123, 301, + 274, 62, 308, 309, 307, 308, 274, 144, 220, 399, + 301, 308, 309, 263, 264, 265, 266, 267, 308, 309, + 123, 314, 315, 316, 317, 214, 258, 301, 321, 43, + 262, 45, 301, 301, 301, 427, 428, 174, 93, 481, + 482, 431, 274, 220, 486, 302, 438, 163, 305, 306, + 307, 308, 309, 347, 341, 307, 308, 307, 308, 93, + 21, 311, 308, 309, 268, 457, 458, 301, 460, 301, + 44, 32, 144, 465, 123, 264, 379, 469, 44, 471, + 472, 67, 198, 220, 44, 59, 301, 58, 480, 481, + 482, 341, 53, 59, 486, 307, 308, 347, 41, 59, + 40, 44, 174, 353, 354, 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, + 44, 44, 108, 44, 427, 428, 289, 379, 99, 379, + 307, 308, 59, 31, 273, 438, 122, 108, 62, 62, + 44, 62, 44, 129, 42, 44, 46, 61, 220, 40, + 400, 301, 341, 123, 457, 458, 54, 460, 62, 59, + 62, 301, 465, 62, 303, 304, 469, 379, 471, 472, + 307, 308, 356, 357, 59, 427, 428, 480, 481, 482, + 33, 41, 80, 486, 44, 59, 438, 40, 41, 301, + 43, 38, 45, 44, 258, 258, 312, 313, 262, 262, + 316, 40, 379, 40, 41, 457, 458, 44, 460, 46, + 274, 274, 328, 465, 40, 427, 428, 469, 41, 471, + 472, 44, 59, 60, 61, 40, 438, 291, 480, 481, + 482, 363, 364, 329, 486, 307, 308, 301, 301, 37, + 41, 59, 379, 44, 42, 457, 458, 46, 460, 47, + 427, 428, 59, 465, 91, 33, 59, 469, 44, 471, + 472, 438, 40, 41, 380, 43, 382, 45, 480, 481, + 482, 258, 33, 258, 486, 262, 38, 262, 94, 40, + 457, 458, 43, 460, 45, 307, 124, 274, 465, 274, + 427, 428, 469, 41, 471, 472, 44, 41, 59, 306, + 44, 438, 40, 480, 481, 482, 291, 379, 424, 486, + 426, 301, 59, 429, 301, 40, 301, 59, 147, 41, + 457, 458, 41, 460, 440, 441, 33, 40, 465, 59, + 59, 59, 469, 40, 471, 472, 43, 166, 45, 59, + 41, 59, 171, 480, 481, 482, 462, 463, 464, 486, + 40, 40, 59, 33, 267, 427, 428, 481, 482, 41, + 40, 267, 486, 43, 41, 45, 438, 37, 38, 41, + 41, 41, 42, 43, 44, 45, 41, 47, 0, 59, + 359, 360, 361, 362, 0, 457, 458, 0, 460, 59, + 60, 61, 62, 465, 0, 59, 59, 469, 59, 471, + 472, 48, 50, 49, 301, 122, 33, 99, 480, 481, + 482, 32, 78, 40, 486, 264, 43, 79, 45, 210, + 211, 341, 275, 33, 94, 366, 255, 256, 365, 367, + 40, 41, 368, 43, 287, 45, 369, 142, 339, 65, + 293, 294, 295, 296, 297, 298, 299, 300, 301, 339, + 33, 108, 173, 134, 124, 308, 309, 40, 41, -1, + 43, -1, 45, -1, 301, -1, -1, -1, -1, 298, + -1, 308, 309, 302, 265, 266, 267, 314, 315, 316, + 317, 33, -1, -1, 321, -1, -1, -1, 40, -1, + -1, 43, -1, 45, -1, -1, 123, 275, 33, -1, + -1, -1, -1, -1, -1, 40, 41, 59, 43, 287, + 45, -1, -1, -1, 275, 293, 294, 295, 296, 297, + 298, 299, 300, 301, -1, -1, 287, -1, -1, -1, + 308, 309, 293, 294, 295, 296, 297, 298, 299, 300, + 301, -1, 33, 372, 373, -1, -1, 308, 309, 40, + 41, -1, 43, -1, 45, -1, -1, 44, -1, 33, + -1, -1, 353, 354, 355, -1, 40, 41, 275, 43, + -1, 45, -1, -1, -1, 62, -1, -1, 60, 61, + 287, -1, -1, -1, -1, -1, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 275, 78, -1, 33, -1, + -1, 308, 309, 273, -1, 40, 41, 287, 43, 400, + 45, -1, -1, 293, 294, 295, 296, 297, 298, 299, + 300, 301, -1, -1, -1, -1, -1, -1, 308, 309, + -1, 113, 302, 303, 304, 305, 306, 307, 308, 309, + -1, -1, 33, -1, 314, 315, 316, 317, 275, 40, + -1, 321, 43, -1, 45, 137, 138, 44, -1, -1, 287, -1, -1, -1, -1, 275, 293, 294, 295, 296, - 297, 298, 299, 300, 301, -1, -1, 287, -1, -1, + 297, 298, 299, 300, 301, 62, -1, 287, -1, -1, + -1, 308, 309, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 275, 33, -1, -1, -1, -1, 308, 309, + 40, -1, -1, 43, 287, 45, -1, -1, 190, -1, + 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, + -1, -1, -1, 275, -1, 308, 309, -1, -1, -1, + -1, -1, -1, -1, -1, 287, -1, -1, -1, -1, + 275, 293, 294, 295, 296, 297, 298, 299, 300, 301, }; } class yyCheck1 { protected static final short yyCheck1 [] = { -1, - 308, 309, 293, 294, 295, 296, 297, 298, 299, 300, - 301, -1, 275, 33, -1, -1, -1, 308, 309, -1, - 40, -1, -1, 43, 287, 45, -1, -1, -1, -1, - 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, - 275, 33, -1, -1, -1, 308, 309, -1, 40, -1, - -1, 43, 287, 45, -1, -1, -1, -1, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 275, -1, -1, - -1, -1, -1, 308, 309, -1, -1, -1, -1, 287, - -1, -1, -1, -1, -1, 293, 294, 295, 296, 297, - 298, 299, 300, 301, -1, -1, -1, -1, -1, -1, - 308, 309, 37, 38, -1, 40, 41, 42, 43, 44, - 45, -1, 47, -1, 257, 258, -1, -1, -1, 262, - 263, -1, -1, -1, 59, -1, 269, 62, 275, -1, - -1, 274, -1, 276, 277, 278, 279, 280, 281, -1, - 287, 284, -1, -1, -1, -1, 293, 294, 295, 296, - 297, 298, 299, 300, 301, -1, 91, 275, 301, 94, - -1, 308, 309, -1, -1, -1, -1, -1, -1, 287, - -1, -1, -1, -1, 275, 293, 294, 295, 296, 297, - 298, 299, 300, 301, -1, -1, 287, -1, 123, 124, - 308, 309, 293, 294, 295, 296, 297, 298, 299, 300, - 301, -1, -1, 275, -1, -1, -1, 308, 309, -1, - -1, -1, -1, -1, -1, 287, -1, -1, -1, -1, + -1, 287, -1, -1, -1, 308, 309, 293, 294, 295, + 296, 297, 298, 299, 300, 301, -1, -1, -1, 257, + 258, -1, 308, 309, 262, 263, -1, -1, -1, -1, + -1, 269, -1, 275, -1, -1, 274, -1, 276, 277, + 278, 279, 280, 281, -1, 287, 284, -1, -1, -1, + 275, 293, 294, 295, 296, 297, 298, 299, 300, 301, + -1, -1, 287, 301, -1, -1, 308, 309, 293, 294, + 295, 296, 297, 298, 299, 300, 301, -1, -1, 257, + -1, -1, -1, 308, 309, 263, -1, -1, -1, 275, + -1, 269, -1, -1, -1, -1, -1, -1, 276, 277, + 278, 287, 280, 281, -1, -1, 284, 293, 294, 295, + 296, 297, 298, 299, 300, 301, -1, -1, -1, 257, + 258, -1, 308, 309, 262, 263, -1, -1, -1, -1, + -1, 269, -1, 275, -1, -1, 274, -1, 276, 277, + 278, 279, 280, 281, -1, 287, 284, -1, -1, -1, -1, 293, 294, 295, 296, 297, 298, 299, 300, 301, - -1, -1, -1, -1, 37, -1, 308, 309, 41, 42, - 43, 44, 45, 46, 47, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 275, 59, 60, -1, 62, - -1, -1, -1, -1, -1, -1, -1, 287, -1, -1, - -1, -1, -1, 293, 294, 295, 296, 297, 298, 299, - 300, 301, -1, -1, -1, -1, -1, -1, 308, 309, - -1, 94, -1, -1, -1, 287, -1, -1, -1, -1, - -1, 293, 294, 295, 296, 297, 298, 299, 300, 301, - -1, -1, -1, -1, -1, -1, 308, 309, -1, -1, - -1, 124, 257, 258, -1, -1, -1, 262, 263, -1, - -1, -1, -1, -1, 269, -1, -1, -1, 273, 274, - -1, 276, 277, 278, 279, 280, 281, 282, -1, 284, - -1, -1, -1, 37, 38, -1, -1, 41, 42, 43, - 44, 45, 46, 47, -1, -1, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 59, 60, -1, 62, 37, - 38, -1, -1, 41, 42, 43, 44, 45, 46, 47, - 37, 38, -1, -1, 41, 42, 43, 44, 45, 46, - 47, 59, 60, -1, 62, -1, -1, -1, -1, -1, - -1, -1, 59, 60, -1, 62, -1, -1, -1, -1, - -1, -1, -1, -1, 37, 38, -1, -1, 41, 42, - 43, 44, 45, 46, 47, -1, 94, -1, -1, -1, - 124, -1, -1, -1, -1, -1, 59, 94, -1, -1, + -1, -1, -1, 301, -1, -1, 308, 309, 37, 38, + -1, 40, 41, 42, 43, 44, 45, -1, 47, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 59, -1, -1, 62, -1, -1, 287, -1, -1, -1, + -1, -1, 293, 294, 295, 296, 297, 298, 299, 300, + 301, -1, -1, -1, -1, -1, -1, 308, 309, -1, + -1, -1, 91, 37, 38, 94, -1, 41, 42, 43, + 44, 45, -1, 47, 37, -1, -1, -1, 41, 42, + 43, 44, 45, 46, 47, 59, 60, -1, 62, -1, + -1, -1, -1, -1, 123, 124, 59, 60, -1, 62, 37, 38, -1, -1, 41, 42, 43, 44, 45, 46, 47, 37, 38, -1, -1, 41, 42, 43, 44, 45, - 273, 47, 59, 60, -1, 62, -1, 124, -1, -1, - -1, 94, -1, 59, 60, -1, 62, 37, -1, -1, - -1, 41, 42, 43, 44, 45, 46, 47, -1, 302, - 303, 304, 305, 306, 307, 308, 309, 94, -1, 59, + 94, 47, 59, 60, -1, 62, -1, -1, -1, -1, + -1, 94, -1, 59, 60, -1, 62, 37, 38, -1, + -1, 41, 42, 43, 44, 45, 46, 47, 37, 38, + 124, -1, 41, 42, 43, 44, 45, 46, 47, 59, 60, 124, 62, -1, -1, -1, -1, -1, 94, -1, - -1, -1, -1, -1, 37, 38, -1, -1, 41, 42, + 59, 60, -1, 62, 37, 38, -1, -1, 41, 42, 43, 44, 45, 46, 47, -1, -1, 124, -1, -1, -1, -1, -1, -1, 94, -1, 59, 60, 124, 62, - 37, 38, -1, -1, 41, 42, 43, 44, 45, 46, - 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 59, 60, 124, 62, 37, 38, -1, -1, - 41, 42, 43, 44, 45, 46, 47, -1, -1, 273, - -1, -1, -1, -1, -1, -1, -1, -1, 59, 60, - -1, 62, -1, -1, -1, -1, -1, 94, -1, -1, - -1, 124, -1, -1, -1, 273, -1, -1, 302, 303, - 304, 305, 306, 307, 308, 309, 273, -1, -1, -1, + -1, -1, 37, -1, -1, 94, 41, 42, 43, 44, + 45, 46, 47, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 59, 60, -1, 62, 257, 258, + -1, 94, -1, 262, 263, 124, -1, -1, -1, -1, + 269, -1, -1, -1, 273, 274, -1, 276, 277, 278, + 279, 280, 281, 282, -1, 284, -1, -1, -1, 94, + -1, 124, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 301, 302, 303, 304, 305, 306, 307, 308, + 309, -1, -1, -1, -1, -1, -1, -1, -1, 124, + -1, -1, -1, -1, -1, -1, 37, 38, -1, 273, + 41, 42, 43, 44, 45, 46, 47, -1, -1, -1, + 273, -1, -1, -1, -1, -1, -1, -1, 59, 60, + -1, 62, -1, -1, -1, -1, -1, -1, 302, 303, + 304, 305, 306, 307, 308, 309, 273, -1, -1, 302, + 303, 304, 305, 306, 307, 308, 309, 273, -1, -1, -1, -1, -1, 94, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 302, 303, 304, 305, 306, 307, - 308, 309, -1, -1, -1, 302, 303, 304, 305, 306, - -1, 308, 309, 124, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 37, 38, - -1, -1, 41, 42, -1, 44, 273, 46, 47, 302, - -1, -1, 305, 306, 307, 308, 309, 273, -1, -1, - 59, 60, -1, 62, -1, -1, -1, -1, -1, -1, - 60, -1, -1, -1, -1, 302, 303, 304, 305, -1, + -1, -1, -1, -1, -1, 302, 303, 304, 305, 306, 307, 308, 309, 273, -1, -1, 302, 303, 304, 305, - 306, 307, 308, 309, -1, 94, -1, -1, -1, -1, - -1, 37, 38, -1, -1, 41, 42, 43, 44, 45, - 46, 47, 302, 303, 304, 305, 306, 307, 308, 309, - 273, -1, -1, 59, 60, 124, 62, -1, -1, -1, - -1, -1, -1, -1, -1, 37, 38, -1, -1, 41, - 42, 43, 44, 45, 46, 47, 273, -1, -1, 302, - 303, 304, 305, 306, 307, 308, 309, 59, 94, -1, - -1, 37, 38, -1, -1, 41, 42, 43, 44, 45, - 46, 47, 273, -1, -1, 302, 303, 304, 305, 306, - 307, 308, 309, 59, 60, -1, 62, -1, 124, 37, - 38, -1, 94, 41, 42, 43, 44, 45, 46, 47, - -1, 302, 303, 304, 305, 306, -1, 308, 309, 38, - -1, 59, 41, -1, 43, 44, 45, 46, 94, -1, - -1, -1, 124, -1, -1, -1, -1, -1, -1, 38, - 59, 60, 41, 62, 43, 44, 45, 46, -1, -1, - -1, -1, -1, -1, -1, -1, 94, -1, 124, -1, - 59, 60, -1, 62, -1, -1, 38, -1, -1, 41, - -1, 43, 44, 45, 46, 94, -1, 257, 258, -1, - -1, -1, 262, -1, 273, -1, 124, 59, 60, 269, - 62, -1, -1, -1, 274, 94, 276, 277, 278, -1, - -1, -1, -1, -1, 284, 124, -1, -1, -1, -1, - -1, 291, -1, 302, 303, 304, 305, 306, 307, 308, - 309, 301, 94, 40, -1, 124, -1, -1, -1, -1, - -1, 37, 38, -1, -1, 41, 42, 43, 44, 45, - 46, 47, 59, 257, 258, -1, -1, 273, 262, 263, - -1, -1, 124, 59, 60, 269, 62, -1, -1, -1, - 274, -1, 276, 277, 278, 279, 280, 281, -1, -1, + 306, 307, 308, 309, 273, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 302, 303, 304, 305, 306, 307, 308, 309, + 273, -1, -1, 302, 303, 304, 305, 306, -1, 308, + 309, -1, -1, -1, -1, 37, 38, -1, -1, 41, + 42, 43, 44, 45, 46, 47, -1, -1, 273, 302, + 303, 304, 305, -1, 307, 308, 309, 59, 60, -1, + 62, -1, -1, 37, 38, -1, -1, 41, 42, 43, + 44, 45, 46, 47, -1, -1, -1, 302, 303, 304, + 305, 306, 307, 308, 309, 59, 60, -1, 62, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 37, 38, -1, -1, 41, 42, -1, 44, -1, + 46, 47, -1, -1, -1, -1, -1, -1, -1, -1, + 94, -1, 124, 59, 60, -1, 62, -1, -1, 37, + 38, -1, -1, 41, 42, 43, 44, 45, 46, 47, + -1, 257, 273, -1, -1, -1, -1, 263, -1, -1, + 124, 59, 60, 269, 62, -1, -1, -1, 94, -1, + 276, 277, 278, -1, -1, 281, -1, -1, 284, -1, + -1, 302, 303, 304, 305, 306, 307, 308, 309, -1, + -1, -1, -1, -1, -1, -1, 94, 61, 124, 37, + 38, -1, -1, 41, 42, 43, 44, 45, 46, 47, + 37, 38, -1, -1, 41, 42, 43, 44, 45, 46, + 47, 59, 60, -1, 62, -1, 124, 91, -1, -1, + -1, -1, 59, 37, 38, -1, -1, 41, 42, 43, + 44, 45, 46, 47, -1, 257, -1, -1, -1, -1, + -1, 263, -1, -1, -1, 59, 94, 269, -1, -1, + -1, -1, -1, -1, 276, 277, 278, 94, -1, 281, + -1, 38, 284, -1, 41, -1, 43, 44, 45, 46, + -1, 273, -1, -1, -1, -1, 124, -1, -1, -1, + 94, -1, 59, 60, -1, 62, -1, 124, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 273, + 302, 303, 304, 305, 306, 307, 308, 309, -1, -1, + 124, -1, -1, -1, -1, -1, -1, 94, 38, -1, + -1, 41, -1, 43, 44, 45, 46, -1, 302, 303, + 304, 305, 306, -1, 308, 309, -1, 273, 38, 59, + 60, 41, 62, 43, 44, 45, 46, 124, -1, -1, + 60, -1, -1, -1, -1, -1, -1, -1, -1, 59, + 60, -1, 62, -1, -1, 273, 302, 303, 304, 305, + 306, 307, 308, 309, 94, -1, -1, -1, -1, -1, + 37, 38, -1, -1, 41, 42, 43, 44, 45, 46, + 47, -1, -1, -1, 94, 303, 304, -1, 306, 307, + 308, 309, 59, 60, 124, 62, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, + -1, -1, -1, -1, 124, 273, -1, 301, -1, -1, + -1, -1, -1, 40, 308, 309, -1, 94, -1, -1, + 314, 315, 316, 317, -1, -1, -1, 321, -1, -1, }; } class yyCheck2 { - protected static final short yyCheck2 [] = { 284, - -1, 40, 257, -1, -1, -1, 303, 304, 263, 306, - 307, 308, 309, -1, 269, -1, 301, 94, -1, -1, - 59, 276, 277, 278, -1, -1, 281, -1, -1, 284, - -1, -1, -1, -1, -1, 123, 273, 125, -1, 302, - -1, -1, 305, 306, 307, 308, 309, 124, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 40, -1, -1, - -1, -1, -1, -1, -1, -1, 303, 304, -1, 306, - 307, 308, 309, -1, -1, -1, 59, -1, -1, -1, - -1, -1, -1, 273, 123, -1, 125, -1, -1, -1, - -1, -1, -1, 302, -1, -1, 305, 306, 307, 308, - 309, -1, 40, 273, -1, -1, -1, -1, -1, -1, - -1, -1, 302, 303, 304, 305, 306, 307, 308, 309, - -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, - 273, -1, 302, 303, 304, 305, 306, 307, 308, 309, - 123, -1, 125, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 40, -1, -1, -1, -1, 302, - 303, 304, 305, 306, 307, 308, 309, -1, -1, -1, - 258, -1, -1, 59, 262, -1, -1, -1, -1, 267, - -1, -1, -1, 271, 272, 123, 274, 125, -1, -1, - -1, -1, -1, -1, -1, 283, 273, -1, 40, 287, + protected static final short yyCheck2 [] = { -1, + -1, 59, -1, -1, 303, 304, -1, 306, 307, 308, + 309, -1, -1, -1, 302, -1, 124, 305, 306, 307, + 308, 309, -1, -1, -1, -1, -1, 40, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 302, -1, -1, + 305, 306, 307, 308, 309, 273, 59, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 123, -1, 125, -1, -1, + -1, -1, -1, -1, 302, 303, 304, 305, 306, 307, + 308, 309, -1, -1, 40, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 257, 258, -1, -1, + -1, 262, 273, 59, -1, -1, -1, -1, 269, -1, + 123, -1, 125, 274, -1, 276, 277, 278, -1, -1, + -1, -1, 273, 284, -1, -1, -1, -1, -1, -1, + 291, 302, 303, 304, 305, 306, 307, 308, 309, -1, + 301, 40, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 302, 303, 304, 305, 306, 307, 308, 309, -1, + 59, -1, -1, -1, -1, 273, -1, 123, -1, 125, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, + -1, -1, -1, -1, 302, 303, 304, 305, 306, 307, + 258, -1, -1, -1, 262, 59, -1, -1, -1, 267, + -1, -1, -1, 271, 272, -1, 274, -1, -1, -1, + -1, -1, -1, -1, 123, 283, 125, -1, -1, 287, -1, -1, -1, -1, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 301, -1, -1, -1, 59, -1, 258, - 308, 309, -1, 262, -1, 302, 303, 304, 305, 306, - 307, -1, 271, 272, -1, 274, -1, 123, -1, 125, - -1, -1, -1, -1, 283, -1, 40, -1, 287, -1, + 298, 299, 300, 301, -1, 258, -1, 40, -1, 262, + 308, 309, -1, -1, -1, -1, -1, -1, 271, 272, + -1, 274, -1, -1, -1, -1, 59, 427, 428, 123, + 283, 125, -1, -1, 287, -1, -1, -1, 438, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, + -1, 40, -1, -1, -1, 308, 309, 457, 458, -1, + 460, -1, 258, -1, -1, 465, 262, -1, -1, 469, + 59, 471, 472, -1, -1, 271, 272, -1, 274, -1, + 480, 481, 482, -1, -1, -1, 486, 283, -1, -1, + 123, 287, 125, -1, -1, -1, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, -1, 40, -1, -1, + -1, -1, 308, 309, -1, -1, 60, -1, -1, 258, + -1, -1, -1, 262, -1, -1, 59, -1, -1, -1, + -1, -1, 271, 272, 123, 274, 125, -1, -1, -1, + -1, -1, -1, -1, 283, -1, -1, 40, 287, -1, -1, -1, -1, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, -1, -1, 59, -1, -1, -1, 308, - 309, -1, -1, -1, -1, 258, -1, -1, -1, 262, - -1, 123, -1, 125, -1, -1, 40, -1, 271, 272, - -1, 274, -1, -1, -1, -1, -1, -1, -1, -1, - 283, -1, -1, -1, 287, 59, -1, -1, -1, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 301, 40, - 258, -1, -1, -1, 262, 308, 309, -1, -1, 123, - -1, 125, -1, 271, 272, -1, 274, -1, 59, -1, - -1, -1, -1, -1, -1, 283, -1, -1, -1, 287, - -1, -1, -1, -1, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 301, -1, -1, -1, -1, -1, 123, - 308, 309, 258, -1, -1, -1, 262, 44, -1, -1, - -1, -1, -1, -1, -1, 271, 272, -1, 274, -1, - -1, -1, -1, -1, -1, 62, -1, 283, -1, -1, - -1, 287, 123, -1, -1, -1, 292, 293, 294, 295, - 296, 297, 298, 299, 300, 301, 258, -1, -1, -1, - 262, 60, 308, 309, -1, -1, -1, -1, -1, 271, - 272, -1, 274, -1, -1, -1, -1, -1, -1, -1, - -1, 283, -1, -1, -1, 287, -1, -1, -1, -1, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, - -1, 60, -1, -1, 258, -1, 308, 309, 262, -1, - -1, -1, -1, -1, -1, -1, -1, 271, 272, -1, - 274, -1, -1, -1, -1, -1, 125, -1, -1, 283, - -1, 60, -1, 287, -1, -1, -1, -1, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 301, -1, -1, - -1, -1, -1, -1, 308, 309, -1, 271, 272, 60, - -1, -1, -1, -1, -1, -1, 125, -1, -1, 283, - -1, -1, -1, 287, -1, -1, -1, -1, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 301, -1, 60, - 271, 272, -1, -1, 308, 309, 125, -1, -1, -1, - -1, -1, 283, -1, -1, -1, 287, -1, -1, -1, - -1, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 301, -1, -1, -1, 125, -1, -1, 308, 309, -1, - 257, 258, -1, -1, -1, 262, 263, -1, -1, -1, - -1, -1, 269, -1, -1, -1, -1, 274, -1, 276, - 277, 278, 279, 280, 281, -1, -1, 284, 257, 258, - -1, -1, -1, 262, -1, -1, -1, -1, -1, -1, - 269, -1, -1, -1, 301, 274, -1, 276, 277, 278, - -1, -1, -1, -1, -1, 284, -1, -1, -1, -1, - -1, -1, 291, -1, -1, -1, -1, -1, 257, 258, - -1, -1, 301, 262, -1, 88, -1, -1, -1, 92, - 269, -1, -1, -1, -1, 274, -1, 276, 277, 278, - -1, -1, 105, 106, -1, 284, -1, -1, 257, 258, - -1, -1, 291, 262, -1, -1, -1, -1, -1, -1, - 269, 124, 301, 126, 127, 274, -1, 276, 277, 278, - -1, -1, -1, -1, -1, 284, 257, 258, -1, -1, - -1, 262, 291, -1, 147, -1, 149, -1, 269, -1, - -1, -1, 301, 274, -1, 276, 277, 278, -1, -1, - -1, -1, 165, 284, -1, 168, 257, 258, -1, -1, - 291, 262, -1, -1, 177, -1, 179, -1, 269, -1, - 301, 420, 421, 274, -1, 276, 277, 278, -1, -1, - -1, -1, 431, 284, -1, -1, -1, -1, -1, -1, - 291, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 301, 450, 451, -1, 453, -1, -1, -1, -1, 458, - -1, -1, -1, 462, -1, 464, 465, -1, -1, -1, - -1, -1, -1, -1, 473, 474, 475, -1, -1, -1, - 479, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 299, 300, 301, -1, 258, -1, 59, -1, 262, 308, + 309, -1, -1, -1, -1, -1, -1, 271, 272, -1, + 274, 125, -1, -1, -1, -1, -1, -1, -1, 283, + 123, -1, -1, 287, -1, -1, -1, -1, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, -1, 90, + -1, -1, 60, 94, 308, 309, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 258, 107, 108, -1, 262, + 123, -1, -1, -1, -1, -1, -1, -1, 271, 272, + -1, 274, -1, -1, -1, 126, -1, 128, 129, -1, + 283, -1, 60, -1, 287, -1, -1, -1, -1, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, 258, + 151, -1, 153, 262, -1, 308, 309, 125, -1, -1, + 60, -1, 271, 272, -1, 274, -1, -1, 169, -1, + -1, 172, -1, -1, 283, -1, -1, -1, 287, -1, + 181, -1, 183, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, 257, 258, 60, -1, 125, 262, 308, + 309, -1, -1, -1, -1, 269, -1, -1, -1, -1, + 274, -1, 276, 277, 278, -1, -1, -1, 271, 272, + 284, -1, -1, -1, -1, -1, -1, 291, -1, -1, + 283, -1, -1, -1, 287, -1, -1, 301, -1, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, -1, + -1, -1, -1, -1, -1, 308, 309, -1, 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 283, -1, -1, -1, 287, -1, -1, -1, -1, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, 257, + 258, -1, -1, -1, 262, 308, 309, -1, 299, 300, + -1, 269, -1, -1, -1, -1, 274, -1, 276, 277, + 278, -1, -1, -1, -1, -1, 284, -1, -1, -1, + -1, -1, -1, 291, -1, -1, -1, -1, -1, 257, + 258, -1, -1, 301, 262, -1, -1, -1, -1, -1, + -1, 269, -1, -1, -1, -1, 274, -1, 276, 277, + 278, -1, -1, -1, -1, -1, 284, 257, 258, -1, + -1, -1, 262, 291, -1, -1, -1, -1, -1, 269, + -1, -1, -1, 301, 274, -1, 276, 277, 278, -1, + -1, -1, -1, -1, 284, -1, -1, -1, -1, -1, + -1, 291, 257, 258, -1, -1, -1, 262, -1, -1, + -1, 301, -1, -1, 269, -1, -1, -1, -1, 274, + -1, 276, 277, 278, -1, -1, -1, -1, -1, 284, + -1, -1, 257, 258, -1, -1, 291, 262, 263, -1, + -1, -1, -1, -1, 269, -1, 301, -1, -1, 274, + -1, 276, 277, 278, 279, 280, 281, -1, -1, 284, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 292, - 293, + -1, -1, -1, -1, -1, -1, 301, }; } class yyCheckInit { - static short[] yyCheck = new short[2874]; + static short[] yyCheck = new short[2830]; protected static void yyCheckInit () { int numyycheck; int yyCheckerun = 0; for (numyycheck = 0; numyycheck <= 1000; numyycheck++) { - if (yyCheckerun < 2874) { + if (yyCheckerun < 2830) { yyCheck[yyCheckerun] = yyCheck0.yyCheck0[numyycheck]; yyCheckerun++; } } for (numyycheck = 0; numyycheck <= 1000; numyycheck++) { - if (yyCheckerun < 2874) { + if (yyCheckerun < 2830) { yyCheck[yyCheckerun] = yyCheck1.yyCheck1[numyycheck]; yyCheckerun++; } } for (numyycheck = 0; numyycheck <= 1000; numyycheck++) { - if (yyCheckerun < 2874) { + if (yyCheckerun < 2830) { yyCheck[yyCheckerun] = yyCheck2.yyCheck2[numyycheck]; yyCheckerun++; } diff --git a/src/mycompiler/myparser/JavaParser.jay b/src/mycompiler/myparser/JavaParser.jay index 120563f0..851e8e65 100755 --- a/src/mycompiler/myparser/JavaParser.jay +++ b/src/mycompiler/myparser/JavaParser.jay @@ -810,11 +810,22 @@ typelist : type $1.add($3); $$=$1; } + | typelist ',' wildcardparameter + { + $1.add($3); + $$=$1; + } + | wildcardparameter + { + Vector tl = new Vector(); + tl.add($1); + $$ = tl; + } /* PL 05-07-28 erg�nzt, weil jeder classorinterfacetype auch parametrisiert sein kann */ //TODO: Das hier ist möglicherweise falsch. Ein Typ hat keine parameterliste, nur eine Liste von RefTypes parameter : { $$ = null; } - | '<'typelist'>'//'<'paralist'>'//typelist statt + | '<' typelist '>' //'<'paralist'>'//typelist statt { $$ = $2; } diff --git a/src/mycompiler/mytype/ParaList.java b/src/mycompiler/mytype/ParaList.java index b886ce90..2ea154bb 100755 --- a/src/mycompiler/mytype/ParaList.java +++ b/src/mycompiler/mytype/ParaList.java @@ -11,12 +11,12 @@ import org.apache.log4j.Logger; // ino.class.ParaList.26591.declaration -public class ParaList +public class ParaList extends Vector // ino.end // ino.class.ParaList.26591.body { // ino.attribute.paralist.26594.declaration - protected Vector paralist = new Vector(); + //protected Vector paralist = new Vector(); // ino.end // ino.attribute.parserlog.26597.declaration protected static Logger parserlog = Logger.getLogger("parser"); @@ -33,7 +33,7 @@ public class ParaList // ino.method.ParaList.26603.body { parserlog.debug( "ParaList: " + t ); - this.paralist.addElement(t); + this.addElement(t); } // ino.end @@ -42,7 +42,7 @@ public class ParaList // ino.end // ino.method.get_ParaList.26606.body { - return this.paralist; + return this; } // ino.end @@ -51,7 +51,7 @@ public class ParaList // ino.end // ino.method.add_ParaList.26609.body { - this.paralist.addElement(obj); + this.addElement(obj); parserlog.debug("ParaList: " + obj); } // ino.end @@ -61,7 +61,7 @@ public class ParaList // ino.end // ino.method.get_firstElement.26612.body { - return paralist.firstElement(); + return firstElement(); } // ino.end // ino.method.getParalist.26615.definition @@ -69,7 +69,7 @@ public class ParaList // ino.end // ino.method.getParalist.26615.body { - return paralist; + return this; } // ino.end // ino.method.setParalist.26618.definition @@ -77,7 +77,8 @@ public class ParaList // ino.end // ino.method.setParalist.26618.body { - this.paralist = paralist; + this.removeAllElements(); + this.addAll(paralist); } // ino.end } From e7034f82ce4ca468cf62abfa46c29d38398cf145 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Mon, 11 Aug 2014 14:35:33 +0200 Subject: [PATCH 12/31] Kleine Verbesserungen --- src/mycompiler/SourceFile.java | 4 +-- src/mycompiler/myoperator/AddOp.java | 10 ++++---- src/mycompiler/myoperator/LogOp.java | 2 +- src/mycompiler/myoperator/MulOp.java | 8 +++--- src/mycompiler/myoperator/RelOp.java | 8 +++--- src/mycompiler/mystatement/BoolLiteral.java | 2 +- src/mycompiler/mystatement/DoubleLiteral.java | 2 +- src/mycompiler/mystatement/IfStmt.java | 2 +- src/mycompiler/mystatement/IntLiteral.java | 2 +- src/mycompiler/mystatement/LocalVarDecl.java | 2 +- src/mycompiler/mystatement/NewClass.java | 2 +- src/mycompiler/mystatement/StringLiteral.java | 2 +- src/mycompiler/mystatement/WhileStmt.java | 2 +- .../mytype/BoundedGenericTypeVar.java | 4 +-- src/mycompiler/mytype/Type.java | 2 +- .../assumptions/TypeAssumptions.java | 5 ++-- .../exceptions/TypeinferenceException.java | 1 + .../TypeInsertTests/LambdaTest22.jav | 25 +++++++++++++++++++ .../TypeInsertTests/LambdaTest22.java | 16 ++++++++++++ .../TypeInsertTests/RelOpTest.jav | 3 +++ .../TypeInsertTests/RelOpTest.java | 16 ++++++++++++ 21 files changed, 91 insertions(+), 29 deletions(-) create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest22.jav create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest22.java create mode 100644 test/plugindevelopment/TypeInsertTests/RelOpTest.jav create mode 100644 test/plugindevelopment/TypeInsertTests/RelOpTest.java diff --git a/src/mycompiler/SourceFile.java b/src/mycompiler/SourceFile.java index 2697eb23..dca19a11 100755 --- a/src/mycompiler/SourceFile.java +++ b/src/mycompiler/SourceFile.java @@ -737,7 +737,7 @@ public class SourceFile if(t!=null && (t instanceof RefType)&& !(t instanceof mycompiler.mytype.Void)){ Type replaceType = null; - replaceType = globalAssumptions.getTypeFor((RefType)t); + replaceType = globalAssumptions.getTypeFor((RefType)t, null); if(!(replaceType == null))p.TA1 = replaceType; } t = p.TA2; @@ -745,7 +745,7 @@ public class SourceFile if(t!=null && (t instanceof RefType)&& !(t instanceof mycompiler.mytype.Void)){ Type replaceType = null; - replaceType = globalAssumptions.getTypeFor((RefType)t); + replaceType = globalAssumptions.getTypeFor((RefType)t, null); if(!(replaceType == null))p.TA2 = replaceType; } } diff --git a/src/mycompiler/myoperator/AddOp.java b/src/mycompiler/myoperator/AddOp.java index e8176742..c472c504 100755 --- a/src/mycompiler/myoperator/AddOp.java +++ b/src/mycompiler/myoperator/AddOp.java @@ -67,11 +67,11 @@ public abstract class AddOp extends Operator @Override public HashMap getReturnTypes(TypeAssumptions ass) { HashMap ret = new HashMap(); - ret.put(ass.getTypeFor(new RefType("java.lang.Integer",-1)), ass.getTypeFor(new RefType("java.lang.Integer",-1))); - ret.put(ass.getTypeFor(new RefType("java.lang.Double",-1)), ass.getTypeFor(new RefType("java.lang.Double",-1))); - ret.put(ass.getTypeFor(new RefType("java.lang.Float",-1)), ass.getTypeFor(new RefType("java.lang.Float",-1))); - ret.put(ass.getTypeFor(new RefType("java.lang.Long",-1)), ass.getTypeFor(new RefType("java.lang.Long",-1))); - ret.put(ass.getTypeFor(new RefType("java.lang.String",-1)), ass.getTypeFor(new RefType("java.lang.String",-1))); + ret.put(ass.getTypeFor(new RefType("java.lang.Integer",-1), this), ass.getTypeFor(new RefType("java.lang.Integer",-1),this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Double",-1), this), ass.getTypeFor(new RefType("java.lang.Double",-1),this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Float",-1), this), ass.getTypeFor(new RefType("java.lang.Float",-1),this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Long",-1), this), ass.getTypeFor(new RefType("java.lang.Long",-1),this)); + ret.put(ass.getTypeFor(new RefType("java.lang.String",-1),this), ass.getTypeFor(new RefType("java.lang.String",-1),this)); return ret; } diff --git a/src/mycompiler/myoperator/LogOp.java b/src/mycompiler/myoperator/LogOp.java index c59fc4c8..13a52c99 100755 --- a/src/mycompiler/myoperator/LogOp.java +++ b/src/mycompiler/myoperator/LogOp.java @@ -237,7 +237,7 @@ public abstract class LogOp extends Operator @Override public HashMap getReturnTypes(TypeAssumptions ass) { HashMap ret = new HashMap(); - ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1)), ass.getTypeFor(new RefType("java.lang.Boolean",-1))); + ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Boolean",-1), this)); return ret; } diff --git a/src/mycompiler/myoperator/MulOp.java b/src/mycompiler/myoperator/MulOp.java index 8781b4a6..40d160f3 100755 --- a/src/mycompiler/myoperator/MulOp.java +++ b/src/mycompiler/myoperator/MulOp.java @@ -48,10 +48,10 @@ public abstract class MulOp extends Operator @Override public HashMap getReturnTypes(TypeAssumptions ass) { HashMap ret = new HashMap(); - ret.put(ass.getTypeFor(new RefType("java.lang.Integer",-1)), ass.getTypeFor(new RefType("java.lang.Integer",-1))); - ret.put(ass.getTypeFor(new RefType("java.lang.Double",-1)), ass.getTypeFor(new RefType("java.lang.Double",-1))); - ret.put(ass.getTypeFor(new RefType("java.lang.Float",-1)), ass.getTypeFor(new RefType("java.lang.Float",-1))); - ret.put(ass.getTypeFor(new RefType("java.lang.Long",-1)), ass.getTypeFor(new RefType("java.lang.Long",-1))); + ret.put(ass.getTypeFor(new RefType("java.lang.Integer",-1), this), ass.getTypeFor(new RefType("java.lang.Integer",-1), this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Double",-1), this), ass.getTypeFor(new RefType("java.lang.Double",-1), this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Float",-1), this), ass.getTypeFor(new RefType("java.lang.Float",-1), this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Long",-1), this), ass.getTypeFor(new RefType("java.lang.Long",-1), this)); return ret; } diff --git a/src/mycompiler/myoperator/RelOp.java b/src/mycompiler/myoperator/RelOp.java index aa5f54b2..1b9e9f24 100755 --- a/src/mycompiler/myoperator/RelOp.java +++ b/src/mycompiler/myoperator/RelOp.java @@ -60,10 +60,10 @@ public abstract class RelOp extends Operator @Override public HashMap getReturnTypes(TypeAssumptions ass) { HashMap ret = new HashMap(); - ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1)), ass.getTypeFor(new RefType("java.lang.Integer",-1))); - ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1)), ass.getTypeFor(new RefType("java.lang.Double",-1))); - ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1)), ass.getTypeFor(new RefType("java.lang.Float",-1))); - ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1)), ass.getTypeFor(new RefType("java.lang.Long",-1))); + ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Integer",-1), this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Double",-1), this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Float",-1), this)); + ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Long",-1), this)); return ret; } diff --git a/src/mycompiler/mystatement/BoolLiteral.java b/src/mycompiler/mystatement/BoolLiteral.java index 7c4c9a37..bdc1bb79 100755 --- a/src/mycompiler/mystatement/BoolLiteral.java +++ b/src/mycompiler/mystatement/BoolLiteral.java @@ -180,7 +180,7 @@ public class BoolLiteral extends Literal @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { - this.type = assumptions.getTypeFor(new RefType("java.lang.Boolean",-1)); + this.type = assumptions.getTypeFor(new RefType("java.lang.Boolean",-1), this); return new ConstraintsSet(); } diff --git a/src/mycompiler/mystatement/DoubleLiteral.java b/src/mycompiler/mystatement/DoubleLiteral.java index 7a80f1c1..b3188d7a 100755 --- a/src/mycompiler/mystatement/DoubleLiteral.java +++ b/src/mycompiler/mystatement/DoubleLiteral.java @@ -205,7 +205,7 @@ public class DoubleLiteral extends Literal @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { - this.setType(assumptions.getTypeFor(new RefType("Double",this.getOffset()))); + this.setType(assumptions.getTypeFor(new RefType("Double",this.getOffset()), this)); return new ConstraintsSet(); } diff --git a/src/mycompiler/mystatement/IfStmt.java b/src/mycompiler/mystatement/IfStmt.java index 202cb6d1..421323af 100755 --- a/src/mycompiler/mystatement/IfStmt.java +++ b/src/mycompiler/mystatement/IfStmt.java @@ -389,7 +389,7 @@ public class IfStmt extends Statement ret.add(this.else_block.TYPEStmt(assumptions)); if(!(else_block.getType() instanceof Void))ret.add(new SingleConstraint(else_block.getType(),this.getType())); } - ret.add(new SingleConstraint(expr.getType(),assumptions.getTypeFor(new RefType("Boolean",0)))); //(expressionDesIfStmt)<.boolean + ret.add(new SingleConstraint(expr.getType(),assumptions.getTypeFor(new RefType("Boolean",0), this))); //(expressionDesIfStmt)<.boolean if(!(then_block.getType() instanceof Void))ret.add(new SingleConstraint(then_block.getType(),this.getType())); if(then_block.getType() instanceof Void && (else_block == null || else_block.getType() instanceof Void))this.setType(new Void(this.getOffset())); diff --git a/src/mycompiler/mystatement/IntLiteral.java b/src/mycompiler/mystatement/IntLiteral.java index 4a71809d..4b486986 100755 --- a/src/mycompiler/mystatement/IntLiteral.java +++ b/src/mycompiler/mystatement/IntLiteral.java @@ -207,7 +207,7 @@ public class IntLiteral extends Literal public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { ConstraintsSet ret = new ConstraintsSet(); //this.setType(new IntegerType()); - this.set_Type(assumptions.getTypeFor(new RefType("java.lang.Integer",-1))); + this.set_Type(assumptions.getTypeFor(new RefType("java.lang.Integer",-1), this)); return ret; } diff --git a/src/mycompiler/mystatement/LocalVarDecl.java b/src/mycompiler/mystatement/LocalVarDecl.java index bbf420e6..76b19cd6 100755 --- a/src/mycompiler/mystatement/LocalVarDecl.java +++ b/src/mycompiler/mystatement/LocalVarDecl.java @@ -470,7 +470,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable ConstraintsSet ret = new ConstraintsSet(); if((this.getType() instanceof RefType)){ Type replaceType = null; - replaceType = assumptions.getTypeFor((RefType)this.getType()); + replaceType = assumptions.getTypeFor((RefType)this.getType(), this); if(replaceType == null) throw new TypeinferenceException("Der Typ "+this.getType().getName()+" ist nicht korrekt",this); this.setType(replaceType); diff --git a/src/mycompiler/mystatement/NewClass.java b/src/mycompiler/mystatement/NewClass.java index dddfb35d..9f250fff 100755 --- a/src/mycompiler/mystatement/NewClass.java +++ b/src/mycompiler/mystatement/NewClass.java @@ -255,7 +255,7 @@ public class NewClass extends Expr // ret.add(arg.TYPEExpr(assumptions)); //} - this.setType(assumptions.getTypeFor(new RefType(this.get_Name(),0))); + this.setType(assumptions.getTypeFor(new RefType(this.get_Name(),0), this)); /* diff --git a/src/mycompiler/mystatement/StringLiteral.java b/src/mycompiler/mystatement/StringLiteral.java index 247f8483..9e56bc8a 100755 --- a/src/mycompiler/mystatement/StringLiteral.java +++ b/src/mycompiler/mystatement/StringLiteral.java @@ -139,7 +139,7 @@ public class StringLiteral extends Literal @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { - this.set_Type(assumptions.getTypeFor(new RefType("String",0))); + this.set_Type(assumptions.getTypeFor(new RefType("String",0), this)); if(this.getType() == null)throw new TypeinferenceException("java.lang.String nicht importiert",this); return new ConstraintsSet(); } diff --git a/src/mycompiler/mystatement/WhileStmt.java b/src/mycompiler/mystatement/WhileStmt.java index aa382447..ee4e880d 100755 --- a/src/mycompiler/mystatement/WhileStmt.java +++ b/src/mycompiler/mystatement/WhileStmt.java @@ -182,7 +182,7 @@ public class WhileStmt extends Statement public ConstraintsSet TYPEStmt(TypeAssumptions assumptions) { ConstraintsSet ret = new ConstraintsSet(); ret.add(expr.TYPEExpr(assumptions)); - SingleConstraint exprMustBeBool = new SingleConstraint(expr.getType(), assumptions.getTypeFor(new RefType("Boolean", 0))); // while(expr){}; expr <. boolean + SingleConstraint exprMustBeBool = new SingleConstraint(expr.getType(), assumptions.getTypeFor(new RefType("Boolean", 0), this)); // while(expr){}; expr <. boolean ret.add(exprMustBeBool); ret.add(this.loop_block.TYPEStmt(assumptions)); this.setType(loop_block.getType()); diff --git a/src/mycompiler/mytype/BoundedGenericTypeVar.java b/src/mycompiler/mytype/BoundedGenericTypeVar.java index fee474b7..80632722 100755 --- a/src/mycompiler/mytype/BoundedGenericTypeVar.java +++ b/src/mycompiler/mytype/BoundedGenericTypeVar.java @@ -89,9 +89,9 @@ public class BoundedGenericTypeVar extends GenericTypeVar //Die Type methode der BoundedGenericTypeVar schreibt zusätzlich noch die Constraints für die bounds if(this.bounds != null){ for(Type ev : this.bounds){ - Type extendsType = ass.getTypeFor(ev); + Type extendsType = ass.getTypeFor(ev, this); if(extendsType == null)throw new TypeinferenceException("Der Typ "+ev.getName()+" ist nicht korrekt", this); - ret.add(new SingleConstraint(ass.getTypeFor(this), extendsType )); + ret.add(new SingleConstraint(ass.getTypeFor(this, this), extendsType )); } } return ret; diff --git a/src/mycompiler/mytype/Type.java b/src/mycompiler/mytype/Type.java index e95ed21e..d5f7dcc0 100755 --- a/src/mycompiler/mytype/Type.java +++ b/src/mycompiler/mytype/Type.java @@ -286,7 +286,7 @@ public class Type implements IItemWithOffset * @param ass - Die Assumptions für den jeweiligen Kontext in dem sich der Typ befindet. */ public Type checkType(TypeAssumptions ass, IItemWithOffset parent){ - Type t = ass.getTypeFor(this); + Type t = ass.getTypeFor(this, this); if(t==null) throw new TypeinferenceException("Der Typ "+this.getName()+" ist nicht korrekt", parent); return t; diff --git a/src/typinferenz/assumptions/TypeAssumptions.java b/src/typinferenz/assumptions/TypeAssumptions.java index 1509f6ed..618725f0 100755 --- a/src/typinferenz/assumptions/TypeAssumptions.java +++ b/src/typinferenz/assumptions/TypeAssumptions.java @@ -295,7 +295,7 @@ public class TypeAssumptions { * @param t * @return null, falls der Typ nicht vorhanden ist. */ - public Type getTypeFor(Type t){ + public Type getTypeFor(Type t, IItemWithOffset inNode){ if(t instanceof TypePlaceholder) return t; //Handelt es sich um einen TypePlaceholder kann dieser nicht in den Assumptions vorkommen. @@ -327,7 +327,8 @@ public class TypeAssumptions { if(ass.getIdentifier().equals(t.getName()))return ass.getAssumedType(); } - return null; + //return null; + throw new TypeinferenceException("Der Typ "+t.getName()+" ist nicht korrekt",inNode); } /** diff --git a/src/typinferenz/exceptions/TypeinferenceException.java b/src/typinferenz/exceptions/TypeinferenceException.java index ef5d6c6f..2fe6897e 100755 --- a/src/typinferenz/exceptions/TypeinferenceException.java +++ b/src/typinferenz/exceptions/TypeinferenceException.java @@ -21,6 +21,7 @@ public class TypeinferenceException extends RuntimeException { { super(message); this.message=message; + if(problemSource == null)throw new DebugException("TypinferenzException ohne Offset: "+this.message); this.offset=problemSource.getOffset(); } diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest22.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest22.jav new file mode 100644 index 00000000..e0d9849a --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest22.jav @@ -0,0 +1,25 @@ +import java.util.Vector; + +class Matrix extends Vector> { + + mvmul(Test v) { + i; + ele; + v.add(i); + return this; + } +} + +class Test{ + +void add(Integer i){ + +} + +elementAt(Integer i){ +return 1; +} +size(){ +return 1; +} +} \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest22.java b/test/plugindevelopment/TypeInsertTests/LambdaTest22.java new file mode 100644 index 00000000..569bfb2f --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest22.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class LambdaTest22 { + private static final String TEST_FILE = "LambdaTest22.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + mustContain.add("TestIfStmt var"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} diff --git a/test/plugindevelopment/TypeInsertTests/RelOpTest.jav b/test/plugindevelopment/TypeInsertTests/RelOpTest.jav new file mode 100644 index 00000000..a481747d --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/RelOpTest.jav @@ -0,0 +1,3 @@ +class RelOpTest{ + i = 1 < 1; +} \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/RelOpTest.java b/test/plugindevelopment/TypeInsertTests/RelOpTest.java new file mode 100644 index 00000000..76e264c0 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/RelOpTest.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class RelOpTest { + private static final String TEST_FILE = "RelOpTest.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + mustContain.add("Boolean i"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} From d39aecff4dde339e5db47cd31a1499666c520cd1 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 14 Aug 2014 12:25:58 +0200 Subject: [PATCH 13/31] PrintJavaCode in PostIncExpr fixed --- src/mycompiler/mystatement/PostIncExpr.java | 6 ++- src/mycompiler/mytype/RefType.java | 1 + .../TypeInsertTests/LambdaTest22.jav | 48 +++++++++++-------- 3 files changed, 34 insertions(+), 21 deletions(-) diff --git a/src/mycompiler/mystatement/PostIncExpr.java b/src/mycompiler/mystatement/PostIncExpr.java index ae6ddbf5..65e3e726 100755 --- a/src/mycompiler/mystatement/PostIncExpr.java +++ b/src/mycompiler/mystatement/PostIncExpr.java @@ -180,8 +180,10 @@ public class PostIncExpr extends UnaryExpr @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { - // TODO Auto-generated method stub - return null; + JavaCodeResult ret = new JavaCodeResult(); + ret.attach(this.expr.printJavaCode(resultSet)); + ret.attach("++"); + return ret; } @Override diff --git a/src/mycompiler/mytype/RefType.java b/src/mycompiler/mytype/RefType.java index 72810d73..6cc1a93a 100755 --- a/src/mycompiler/mytype/RefType.java +++ b/src/mycompiler/mytype/RefType.java @@ -91,6 +91,7 @@ public class RefType extends Type implements IMatchable @Override public int hashCode() { int hash = 0; + hash += super.hashCode(); hash += this.name.hashCode();//Nur den Name hashen. Sorgt für langsame, aber funktionierende HashMaps return hash; } diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest22.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest22.jav index e0d9849a..001e3d5b 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest22.jav +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest22.jav @@ -2,24 +2,34 @@ import java.util.Vector; class Matrix extends Vector> { - mvmul(Test v) { - i; - ele; - v.add(i); - return this; + Matrix mul(m){ + Vector> ret; + ret = new Matrix(); + i; + i = 0; + while(i < this.size()) { + v1; + v2; + v1 = this.elementAt(i); + v2 = new Vector(); + j; + j = 0; + while(j < v1.size()) { + erg; + erg = 0; + k; + k = 0; + while(k < v1.size()) { + erg = erg + v1.elementAt(k).intValue() * m.elementAt(k).elementAt(j).intValue(); + k++; + } + v2.addElement(new Integer(erg)); + j++; + } + ret.addElement(v2); + i++; + } + return ret; } -} - -class Test{ - -void add(Integer i){ - -} - -elementAt(Integer i){ -return 1; -} -size(){ -return 1; -} + } \ No newline at end of file From bd74b245004a83ab000c2bb1a69f6949c02d4838 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 28 Aug 2014 18:42:40 +0200 Subject: [PATCH 14/31] Fehler beseitigt --- bin/.gitignore | 8 ++--- src/mycompiler/SourceFile.java | 11 ++++-- src/mycompiler/myclass/FieldDeclaration.java | 3 +- src/mycompiler/mystatement/PostIncExpr.java | 34 +++++++++++++++++-- src/typinferenz/assumptions/Assumption.java | 5 +-- .../assumptions/FieldAssumption.java | 5 +-- .../assumptions/GenericVarAssumption.java | 5 +-- .../assumptions/TypeAssumptions.java | 1 + .../MartinTestCases/BoundedType1.jav | 2 +- .../MartinTestCases/BoundedType2.jav | 2 +- .../MartinTestCases/Plus1_Float_Double.jav | 2 +- .../MartinTestCases/Tester.java | 4 +-- 12 files changed, 61 insertions(+), 21 deletions(-) diff --git a/bin/.gitignore b/bin/.gitignore index 5774d208..acd086ea 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,8 +1,8 @@ -/mycompiler -/typinferenz -/userinterface -/bytecode /myJvmDisassembler +/mycompiler /parser /plugindevelopment /syntaxTree +/typinferenz +/userinterface +/bytecode diff --git a/src/mycompiler/SourceFile.java b/src/mycompiler/SourceFile.java index dca19a11..1a4f2685 100755 --- a/src/mycompiler/SourceFile.java +++ b/src/mycompiler/SourceFile.java @@ -16,6 +16,7 @@ import mycompiler.myclass.Class; import mycompiler.myclass.Constructor; import mycompiler.myclass.Field; import mycompiler.myclass.FieldDeclaration; +import mycompiler.myclass.FormalParameter; import mycompiler.myclass.ImportDeclarations; import mycompiler.myclass.UsedId; import mycompiler.myexception.CTypeReconstructionException; @@ -1216,16 +1217,21 @@ public class SourceFile for(int j=0;j(),null); + ParameterList paraList = new ParameterList(); for(int k=0;k())); } //basicAssumptions.addMethodIntersectionType(new CIntersectionType(constructor)); Method constructorMethod = mycompiler.myclass.Method.createEmptyMethod(methodName, parentClass); + constructorMethod.parameterlist = paraList; parentClass.addField(new Constructor(constructorMethod)); } } @@ -1234,7 +1240,6 @@ public class SourceFile basicAssumptions.addClassAssumption(new ClassAssumption(parentClass)); imports.removeElement(importDecl); doneImports.addElement(importDecl); - } imports.addAll(doneImports); return basicAssumptions; diff --git a/src/mycompiler/myclass/FieldDeclaration.java b/src/mycompiler/myclass/FieldDeclaration.java index 694c9e35..91ef8382 100644 --- a/src/mycompiler/myclass/FieldDeclaration.java +++ b/src/mycompiler/myclass/FieldDeclaration.java @@ -128,7 +128,8 @@ public class FieldDeclaration extends Field{ } @Override public ConstraintsSet TYPE(TypeAssumptions publicAssumptions) { - if(this.wert == null)throw new TypeinferenceException("Typlose Felder müssen mit Wert initialisiert werden", this); + if(this.wert == null && (this.getType() == null || this.getType() instanceof TypePlaceholder)) + throw new TypeinferenceException("Typlose Felder müssen mit Wert initialisiert werden", this); ConstraintsSet ret = new ConstraintsSet(); TypeAssumptions localAssumptions = publicAssumptions.clone(); diff --git a/src/mycompiler/mystatement/PostIncExpr.java b/src/mycompiler/mystatement/PostIncExpr.java index 65e3e726..69d520b5 100755 --- a/src/mycompiler/mystatement/PostIncExpr.java +++ b/src/mycompiler/mystatement/PostIncExpr.java @@ -19,6 +19,7 @@ import mycompiler.mytype.GenericTypeVar; import mycompiler.mytype.Pair; import mycompiler.mytype.RefType; import mycompiler.mytype.Type; +import mycompiler.mytype.TypePlaceholder; import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; @@ -33,9 +34,14 @@ import org.apache.log4j.Logger; + + + import typinferenz.ConstraintsSet; import typinferenz.JavaCodeResult; +import typinferenz.OderConstraint; import typinferenz.ResultSet; +import typinferenz.UndConstraint; import typinferenz.assumptions.TypeAssumptions; @@ -172,10 +178,34 @@ public class PostIncExpr extends UnaryExpr expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); } + private Vector getNumericTypes(){ + Vector ret = new Vector<>(); + ret.add(new RefType("Integer",-1)); + ret.add(new RefType("Long",-1)); + ret.add(new RefType("Double",-1)); + return ret ; + } + @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { - // TODO Auto-generated method stub - return null; + if(this.getType() == null)this.setType(TypePlaceholder.fresh(this)); + ConstraintsSet ret = new ConstraintsSet(); + OderConstraint oderConstraint = new OderConstraint(); + ret.add(this.expr.TYPEExpr(assumptions)); + for(RefType t : getNumericTypes()){ + UndConstraint undConstraint = new UndConstraint(); + undConstraint.addConstraint(this.getType(), t); + undConstraint.addConstraint(this.expr.getType(), t); + + oderConstraint.addConstraint(undConstraint); + } + ret.add(oderConstraint); + return ret; + } + + @Override + public ConstraintsSet TYPEStmt(TypeAssumptions assumptions) { + return this.TYPEExpr(assumptions); } @Override diff --git a/src/typinferenz/assumptions/Assumption.java b/src/typinferenz/assumptions/Assumption.java index d370d85f..1d52b9d1 100644 --- a/src/typinferenz/assumptions/Assumption.java +++ b/src/typinferenz/assumptions/Assumption.java @@ -2,6 +2,7 @@ package typinferenz.assumptions; import typinferenz.TypeInsertable; import typinferenz.Typeable; +import mycompiler.myparser.JavaClassName; import mycompiler.mytype.*; import mycompiler.myclass.Class; @@ -23,8 +24,8 @@ public class Assumption { return this.typable.getType(); } - public String getIdentifier(){ - return typable.getIdentifier(); + public JavaClassName getIdentifier(){ + return new JavaClassName(typable.getIdentifier()); } } diff --git a/src/typinferenz/assumptions/FieldAssumption.java b/src/typinferenz/assumptions/FieldAssumption.java index 8e36d20d..46243e71 100644 --- a/src/typinferenz/assumptions/FieldAssumption.java +++ b/src/typinferenz/assumptions/FieldAssumption.java @@ -2,6 +2,7 @@ package typinferenz.assumptions; import mycompiler.myclass.Field; import mycompiler.myclass.Class; +import mycompiler.myparser.JavaClassName; import mycompiler.mytype.RefType; public class FieldAssumption extends Assumption { @@ -19,8 +20,8 @@ public class FieldAssumption extends Assumption { return this.parentClass; } - public String getIdentifier(){ - return this.field.getIdentifier(); + public JavaClassName getIdentifier(){ + return new JavaClassName(this.field.getIdentifier()); } @Override diff --git a/src/typinferenz/assumptions/GenericVarAssumption.java b/src/typinferenz/assumptions/GenericVarAssumption.java index b2fb2597..c564878a 100644 --- a/src/typinferenz/assumptions/GenericVarAssumption.java +++ b/src/typinferenz/assumptions/GenericVarAssumption.java @@ -1,5 +1,6 @@ package typinferenz.assumptions; +import mycompiler.myparser.JavaClassName; import mycompiler.mystatement.LocalVarDecl; import mycompiler.mytype.GenericTypeVar; import mycompiler.mytype.RefType; @@ -18,8 +19,8 @@ public class GenericVarAssumption extends Assumption{ return genericVar;//new RefType(this.getIdentifier(), -1); } - public String getIdentifier(){ - return genericVar.getName(); + public JavaClassName getIdentifier(){ + return new JavaClassName(genericVar.getName()); } public String toString(){ diff --git a/src/typinferenz/assumptions/TypeAssumptions.java b/src/typinferenz/assumptions/TypeAssumptions.java index 618725f0..e2df73ab 100755 --- a/src/typinferenz/assumptions/TypeAssumptions.java +++ b/src/typinferenz/assumptions/TypeAssumptions.java @@ -350,6 +350,7 @@ public class TypeAssumptions { */ public ConstructorAssumption getConstructorAssumption(String name, int size) { for(ConstructorAssumption ca : this.constructorAssumptions){ + System.out.println(ca.getIdentifier().toString() + ca.getParaCount()); if(ca.getParaCount()==size && ca.getIdentifier().equals(name))return ca; } return null; diff --git a/test/plugindevelopment/MartinTestCases/BoundedType1.jav b/test/plugindevelopment/MartinTestCases/BoundedType1.jav index af71bfa7..f56a643e 100755 --- a/test/plugindevelopment/MartinTestCases/BoundedType1.jav +++ b/test/plugindevelopment/MartinTestCases/BoundedType1.jav @@ -9,7 +9,7 @@ interface RR extends BB { class BoundedType1 { - m1(AA a) { + m1(AA a) { T1 b; a.AAm(b); } diff --git a/test/plugindevelopment/MartinTestCases/BoundedType2.jav b/test/plugindevelopment/MartinTestCases/BoundedType2.jav index 47602aba..ccb0d6a2 100755 --- a/test/plugindevelopment/MartinTestCases/BoundedType2.jav +++ b/test/plugindevelopment/MartinTestCases/BoundedType2.jav @@ -1,5 +1,5 @@ class BoundedType { - m(T x) { + m(T x) { r; r=x; return r; diff --git a/test/plugindevelopment/MartinTestCases/Plus1_Float_Double.jav b/test/plugindevelopment/MartinTestCases/Plus1_Float_Double.jav index 75c3baad..5291001c 100644 --- a/test/plugindevelopment/MartinTestCases/Plus1_Float_Double.jav +++ b/test/plugindevelopment/MartinTestCases/Plus1_Float_Double.jav @@ -1,3 +1,3 @@ class Plus1_Float_Double { - op = (x) -> x+1.0; + op = (x) -> x + 1.0; } \ No newline at end of file diff --git a/test/plugindevelopment/MartinTestCases/Tester.java b/test/plugindevelopment/MartinTestCases/Tester.java index 2f9778e0..ddea7b3b 100644 --- a/test/plugindevelopment/MartinTestCases/Tester.java +++ b/test/plugindevelopment/MartinTestCases/Tester.java @@ -54,9 +54,9 @@ public class Tester extends TypeInsertTester{ Vector testFiles = new Vector(); //testFiles.add("OL3.jav"); testFiles.add("Plus1_Float_Double.jav"); - /* + ///* testFiles.add("AchimTest1.jav"); - testFiles.add("MatrixWhile.jav"); + //testFiles.add("MatrixWhile.jav"); //testFiles.add("BoundedType1.jav"); testFiles.add("BoundedType2.jav"); testFiles.add("BoundedType.jav"); From 25d61b703be663513c6bbb64524c78b1a672885f Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 28 Aug 2014 18:42:54 +0200 Subject: [PATCH 15/31] =?UTF-8?q?JavaClassName=20eingef=C3=BChrt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycompiler/myparser/JavaClassName.java | 124 +++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 src/mycompiler/myparser/JavaClassName.java diff --git a/src/mycompiler/myparser/JavaClassName.java b/src/mycompiler/myparser/JavaClassName.java new file mode 100644 index 00000000..adf9b054 --- /dev/null +++ b/src/mycompiler/myparser/JavaClassName.java @@ -0,0 +1,124 @@ +package mycompiler.myparser; + +import java.util.Vector; + +import mycompiler.mytype.RefType; + +/** + * Stellt den Namen einer Java Klasse dar. + * Dieser kann auch den Packagenamen mit beinhalten: java.util.Vector + * + * @author janulrich + * + */ +public class JavaClassName { + + private String name; + private PackageName packageName; + + public JavaClassName(String name){ + String[] names = name.split("[.]"); + boolean match = true; + if(names.length == 1){ + packageName = new PackageName(); + this.name = name; + }else { + name = names[names.length-1]; + Vector packageNames = new Vector(); + for(int i = 0; i names = new Vector(); + + public PackageName(Vector packageNames) { + names = packageNames; + } + + public PackageName() { + //Do nothing + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((names == null) ? 0 : names.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + PackageName other = (PackageName) obj; + if (names == null) { + if (other.names != null) + return false; + } else if (!names.equals(other.names)) + return false; + return true; + } + + @Override + public String toString() { + String ret = ""; + if(names == null)return ""; + for(String n : names)ret+=n+"."; + return ret; + } +} From 55d40d14ad1cfcab26bb542949eb8199a9214ebf Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 28 Aug 2014 19:05:57 +0200 Subject: [PATCH 16/31] =?UTF-8?q?UnaryExpr=20ver=C3=A4ndert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycompiler/myclass/FormalParameter.java | 2 +- src/mycompiler/mystatement/PostDecExpr.java | 9 ----- src/mycompiler/mystatement/PostIncExpr.java | 34 +--------------- src/mycompiler/mystatement/PreDecExpr.java | 9 +---- src/mycompiler/mystatement/PreIncExpr.java | 9 ----- src/mycompiler/mystatement/UnaryExpr.java | 43 ++++++++++++++++++++- 6 files changed, 45 insertions(+), 61 deletions(-) diff --git a/src/mycompiler/myclass/FormalParameter.java b/src/mycompiler/myclass/FormalParameter.java index c3ef09f7..cef327a5 100755 --- a/src/mycompiler/myclass/FormalParameter.java +++ b/src/mycompiler/myclass/FormalParameter.java @@ -60,7 +60,7 @@ public class FormalParameter extends SyntaxTreeNode implements ITypeReplacementL @Override public boolean equals(Object object) { - if(!super.equals(object))return false; + //if(!super.equals(object))return false; //Nicht die Position im SyntaxBaum prüfen. if(!(object instanceof FormalParameter))return false; FormalParameter equals = (FormalParameter)object; if((this.type==null)!=(equals.type == null))return false; diff --git a/src/mycompiler/mystatement/PostDecExpr.java b/src/mycompiler/mystatement/PostDecExpr.java index 2e9a1094..91c0f37c 100755 --- a/src/mycompiler/mystatement/PostDecExpr.java +++ b/src/mycompiler/mystatement/PostDecExpr.java @@ -54,9 +54,6 @@ public class PostDecExpr extends UnaryExpr super(offset,variableLength); } // ino.end - // ino.attribute.expr.25994.declaration - public Expr expr; - // ino.end // ino.attribute.parserlog.25997.declaration protected static Logger parserlog = Logger.getLogger("parser"); // ino.end @@ -172,12 +169,6 @@ public class PostDecExpr extends UnaryExpr expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); } - @Override - public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { - // TODO Auto-generated method stub - return null; - } - @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { // TODO Auto-generated method stub diff --git a/src/mycompiler/mystatement/PostIncExpr.java b/src/mycompiler/mystatement/PostIncExpr.java index 69d520b5..c17300d0 100755 --- a/src/mycompiler/mystatement/PostIncExpr.java +++ b/src/mycompiler/mystatement/PostIncExpr.java @@ -60,9 +60,7 @@ public class PostIncExpr extends UnaryExpr super(offset,variableLength); } // ino.end - // ino.attribute.expr.26028.declaration - public Expr expr; - // ino.end + // ino.attribute.parserlog.26031.declaration protected static Logger parserlog = Logger.getLogger("parser"); // ino.end @@ -178,36 +176,6 @@ public class PostIncExpr extends UnaryExpr expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); } - private Vector getNumericTypes(){ - Vector ret = new Vector<>(); - ret.add(new RefType("Integer",-1)); - ret.add(new RefType("Long",-1)); - ret.add(new RefType("Double",-1)); - return ret ; - } - - @Override - public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { - if(this.getType() == null)this.setType(TypePlaceholder.fresh(this)); - ConstraintsSet ret = new ConstraintsSet(); - OderConstraint oderConstraint = new OderConstraint(); - ret.add(this.expr.TYPEExpr(assumptions)); - for(RefType t : getNumericTypes()){ - UndConstraint undConstraint = new UndConstraint(); - undConstraint.addConstraint(this.getType(), t); - undConstraint.addConstraint(this.expr.getType(), t); - - oderConstraint.addConstraint(undConstraint); - } - ret.add(oderConstraint); - return ret; - } - - @Override - public ConstraintsSet TYPEStmt(TypeAssumptions assumptions) { - return this.TYPEExpr(assumptions); - } - @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { JavaCodeResult ret = new JavaCodeResult(); diff --git a/src/mycompiler/mystatement/PreDecExpr.java b/src/mycompiler/mystatement/PreDecExpr.java index 0576c46d..5f0c0718 100755 --- a/src/mycompiler/mystatement/PreDecExpr.java +++ b/src/mycompiler/mystatement/PreDecExpr.java @@ -55,9 +55,6 @@ public class PreDecExpr extends UnaryExpr } // ino.end - // ino.attribute.expr.26062.declaration - public Expr expr; - // ino.end // ino.attribute.parserlog.26065.declaration protected static Logger parserlog = Logger.getLogger("parser"); // ino.end @@ -171,11 +168,7 @@ public class PreDecExpr extends UnaryExpr { expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); } - @Override - public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { - // TODO Auto-generated method stub - return null; - } + @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { // TODO Auto-generated method stub diff --git a/src/mycompiler/mystatement/PreIncExpr.java b/src/mycompiler/mystatement/PreIncExpr.java index 839b154f..de1e4de5 100755 --- a/src/mycompiler/mystatement/PreIncExpr.java +++ b/src/mycompiler/mystatement/PreIncExpr.java @@ -54,9 +54,6 @@ public class PreIncExpr extends UnaryExpr super(offset,variableLength); } // ino.end - // ino.attribute.expr.26096.declaration - public Expr expr; - // ino.end // ino.attribute.parserlog.26099.declaration protected static Logger parserlog = Logger.getLogger("parser"); // ino.end @@ -173,12 +170,6 @@ public class PreIncExpr extends UnaryExpr expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); } - @Override - public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { - // TODO Auto-generated method stub - return null; - } - @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { // TODO Auto-generated method stub diff --git a/src/mycompiler/mystatement/UnaryExpr.java b/src/mycompiler/mystatement/UnaryExpr.java index 6b990df1..86b32dd3 100755 --- a/src/mycompiler/mystatement/UnaryExpr.java +++ b/src/mycompiler/mystatement/UnaryExpr.java @@ -3,10 +3,17 @@ package mycompiler.mystatement; // ino.end // ino.module.UnaryExpr.8655.import import java.util.Vector; + +import typinferenz.ConstraintsSet; +import typinferenz.OderConstraint; +import typinferenz.UndConstraint; +import typinferenz.assumptions.TypeAssumptions; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.myexception.JVMCodeException; // ino.end +import mycompiler.mytype.RefType; +import mycompiler.mytype.TypePlaceholder; @@ -16,7 +23,9 @@ public abstract class UnaryExpr extends Expr // ino.end // ino.class.UnaryExpr.26298.body { - // ino.method.UnaryExpr.26302.definition + public Expr expr; + + // ino.method.UnaryExpr.26302.definition public UnaryExpr(int offset,int variableLength) // ino.end // ino.method.UnaryExpr.26302.body @@ -29,5 +38,37 @@ public abstract class UnaryExpr extends Expr public abstract void codegen(ClassFile classfile, CodeAttribute code, Vector paralist) throws JVMCodeException; // ino.end + + private Vector getNumericTypes(){ + Vector ret = new Vector<>(); + ret.add(new RefType("Integer",-1)); + ret.add(new RefType("Long",-1)); + ret.add(new RefType("Double",-1)); + return ret ; + } + + @Override + public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { + if(this.getType() == null)this.setType(TypePlaceholder.fresh(this)); + ConstraintsSet ret = new ConstraintsSet(); + OderConstraint oderConstraint = new OderConstraint(); + ret.add(this.expr.TYPEExpr(assumptions)); + for(RefType t : getNumericTypes()){ + UndConstraint undConstraint = new UndConstraint(); + undConstraint.addConstraint(this.getType(), t); + undConstraint.addConstraint(this.expr.getType(), t); + + oderConstraint.addConstraint(undConstraint); + } + ret.add(oderConstraint); + return ret; + } + + @Override + public ConstraintsSet TYPEStmt(TypeAssumptions assumptions) { + return this.TYPEExpr(assumptions); + } + + } // ino.end From b468fdf8776e52e01f67abfb3d68ae64f5c49066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pl=C3=BCmicke?= Date: Tue, 2 Sep 2014 09:43:36 +0200 Subject: [PATCH 17/31] Test files angefuegt --- .../plugindevelopment/TypeInsertTests/Add.jav | 8 +++++ .../TypeInsertTests/Add.java | 16 +++++++++ .../TypeInsertTests/Matrix.jav | 35 +++++++++++++++++++ .../TypeInsertTests/Matrix.java | 16 +++++++++ .../TypeInsertTests/Matrix_simple.jav | 14 ++++++++ .../TypeInsertTests/Matrix_simple.java | 16 +++++++++ 6 files changed, 105 insertions(+) create mode 100644 test/plugindevelopment/TypeInsertTests/Add.jav create mode 100644 test/plugindevelopment/TypeInsertTests/Add.java create mode 100644 test/plugindevelopment/TypeInsertTests/Matrix.jav create mode 100644 test/plugindevelopment/TypeInsertTests/Matrix.java create mode 100644 test/plugindevelopment/TypeInsertTests/Matrix_simple.jav create mode 100644 test/plugindevelopment/TypeInsertTests/Matrix_simple.java diff --git a/test/plugindevelopment/TypeInsertTests/Add.jav b/test/plugindevelopment/TypeInsertTests/Add.jav new file mode 100644 index 00000000..4e7599b3 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/Add.jav @@ -0,0 +1,8 @@ +import java.util.Vector; + +class Matrix extends Vector> { + + mvmul(Vector v) { + return v.size() + 5; + } +} diff --git a/test/plugindevelopment/TypeInsertTests/Add.java b/test/plugindevelopment/TypeInsertTests/Add.java new file mode 100644 index 00000000..6a00e7b0 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/Add.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class Add { + private static final String TEST_FILE = "Add.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + //mustContain.add("TestIfStmt var"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} diff --git a/test/plugindevelopment/TypeInsertTests/Matrix.jav b/test/plugindevelopment/TypeInsertTests/Matrix.jav new file mode 100644 index 00000000..33277653 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/Matrix.jav @@ -0,0 +1,35 @@ +import java.util.Vector; + +class Matrix extends Vector> { + + mul(m){ + ret; + ret = new Matrix(); + i; + i = 0; + while(true) { + v1; + v2; + v1 = this.elementAt(i); + v2 = new Vector(); + j; + j = 0; + while(true) { + erg; + erg = 0; + k; + k = 0; + while(true) { + erg = erg + v1.elementAt(k).intValue() * m.elementAt(k).elementAt(j).intValue(); + k++; + } + v2.addElement(new Integer(erg)); + j++; + } + ret.addElement(v2); + i++; + } + return ret; + } + +} diff --git a/test/plugindevelopment/TypeInsertTests/Matrix.java b/test/plugindevelopment/TypeInsertTests/Matrix.java new file mode 100644 index 00000000..500f58d3 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/Matrix.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class Matrix { + private static final String TEST_FILE = "Matrix.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + //mustContain.add("TestIfStmt var"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} diff --git a/test/plugindevelopment/TypeInsertTests/Matrix_simple.jav b/test/plugindevelopment/TypeInsertTests/Matrix_simple.jav new file mode 100644 index 00000000..5aa6ee45 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/Matrix_simple.jav @@ -0,0 +1,14 @@ +import java.util.Vector; + +class Matrix extends Vector> { + + mvmul(Vector v) { + i; + ele; + v.add(1); + while (i < v.size()) { + + ele = 5 + v.elementAt(i); + } + } +} diff --git a/test/plugindevelopment/TypeInsertTests/Matrix_simple.java b/test/plugindevelopment/TypeInsertTests/Matrix_simple.java new file mode 100644 index 00000000..e9c16aaa --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/Matrix_simple.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class Matrix_simple { + private static final String TEST_FILE = "Matrix_simple.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + //mustContain.add("TestIfStmt var"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} From d6c75463ca0fad4fcf58a2e8d9f4e374b4a1ae96 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 2 Sep 2014 10:33:54 +0200 Subject: [PATCH 18/31] =?UTF-8?q?Projektstruktur=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../JavaParserBuilder.launch | 4 +- .settings/org.eclipse.core.resources.prefs | 6 +- bin/.gitignore | 8 +- .../core}/AClassOrInterface.java | 6 +- .../dhbwstuttgart/core}/IItemWithOffset.java | 2 +- .../dhbwstuttgart/core}/MyCompiler.java | 53 +- .../dhbwstuttgart/core}/MyCompilerAPI.java | 13 +- .../dhbwstuttgart/core}/SourceFile.java | 71 +- .../dhbwstuttgart/core}/SyntaxTreeNode.java | 28 +- .../syntaxtree}/BasicAssumptionClass.java | 2 +- .../dhbwstuttgart/syntaxtree}/Class.java | 63 +- .../dhbwstuttgart/syntaxtree}/ClassBody.java | 15 +- .../syntaxtree}/ClassHelper.java | 10 +- .../dhbwstuttgart/syntaxtree}/Constant.java | 16 +- .../syntaxtree}/Constructor.java | 29 +- .../syntaxtree}/ExceptionList.java | 6 +- .../dhbwstuttgart/syntaxtree}/Field.java | 29 +- .../syntaxtree}/FieldDeclaration.java | 31 +- .../syntaxtree}/FormalParameter.java | 30 +- .../dhbwstuttgart/syntaxtree}/Generic.java | 4 +- .../syntaxtree}/GenericDeclarationList.java | 6 +- .../syntaxtree}/ImportDeclarations.java | 4 +- .../dhbwstuttgart/syntaxtree}/Method.java | 41 +- .../syntaxtree}/ParameterList.java | 9 +- .../syntaxtree/misc}/DeclId.java | 25 +- .../syntaxtree/misc}/Status.java | 2 +- .../syntaxtree/misc}/UsedId.java | 13 +- .../syntaxtree/misc}/UserDef.java | 2 +- .../syntaxtree/operator}/AddOp.java | 22 +- .../syntaxtree/operator/AndOp.java | 29 + .../syntaxtree/operator}/DivideOp.java | 8 +- .../syntaxtree/operator}/EqualOp.java | 13 +- .../syntaxtree/operator}/GreaterEquOp.java | 8 +- .../syntaxtree/operator}/GreaterOp.java | 8 +- .../syntaxtree/operator}/LessEquOp.java | 8 +- .../syntaxtree/operator}/LessOp.java | 8 +- .../syntaxtree/operator}/LogOp.java | 28 +- .../syntaxtree/operator}/MinusOp.java | 8 +- .../syntaxtree/operator}/ModuloOp.java | 8 +- .../syntaxtree/operator}/MulOp.java | 14 +- .../syntaxtree/operator}/NotEqualOp.java | 13 +- .../syntaxtree/operator}/Operator.java | 28 +- .../syntaxtree/operator}/OrOp.java | 2 +- .../syntaxtree/operator}/PlusOp.java | 8 +- .../syntaxtree/operator}/RelOp.java | 14 +- .../syntaxtree/operator}/TimesOp.java | 8 +- .../syntaxtree/statement}/ArgumentList.java | 8 +- .../syntaxtree/statement}/Assign.java | 35 +- .../syntaxtree/statement}/Binary.java | 48 +- .../syntaxtree/statement}/BinaryExpr.java | 7 +- .../syntaxtree/statement}/Block.java | 36 +- .../syntaxtree/statement}/BoolLiteral.java | 29 +- .../syntaxtree/statement}/CastExpr.java | 25 +- .../syntaxtree/statement}/CharLiteral.java | 29 +- .../syntaxtree/statement}/DoubleLiteral.java | 26 +- .../syntaxtree/statement}/EmptyStmt.java | 25 +- .../syntaxtree/statement}/Expr.java | 14 +- .../syntaxtree/statement}/ExprStmt.java | 14 +- .../syntaxtree/statement}/FloatLiteral.java | 22 +- .../syntaxtree/statement}/ForStmt.java | 28 +- .../syntaxtree/statement}/IfStmt.java | 46 +- .../syntaxtree/statement}/InstVar.java | 45 +- .../syntaxtree/statement}/InstanceOf.java | 29 +- .../syntaxtree/statement}/IntLiteral.java | 29 +- .../statement}/LambdaExpression.java | 44 +- .../statement}/LambdaParameter.java | 14 +- .../syntaxtree/statement}/Literal.java | 2 +- .../statement}/LocalOrFieldVar.java | 39 +- .../syntaxtree/statement}/LocalVarDecl.java | 52 +- .../syntaxtree/statement}/LongLiteral.java | 24 +- .../syntaxtree/statement}/MethodCall.java | 56 +- .../syntaxtree/statement}/NegativeExpr.java | 31 +- .../syntaxtree/statement}/NewArray.java | 25 +- .../syntaxtree/statement}/NewClass.java | 49 +- .../syntaxtree/statement}/NotExpr.java | 35 +- .../syntaxtree/statement}/Null.java | 27 +- .../syntaxtree/statement}/PositivExpr.java | 25 +- .../syntaxtree/statement}/PostDecExpr.java | 31 +- .../syntaxtree/statement}/PostIncExpr.java | 37 +- .../syntaxtree/statement}/PreDecExpr.java | 31 +- .../syntaxtree/statement}/PreIncExpr.java | 31 +- .../syntaxtree/statement}/Receiver.java | 13 +- .../syntaxtree/statement}/Return.java | 31 +- .../syntaxtree/statement}/Statement.java | 28 +- .../syntaxtree/statement}/StringLiteral.java | 32 +- .../syntaxtree/statement}/This.java | 30 +- .../syntaxtree/statement}/UnaryExpr.java | 14 +- .../syntaxtree/statement}/UnaryMinus.java | 2 +- .../syntaxtree/statement}/UnaryNot.java | 2 +- .../syntaxtree/statement}/UnaryPlus.java | 2 +- .../syntaxtree/statement}/WhileStmt.java | 40 +- .../syntaxtree/type}/BaseType.java | 6 +- .../syntaxtree/type}/BooleanType.java | 6 +- .../type}/BoundedGenericTypeVar.java | 10 +- .../syntaxtree/type}/CRefTypeSet.java | 2 +- .../syntaxtree/type}/CharacterType.java | 6 +- .../syntaxtree/type}/DoubleType.java | 6 +- .../syntaxtree/type}/ExtendsWildcardType.java | 2 +- .../syntaxtree/type}/FloatType.java | 6 +- .../type}/FreshExtendsWildcardType.java | 2 +- .../type}/FreshSuperWildcardType.java | 2 +- .../syntaxtree/type}/FreshWildcardType.java | 6 +- .../syntaxtree/type}/GenericTypeVar.java | 21 +- .../syntaxtree/type}/IMatchable.java | 2 +- .../syntaxtree/type}/ITypeContainer.java | 2 +- .../syntaxtree/type}/IntegerType.java | 6 +- .../syntaxtree/type}/LongType.java | 6 +- .../dhbwstuttgart/syntaxtree/type}/Pair.java | 2 +- .../syntaxtree/type}/ParaList.java | 2 +- .../syntaxtree/type}/RefType.java | 24 +- .../syntaxtree/type}/ReturnType.java | 6 +- .../syntaxtree/type}/SuperWildcardType.java | 6 +- .../dhbwstuttgart/syntaxtree/type}/Type.java | 17 +- .../syntaxtree/type}/TypePlaceholder.java | 14 +- .../dhbwstuttgart/syntaxtree/type}/Void.java | 10 +- .../syntaxtree/type}/WildcardType.java | 6 +- .../typeinference}/ConstraintsSet.java | 4 +- .../typeinference}/FreshTypeVariable.java | 4 +- .../dhbwstuttgart/typeinference}/FunN.java | 18 +- .../typeinference}/FunNInterface.java | 14 +- .../typeinference}/FunNMethod.java | 11 +- .../typeinference}/GenericTypeInsertable.java | 2 +- .../typeinference}/JavaCodeResult.java | 5 +- .../typeinference}/KarthesischesProdukt.java | 2 +- .../typeinference}/OderConstraint.java | 10 +- .../typeinference}/Overloading.java | 18 +- .../typeinference}/ResultSet.java | 8 +- .../typeinference}/SingleConstraint.java | 16 +- .../typeinference}/TIPConstraints.java | 4 +- .../typeinference}/TypeInsertable.java | 8 +- .../typeinference}/Typeable.java | 4 +- .../TypeinferenceResultSet.java | 28 +- .../typeinference}/UndConstraint.java | 6 +- .../assumptions/Assumption.java | 11 +- .../assumptions/ClassAssumption.java | 4 +- .../assumptions/ConstructorAssumption.java | 10 +- .../assumptions/FieldAssumption.java | 10 +- .../assumptions/GenericVarAssumption.java | 12 +- .../assumptions/LocalVarAssumption.java | 7 +- .../assumptions/MethodAssumption.java | 10 +- .../assumptions/ParameterAssumption.java | 4 +- .../assumptions/TypeAssumptions.java | 24 +- .../exceptions/DebugException.java | 2 +- .../exceptions/ParserError.java | 4 +- .../exceptions/TypeinferenceException.java | 4 +- .../typeinference/parser}/.cvsignore | 0 .../parser}/BoundedClassIdentifierList.java | 6 +- .../parser}/ClassAndParameter.java | 8 +- .../parser}/GenericVarDeclarationList.java | 6 +- .../parser}/InterfaceAndParameter.java | 8 +- .../typeinference/parser}/InterfaceList.java | 6 +- .../typeinference/parser}/JavaClassName.java | 4 +- .../typeinference/parser}/JavaLexer.java | 2 +- .../typeinference/parser}/JavaLexer.lex | 0 .../typeinference/parser}/JavaParser.java | 175 +- .../typeinference/parser}/JavaParser.jay | 0 .../typeinference/parser}/JavaParser_old.jay | 0 .../typeinference/parser}/Scanner.java | 2 +- .../typeinference/parser}/Token.java | 2 +- .../GenericTypeInsertPoint.java | 26 +- .../typedeployment/SourcePatchPoint.java | 8 +- .../typedeployment/TypeInsertPoint.java | 20 +- .../typedeployment/TypeInsertSet.java | 20 +- src/mycompiler/mybytecode/ClassFile.java | 19 +- src/mycompiler/mybytecode/CodeAttribute.java | 3 +- src/mycompiler/mybytecode/JVMCode.java | 5 +- src/mycompiler/mybytecode/SignatureInfo.java | 15 +- .../CTypeReconstructionException.java | 4 +- src/mycompiler/myinterface/Interface.java | 27 +- src/mycompiler/myinterface/InterfaceBody.java | 7 +- src/mycompiler/mymodifier/Abstract.java | 5 +- src/mycompiler/mymodifier/Final.java | 5 +- .../mymodifier/InterfaceModifier.java | 4 +- src/mycompiler/mymodifier/Modifier.java | 4 +- src/mycompiler/mymodifier/Modifiers.java | 6 +- src/mycompiler/mymodifier/Private.java | 5 +- src/mycompiler/mymodifier/Protected.java | 5 +- src/mycompiler/mymodifier/Public.java | 5 +- src/mycompiler/mymodifier/Static.java | 5 +- src/mycompiler/mymodifier/Super.java | 4 +- src/mycompiler/myoperator/AndOp.java | 30 - src/mycompiler/myparser/.cvsignore | 3 - src/mycompiler/myparser/JavaLexer.lex | 173 -- src/mycompiler/myparser/JavaParser.jay | 2473 ----------------- src/mycompiler/myparser/JavaParser_old.jay | 1567 ----------- src/mycompiler/mytest/APITest.java | 4 +- src/mycompiler/mytest/LambdaTest.java | 14 +- .../mytypereconstruction/CMultiplyTuple.java | 3 +- .../mytypereconstruction/CSubstitution.java | 13 +- .../CSubstitutionGenVar.java | 5 +- .../mytypereconstruction/CSupportData.java | 6 +- .../mytypereconstruction/CTriple.java | 2 +- .../CReplaceTypeEvent.java | 3 +- .../set/CSubstitutionSet.java | 5 +- .../CInstVarTypeAssumption.java | 3 +- .../CLocalVarTypeAssumption.java | 3 +- .../typeassumption/CMethodTypeAssumption.java | 5 +- .../typeassumption/CParaTypeAssumption.java | 3 +- .../typeassumption/CTypeAssumption.java | 5 +- .../mytypereconstruction/unify/FC_TTO.java | 6 +- .../mytypereconstruction/unify/MUB.java | 6 +- .../mytypereconstruction/unify/Unify.java | 37 +- src/mycompiler/unused/Import.java | 2 +- src/mycompiler/unused/JavaCompiler.java | 4 +- src/userinterface/ConsoleInterface.java | 11 +- test/bytecode/BytecodeTester.java | 4 +- test/bytecode/EmptyClassTest.java | 7 +- test/mycompiler/test/blocks/TestForStmt.java | 2 +- test/mycompiler/test/blocks/TestIfStmt.java | 8 +- .../blocks/TestInferenceAcrossBlocks.java | 2 +- .../test/blocks/TestSimpleBlocks.java | 2 +- .../test/blocks/TestSimpleVariable.java | 2 +- .../TestUndeterminedReturnNegative.java | 8 +- .../blocks/TestUninitializedVariable.java | 2 +- .../mycompiler/test/blocks/TestWhileStmt.java | 2 +- .../test/complexTypes/TestOwnClassMember.java | 2 +- .../test/complexTypes/TestOwnClassMethod.java | 2 +- .../TestStandardLibInheritanceInference.java | 2 +- .../complexTypes/TestStandardLibMethod.java | 2 +- .../test/expectationTypes/ClassExpect.java | 2 +- .../test/expectationTypes/MethodExpect.java | 4 +- .../test/expectationTypes/VarExpect.java | 2 +- ...TestAssignmentTwoGenericTypesNegative.java | 4 +- ...tClassesWithBoundedGenericsOfTwoTypes.java | 8 +- ...assesWithBoundedGenericsUsedInMethods.java | 8 +- ...estExtendedClassesWithBoundedGenerics.java | 8 +- .../test/generics/TestNestedGenerics.java | 12 +- .../TestNestedGenericsNonExistingType.java | 12 +- .../TestSimpleClassesWithBoundedGenerics.java | 10 +- ...pleClassesWithBoundedGenericsNegative.java | 6 +- .../TestSimpleClassesWithGenerics.java | 6 +- ...TestSimpleClassesWithGenericsNegative.java | 6 +- .../TestInferenceOwnTypeByMember.java | 2 +- ...InferenceOwnTypeByMemberAcrossClasses.java | 2 +- .../TestInferenceOwnTypeByMethodCall.java | 2 +- ...renceOwnTypeByMethodCallAcrossClasses.java | 2 +- ...TestInferenceOwnTypeByMethodParameter.java | 2 +- ...erenceOwnTypeByMethodReturnTypeMixed1.java | 2 +- .../TestInferenceOwnTypeByReturnType.java | 2 +- ...renceOwnTypeByReturnTypeAcrossClasses.java | 2 +- .../TestInferenceStdTypeByOperation.java | 2 +- .../TestInferenceStdTypeByReturnType.java | 8 +- .../TestInheritanceAcrossLevel.java | 2 +- .../inheritance/TestInheritanceCircle.java | 2 +- .../TestInheritanceConstructor.java | 2 +- .../inheritance/TestInheritanceMultiple.java | 2 +- .../TestInheritanceOverriding.java | 2 +- .../TestInheritanceTwoHierarchies.java | 2 +- .../inheritance/TestSimpleInheritance.java | 2 +- ...verloadingDifferentNumberOfParameters.java | 2 +- ...ntNumberOfParametersAndDifferentTypes.java | 2 +- .../OverloadingGenericNotSameHierarchy.java | 6 +- .../OverloadingGenericSameHierarchy.java | 6 +- ...gGenericTypeInferenceNotSameHierarchy.java | 10 +- ...dingGenericTypeInferenceSameHierarchy.java | 12 +- .../OverloadingNotSameHierarchy.java | 2 +- .../overloading/OverloadingSameHierarchy.java | 2 +- ...rloadingTypeInferenceNotSameHierarchy.java | 2 +- ...OverloadingTypeInferenceSameHierarchy.java | 2 +- .../staticAccess/TestNonStaticAccess.java | 4 +- .../staticAccess/TestStaticAccess.java | 4 +- .../staticAccess/TestStaticAccessError.java | 2 +- .../test/lambda/ConstructorTest.java | 6 +- .../test/lambda/GenericParameterTest.java | 3 +- .../test/lambda/GenericVarTest.java | 3 +- .../test/lambda/OverloadingTest.java | 3 +- .../test/lambda/ParseMultipleFilesTest.java | 6 +- test/mycompiler/test/lambda/TestAssign.java | 3 +- test/mycompiler/test/lambda/TestLambda.java | 3 +- test/mycompiler/test/lambda/TestWhile.java | 8 +- .../AbstractInferenceTestExtendedOLD.java | 2 +- .../AbstractInferenceTestOLD_2.java | 8 +- .../AbstractInferenceTestOld.java | 14 +- .../CTypeAssumptionWrapper.java | 2 +- .../test/notUsedAnymore/IResultValidator.java | 2 +- .../TestAbstractInferenceTest2.java | 6 +- .../TestConstantsWithoutType.java | 2 +- .../test/notUsedAnymore/TestGenerics.java | 6 +- ...CheckValidImplementationFromInterface.java | 4 +- .../notUsedAnymore/TestMethodReturnType.java | 6 +- .../TestMethodReturnTypeNegative.java | 2 +- .../TestMethodReturnTypeNegative2.java | 2 +- .../operators/TestOperatorArithmetic.java | 4 +- .../test/operators/TestOperatorBitwise.java | 2 +- .../test/operators/TestOperatorBool.java | 2 +- .../operators/TestOperatorComparison.java | 6 +- .../test/operators/TestOperatorIncrement.java | 4 +- .../test/operators/TestOperatorObjects.java | 2 +- .../test/operators/TestOperatorString.java | 2 +- .../test/primitiveTypes/BooleanTest.java | 2 +- .../test/primitiveTypes/ByteTest.java | 2 +- .../test/primitiveTypes/CharTest.java | 2 +- .../test/primitiveTypes/DoubleTest.java | 2 +- .../test/primitiveTypes/FloatTest.java | 2 +- .../test/primitiveTypes/IntegerTest.java | 2 +- .../test/primitiveTypes/LongTest.java | 2 +- .../test/primitiveTypes/StringTest.java | 2 +- .../test/primitiveTypes/TestSimpleTypes.java | 6 +- .../test/trivial/TestClassEmptyGenerics.java | 2 +- .../test/trivial/TestClassMember.java | 4 +- .../trivial/TestClassMemberAssignment.java | 4 +- .../test/trivial/TestConstants.java | 2 +- .../test/trivial/TestConstructor.java | 2 +- .../test/trivial/TestConstructorNegative.java | 2 +- .../test/trivial/TestInterfaceMember.java | 2 +- .../test/trivial/TestInterfaceMethod.java | 2 +- .../trivial/TestInterfaceNotInferenced.java | 2 +- .../test/trivial/TestMethodEmpty.java | 2 +- .../test/trivial/TestMethodEmptyGeneric.java | 4 +- .../trivial/TestMethodEmptyParameter.java | 2 +- ...estMethodEmptyParameterGenericExtends.java | 8 +- .../typeReconstructionTest/TrMakeFCTest.java | 17 +- .../TrSubUnifyTest.java | 25 +- .../typeReconstructionTest/TrUnifyTest.java | 23 +- test/parser/GeneralParserTest.java | 5 +- .../InsertSingleTypeTest.java | 12 +- .../MartinTestCases/Tester.java | 10 +- test/plugindevelopment/TRMEqualTest.java | 28 +- .../TypeInsertSetEqualTest.java | 10 +- test/plugindevelopment/TypeInsertTester.java | 12 +- .../TypeInsertTests/LambdaTest22.jav | 2 +- .../TypeInsertTests/LambdaTest22.java | 2 +- .../MultipleTypesInsertTester.java | 12 +- .../OverloadingInsertTest.java | 10 +- test/syntaxTree/NodeEqualTest.java | 11 +- 325 files changed, 1961 insertions(+), 5876 deletions(-) rename src/{mycompiler => de/dhbwstuttgart/core}/AClassOrInterface.java (98%) rename src/{mycompiler => de/dhbwstuttgart/core}/IItemWithOffset.java (92%) rename src/{mycompiler => de/dhbwstuttgart/core}/MyCompiler.java (96%) rename src/{mycompiler => de/dhbwstuttgart/core}/MyCompilerAPI.java (93%) rename src/{mycompiler => de/dhbwstuttgart/core}/SourceFile.java (97%) rename src/{mycompiler => de/dhbwstuttgart/core}/SyntaxTreeNode.java (79%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/BasicAssumptionClass.java (95%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/Class.java (97%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/ClassBody.java (97%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/ClassHelper.java (90%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/Constant.java (93%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/Constructor.java (90%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/ExceptionList.java (87%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/Field.java (83%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/FieldDeclaration.java (86%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/FormalParameter.java (91%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/Generic.java (78%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/GenericDeclarationList.java (74%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/ImportDeclarations.java (90%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/Method.java (95%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree}/ParameterList.java (95%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree/misc}/DeclId.java (94%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree/misc}/Status.java (95%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree/misc}/UsedId.java (96%) rename src/{mycompiler/myclass => de/dhbwstuttgart/syntaxtree/misc}/UserDef.java (81%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/AddOp.java (82%) create mode 100755 src/de/dhbwstuttgart/syntaxtree/operator/AndOp.java rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/DivideOp.java (88%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/EqualOp.java (90%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/GreaterEquOp.java (91%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/GreaterOp.java (91%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/LessEquOp.java (91%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/LessOp.java (91%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/LogOp.java (92%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/MinusOp.java (88%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/ModuloOp.java (88%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/MulOp.java (82%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/NotEqualOp.java (90%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/Operator.java (83%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/OrOp.java (89%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/PlusOp.java (88%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/RelOp.java (86%) rename src/{mycompiler/myoperator => de/dhbwstuttgart/syntaxtree/operator}/TimesOp.java (89%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/ArgumentList.java (92%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/Assign.java (92%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/Binary.java (87%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/BinaryExpr.java (79%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/Block.java (92%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/BoolLiteral.java (90%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/CastExpr.java (89%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/CharLiteral.java (90%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/DoubleLiteral.java (91%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/EmptyStmt.java (87%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/Expr.java (90%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/ExprStmt.java (88%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/FloatLiteral.java (92%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/ForStmt.java (84%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/IfStmt.java (94%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/InstVar.java (90%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/InstanceOf.java (88%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/IntLiteral.java (92%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/LambdaExpression.java (85%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/LambdaParameter.java (58%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/Literal.java (98%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/LocalOrFieldVar.java (89%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/LocalVarDecl.java (93%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/LongLiteral.java (91%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/MethodCall.java (95%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/NegativeExpr.java (87%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/NewArray.java (93%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/NewClass.java (89%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/NotExpr.java (86%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/Null.java (86%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/PositivExpr.java (89%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/PostDecExpr.java (90%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/PostIncExpr.java (88%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/PreDecExpr.java (90%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/PreIncExpr.java (90%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/Receiver.java (90%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/Return.java (86%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/Statement.java (86%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/StringLiteral.java (86%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/This.java (90%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/UnaryExpr.java (82%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/UnaryMinus.java (93%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/UnaryNot.java (96%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/UnaryPlus.java (78%) rename src/{mycompiler/mystatement => de/dhbwstuttgart/syntaxtree/statement}/WhileStmt.java (88%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/BaseType.java (93%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/BooleanType.java (89%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/BoundedGenericTypeVar.java (93%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/CRefTypeSet.java (94%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/CharacterType.java (90%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/DoubleType.java (89%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/ExtendsWildcardType.java (98%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/FloatType.java (89%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/FreshExtendsWildcardType.java (97%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/FreshSuperWildcardType.java (97%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/FreshWildcardType.java (96%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/GenericTypeVar.java (92%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/IMatchable.java (90%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/ITypeContainer.java (89%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/IntegerType.java (89%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/LongType.java (89%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/Pair.java (99%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/ParaList.java (97%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/RefType.java (98%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/ReturnType.java (89%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/SuperWildcardType.java (94%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/Type.java (94%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/TypePlaceholder.java (98%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/Void.java (85%) rename src/{mycompiler/mytype => de/dhbwstuttgart/syntaxtree/type}/WildcardType.java (92%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/ConstraintsSet.java (94%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/FreshTypeVariable.java (88%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/FunN.java (90%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/FunNInterface.java (77%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/FunNMethod.java (81%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/GenericTypeInsertable.java (88%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/JavaCodeResult.java (94%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/KarthesischesProdukt.java (97%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/OderConstraint.java (88%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/Overloading.java (88%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/ResultSet.java (94%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/SingleConstraint.java (88%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/TIPConstraints.java (62%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/TypeInsertable.java (73%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/Typeable.java (87%) rename src/{mycompiler/mytypereconstruction => de/dhbwstuttgart/typeinference}/TypeinferenceResultSet.java (81%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/UndConstraint.java (85%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/assumptions/Assumption.java (60%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/assumptions/ClassAssumption.java (87%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/assumptions/ConstructorAssumption.java (57%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/assumptions/FieldAssumption.java (76%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/assumptions/GenericVarAssumption.java (60%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/assumptions/LocalVarAssumption.java (67%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/assumptions/MethodAssumption.java (87%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/assumptions/ParameterAssumption.java (72%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/assumptions/TypeAssumptions.java (96%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/exceptions/DebugException.java (72%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/exceptions/ParserError.java (56%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/exceptions/TypeinferenceException.java (92%) rename {bin/mycompiler/myparser => src/de/dhbwstuttgart/typeinference/parser}/.cvsignore (100%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/BoundedClassIdentifierList.java (75%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/ClassAndParameter.java (94%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/GenericVarDeclarationList.java (74%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/InterfaceAndParameter.java (94%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/InterfaceList.java (91%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/JavaClassName.java (96%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/JavaLexer.java (99%) rename {bin/mycompiler/myparser => src/de/dhbwstuttgart/typeinference/parser}/JavaLexer.lex (100%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/JavaParser.java (97%) rename {bin/mycompiler/myparser => src/de/dhbwstuttgart/typeinference/parser}/JavaParser.jay (100%) rename {bin/mycompiler/myparser => src/de/dhbwstuttgart/typeinference/parser}/JavaParser_old.jay (100%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/Scanner.java (96%) rename src/{mycompiler/myparser => de/dhbwstuttgart/typeinference/parser}/Token.java (98%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/typedeployment/GenericTypeInsertPoint.java (87%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/typedeployment/SourcePatchPoint.java (69%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/typedeployment/TypeInsertPoint.java (85%) rename src/{typinferenz => de/dhbwstuttgart/typeinference}/typedeployment/TypeInsertSet.java (89%) delete mode 100755 src/mycompiler/myoperator/AndOp.java delete mode 100755 src/mycompiler/myparser/.cvsignore delete mode 100755 src/mycompiler/myparser/JavaLexer.lex delete mode 100755 src/mycompiler/myparser/JavaParser.jay delete mode 100755 src/mycompiler/myparser/JavaParser_old.jay diff --git a/.externalToolBuilders/JavaParserBuilder.launch b/.externalToolBuilders/JavaParserBuilder.launch index b918f2b1..0db12c07 100755 --- a/.externalToolBuilders/JavaParserBuilder.launch +++ b/.externalToolBuilders/JavaParserBuilder.launch @@ -4,10 +4,10 @@ - + - + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs index be508635..70bbb4df 100755 --- a/.settings/org.eclipse.core.resources.prefs +++ b/.settings/org.eclipse.core.resources.prefs @@ -1,5 +1,5 @@ eclipse.preferences.version=1 -encoding//src/mycompiler/mystatement/LambdaExpression.java=UTF-8 -encoding//src/typinferenz/SingleConstraint.java=UTF-8 -encoding//src/typinferenz/UndConstraint.java=UTF-8 +encoding//src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java=UTF-8 +encoding//src/de/dhbwstuttgart/typeinference/SingleConstraint.java=UTF-8 +encoding//src/de/dhbwstuttgart/typeinference/UndConstraint.java=UTF-8 encoding/=ISO-8859-1 diff --git a/bin/.gitignore b/bin/.gitignore index acd086ea..8fbf1745 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,8 +1,8 @@ -/myJvmDisassembler /mycompiler +/userinterface +/de +/myJvmDisassembler +/bytecode /parser /plugindevelopment /syntaxTree -/typinferenz -/userinterface -/bytecode diff --git a/src/mycompiler/AClassOrInterface.java b/src/de/dhbwstuttgart/core/AClassOrInterface.java similarity index 98% rename from src/mycompiler/AClassOrInterface.java rename to src/de/dhbwstuttgart/core/AClassOrInterface.java index 0669be90..12a44d43 100755 --- a/src/mycompiler/AClassOrInterface.java +++ b/src/de/dhbwstuttgart/core/AClassOrInterface.java @@ -1,18 +1,20 @@ // ino.module.AClassOrInterface.8526.package -package mycompiler; +package de.dhbwstuttgart.core; // ino.end // ino.module.AClassOrInterface.8526.import import java.util.Vector; -import mycompiler.myclass.UsedId; import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; import org.apache.log4j.Logger; // ino.end + +import de.dhbwstuttgart.syntaxtree.misc.UsedId; + // ino.class.AClassOrInterface.21186.description type=javadoc /** * Superklasse von Class und Interface. Beinhaltet gemeinsame Attribute diff --git a/src/mycompiler/IItemWithOffset.java b/src/de/dhbwstuttgart/core/IItemWithOffset.java similarity index 92% rename from src/mycompiler/IItemWithOffset.java rename to src/de/dhbwstuttgart/core/IItemWithOffset.java index e199fd8c..8dc277f9 100755 --- a/src/mycompiler/IItemWithOffset.java +++ b/src/de/dhbwstuttgart/core/IItemWithOffset.java @@ -1,5 +1,5 @@ // ino.module.IItemWithOffset.8527.package -package mycompiler; +package de.dhbwstuttgart.core; // ino.end // ino.class.IItemWithOffset.21249.declaration diff --git a/src/mycompiler/MyCompiler.java b/src/de/dhbwstuttgart/core/MyCompiler.java similarity index 96% rename from src/mycompiler/MyCompiler.java rename to src/de/dhbwstuttgart/core/MyCompiler.java index cd6c0368..50002f16 100755 --- a/src/mycompiler/MyCompiler.java +++ b/src/de/dhbwstuttgart/core/MyCompiler.java @@ -1,5 +1,5 @@ // ino.module.MyCompiler.8569.package -package mycompiler; +package de.dhbwstuttgart.core; // ino.end @@ -14,27 +14,8 @@ import java.io.StringReader; import java.util.Vector; import mycompiler.mybytecode.ClassFile; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassBody; -import mycompiler.myclass.DeclId; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.ImportDeclarations; -import mycompiler.myclass.Method; -import mycompiler.myclass.ParameterList; -import mycompiler.myclass.UsedId; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.myparser.JavaParser; -import mycompiler.myparser.Scanner; -import mycompiler.myparser.JavaParser.yyException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.IMatchable; -import mycompiler.mytype.ITypeContainer; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.apache.log4j.Logger; import org.apache.log4j.xml.DOMConfigurator; @@ -42,13 +23,31 @@ import org.apache.log4j.xml.DOMConfigurator; import com.sun.corba.se.spi.orbutil.fsm.Guard.Result; import com.sun.org.apache.xerces.internal.impl.xs.identity.Field; -import typinferenz.FunNInterface; -import typinferenz.ResultSet; -// ino.end -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.DebugException; -import typinferenz.exceptions.ParserError; -import typinferenz.exceptions.TypeinferenceException; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ClassBody; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.ImportDeclarations; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.IMatchable; +import de.dhbwstuttgart.syntaxtree.type.ITypeContainer; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.FunNInterface; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.exceptions.ParserError; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.parser.JavaParser; +import de.dhbwstuttgart.typeinference.parser.Scanner; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; diff --git a/src/mycompiler/MyCompilerAPI.java b/src/de/dhbwstuttgart/core/MyCompilerAPI.java similarity index 93% rename from src/mycompiler/MyCompilerAPI.java rename to src/de/dhbwstuttgart/core/MyCompilerAPI.java index d75cbd4d..b6a72b36 100755 --- a/src/mycompiler/MyCompilerAPI.java +++ b/src/de/dhbwstuttgart/core/MyCompilerAPI.java @@ -1,5 +1,5 @@ // ino.module.MyCompilerAPI.8570.package -package mycompiler; +package de.dhbwstuttgart.core; // ino.end // ino.module.MyCompilerAPI.8570.import @@ -8,15 +8,14 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.util.Vector; -import typinferenz.ResultSet; -import typinferenz.exceptions.ParserError; -import typinferenz.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.exceptions.ParserError; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.parser.JavaParser; import mycompiler.mybytecode.ClassFile; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.myparser.JavaParser; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; -// ino.end // ino.class.MyCompilerAPI.21328.description type=javadoc /** diff --git a/src/mycompiler/SourceFile.java b/src/de/dhbwstuttgart/core/SourceFile.java similarity index 97% rename from src/mycompiler/SourceFile.java rename to src/de/dhbwstuttgart/core/SourceFile.java index 1a4f2685..4ebc3d9c 100755 --- a/src/mycompiler/SourceFile.java +++ b/src/de/dhbwstuttgart/core/SourceFile.java @@ -1,5 +1,5 @@ // ino.module.SourceFile.8722.package -package mycompiler; +package de.dhbwstuttgart.core; // ino.end // ino.module.SourceFile.8722.import @@ -11,14 +11,6 @@ import java.util.Iterator; import java.util.Vector; import mycompiler.mybytecode.ClassFile; -import mycompiler.myclass.BasicAssumptionClass; -import mycompiler.myclass.Class; -import mycompiler.myclass.Constructor; -import mycompiler.myclass.Field; -import mycompiler.myclass.FieldDeclaration; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.ImportDeclarations; -import mycompiler.myclass.UsedId; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCClassException; @@ -26,16 +18,8 @@ import mycompiler.myexception.SCException; import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; import mycompiler.mymodifier.Public; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CIntersectionType; import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; @@ -45,22 +29,41 @@ import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; +import de.dhbwstuttgart.syntaxtree.BasicAssumptionClass; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.Constructor; +import de.dhbwstuttgart.syntaxtree.Field; +import de.dhbwstuttgart.syntaxtree.FieldDeclaration; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.ImportDeclarations; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.BooleanType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FunN; +import de.dhbwstuttgart.typeinference.FunNInterface; +import de.dhbwstuttgart.typeinference.FunNMethod; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.UndConstraint; +import de.dhbwstuttgart.typeinference.assumptions.ClassAssumption; +import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; +import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.myclass.*; import mycompiler.*; import sun.reflect.generics.reflectiveObjects.NotImplementedException; import sun.reflect.generics.reflectiveObjects.TypeVariableImpl; -import typinferenz.ConstraintsSet; -import typinferenz.FunN; -import typinferenz.FunNInterface; -import typinferenz.FunNMethod; -import typinferenz.ResultSet; -import typinferenz.UndConstraint; -import typinferenz.assumptions.ClassAssumption; -import typinferenz.assumptions.MethodAssumption; -import typinferenz.assumptions.ParameterAssumption; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.DebugException; -import typinferenz.exceptions.TypeinferenceException; @@ -686,7 +689,7 @@ public class SourceFile } xConstraints.add(cons); } - typinferenzLog.debug("Karthesisches Produkt der Constraints: "+xConstraints); + //typinferenzLog.debug("Karthesisches Produkt der Constraints: "+xConstraints); ////////////////////////////// // Unifizierung der Constraints: @@ -736,7 +739,7 @@ public class SourceFile Type t = p.TA1; //TypeCheck, falls es sich um einen RefType handelt: if(t!=null && (t instanceof RefType)&& - !(t instanceof mycompiler.mytype.Void)){ + !(t instanceof de.dhbwstuttgart.syntaxtree.type.Void)){ Type replaceType = null; replaceType = globalAssumptions.getTypeFor((RefType)t, null); if(!(replaceType == null))p.TA1 = replaceType; @@ -744,7 +747,7 @@ public class SourceFile t = p.TA2; //TypeCheck, falls es sich um einen RefType handelt: if(t!=null && (t instanceof RefType)&& - !(t instanceof mycompiler.mytype.Void)){ + !(t instanceof de.dhbwstuttgart.syntaxtree.type.Void)){ Type replaceType = null; replaceType = globalAssumptions.getTypeFor((RefType)t, null); if(!(replaceType == null))p.TA2 = replaceType; @@ -1195,7 +1198,7 @@ public class SourceFile java.lang.Class[] pt=methods[j].getParameterTypes(); //CMethodTypeAssumption method = new CMethodTypeAssumption(new RefType(className, 0), methodName, returnType, pt.length,MyCompiler.NO_LINENUMBER,MyCompiler.NO_LINENUMBER,new Vector(),null); - Method method = mycompiler.myclass.Method.createEmptyMethod(methodName, parentClass); + Method method = de.dhbwstuttgart.syntaxtree.Method.createEmptyMethod(methodName, parentClass); method.setType(returnType); ParameterList parameterList = new ParameterList(); @@ -1230,7 +1233,7 @@ public class SourceFile constructor.addParaAssumption(new CParaTypeAssumption(className, methodName, constructors[j].getParameterTypes().length,0,paraType, new RefType(paraType,-1), MyCompiler.NO_LINENUMBER,MyCompiler.NO_LINENUMBER,new Vector())); } //basicAssumptions.addMethodIntersectionType(new CIntersectionType(constructor)); - Method constructorMethod = mycompiler.myclass.Method.createEmptyMethod(methodName, parentClass); + Method constructorMethod = de.dhbwstuttgart.syntaxtree.Method.createEmptyMethod(methodName, parentClass); constructorMethod.parameterlist = paraList; parentClass.addField(new Constructor(constructorMethod)); } diff --git a/src/mycompiler/SyntaxTreeNode.java b/src/de/dhbwstuttgart/core/SyntaxTreeNode.java similarity index 79% rename from src/mycompiler/SyntaxTreeNode.java rename to src/de/dhbwstuttgart/core/SyntaxTreeNode.java index 53e24e5a..6a947d5b 100644 --- a/src/mycompiler/SyntaxTreeNode.java +++ b/src/de/dhbwstuttgart/core/SyntaxTreeNode.java @@ -1,20 +1,20 @@ -package mycompiler; +package de.dhbwstuttgart.core; import java.util.Vector; -import typinferenz.ResultSet; -import typinferenz.TypeInsertable; -import typinferenz.exceptions.DebugException; -import typinferenz.exceptions.TypeinferenceException; -import typinferenz.typedeployment.GenericTypeInsertPoint; -import typinferenz.typedeployment.TypeInsertPoint; -import typinferenz.typedeployment.TypeInsertSet; -import mycompiler.myclass.Class; -import mycompiler.myclass.Generic; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.Generic; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.typedeployment.GenericTypeInsertPoint; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; public abstract class SyntaxTreeNode{ diff --git a/src/mycompiler/myclass/BasicAssumptionClass.java b/src/de/dhbwstuttgart/syntaxtree/BasicAssumptionClass.java similarity index 95% rename from src/mycompiler/myclass/BasicAssumptionClass.java rename to src/de/dhbwstuttgart/syntaxtree/BasicAssumptionClass.java index 0e392e65..81c082ef 100755 --- a/src/mycompiler/myclass/BasicAssumptionClass.java +++ b/src/de/dhbwstuttgart/syntaxtree/BasicAssumptionClass.java @@ -1,5 +1,5 @@ // ino.module.BasicAssumptionClass.8552.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.BasicAssumptionClass.8552.import diff --git a/src/mycompiler/myclass/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java similarity index 97% rename from src/mycompiler/myclass/Class.java rename to src/de/dhbwstuttgart/syntaxtree/Class.java index e589045c..82298463 100755 --- a/src/mycompiler/myclass/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -1,5 +1,5 @@ // ino.module.Class.8553.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.Class.8553.import import java.util.ArrayList; @@ -9,9 +9,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.AClassOrInterface; -import mycompiler.IItemWithOffset; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; @@ -20,18 +17,10 @@ import mycompiler.myexception.SCClassException; import mycompiler.myexception.SCExcept; import mycompiler.mymodifier.Modifiers; import mycompiler.mystatement.*; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.WildcardType; import mycompiler.mytypereconstruction.CReconstructionTuple; import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.set.CReconstructionTupleSet; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -46,7 +35,6 @@ import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; import mycompiler.mytypereconstruction.unify.FC_TTO; import mycompiler.mytypereconstruction.unify.Unify; -import mycompiler.SourceFile; import org.apache.log4j.Logger; // ino.end @@ -70,20 +58,39 @@ import org.apache.log4j.Logger; + + + + + + + + + + + +import de.dhbwstuttgart.core.AClassOrInterface; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.core.SourceFile; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.statement.Block; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.statement.Statement; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.WildcardType; +import de.dhbwstuttgart.typeinference.*; +import de.dhbwstuttgart.typeinference.assumptions.ClassAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.OderConstraint; -import typinferenz.ResultSet; -import typinferenz.Typeable; -import typinferenz.UndConstraint; -import typinferenz.FunN; -import typinferenz.assumptions.ClassAssumption; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.DebugException; -import typinferenz.exceptions.TypeinferenceException; -import typinferenz.typedeployment.TypeInsertPoint; -import typinferenz.*; // ino.class.Class.23010.declaration @@ -882,7 +889,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit this.typeAssumptions = assumptions; //Diese müssen anschließend nicht wieder generiert werden. return assumptions; } - + /* public ConstraintsSet TYPE(Vector methodList, Vector fielddeclarationList, TypeAssumptions assumptions){ ConstraintsSet ret = new ConstraintsSet(); // Die Felddeklarationen werden zu den Assumptions hinzugefügt und gelten danach für jede Methode. @@ -897,7 +904,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } return ret; } - + */ // ino.method.clear.23113.defdescription type=javadoc /** * Entfernt Annahmen f�r lokale Variablen, die f�r Methodenparameter erzeugt diff --git a/src/mycompiler/myclass/ClassBody.java b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java similarity index 97% rename from src/mycompiler/myclass/ClassBody.java rename to src/de/dhbwstuttgart/syntaxtree/ClassBody.java index 12b4f462..230b0c35 100755 --- a/src/mycompiler/myclass/ClassBody.java +++ b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java @@ -1,22 +1,27 @@ // ino.module.ClassBody.8554.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.ClassBody.8554.import import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; + import mycompiler.mybytecode.ClassFile; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCClassBodyException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCMethodException; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; + import org.apache.log4j.Logger; // ino.end -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; + + + +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/myclass/ClassHelper.java b/src/de/dhbwstuttgart/syntaxtree/ClassHelper.java similarity index 90% rename from src/mycompiler/myclass/ClassHelper.java rename to src/de/dhbwstuttgart/syntaxtree/ClassHelper.java index 4a8b0e64..110256b7 100755 --- a/src/mycompiler/myclass/ClassHelper.java +++ b/src/de/dhbwstuttgart/syntaxtree/ClassHelper.java @@ -1,13 +1,13 @@ // ino.module.ClassHelper.8555.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.ClassHelper.8555.import import java.util.Vector; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -// ino.end + +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; // ino.class.ClassHelper.23206.declaration public class ClassHelper diff --git a/src/mycompiler/myclass/Constant.java b/src/de/dhbwstuttgart/syntaxtree/Constant.java similarity index 93% rename from src/mycompiler/myclass/Constant.java rename to src/de/dhbwstuttgart/syntaxtree/Constant.java index f4936a3e..e58511975 100755 --- a/src/mycompiler/myclass/Constant.java +++ b/src/de/dhbwstuttgart/syntaxtree/Constant.java @@ -1,23 +1,23 @@ // ino.module.Constant.8556.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.Constant.8556.import import java.util.Vector; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.statement.Literal; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; import mycompiler.mybytecode.AttributeInfo; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.JVMCode; -import mycompiler.MyCompiler; import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.Literal; -import mycompiler.mytype.Type; // ino.end import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; diff --git a/src/mycompiler/myclass/Constructor.java b/src/de/dhbwstuttgart/syntaxtree/Constructor.java similarity index 90% rename from src/mycompiler/myclass/Constructor.java rename to src/de/dhbwstuttgart/syntaxtree/Constructor.java index c978fccd..ac50a5a3 100644 --- a/src/mycompiler/myclass/Constructor.java +++ b/src/de/dhbwstuttgart/syntaxtree/Constructor.java @@ -1,24 +1,25 @@ -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; import java.util.Vector; -import mycompiler.SyntaxTreeNode; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.statement.Block; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.ConstructorAssumption; +import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.mybytecode.ClassFile; import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; -import mycompiler.mystatement.Block; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.SingleConstraint; -import typinferenz.assumptions.ConstructorAssumption; -import typinferenz.assumptions.MethodAssumption; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; public class Constructor extends Method { private Method methode; diff --git a/src/mycompiler/myclass/ExceptionList.java b/src/de/dhbwstuttgart/syntaxtree/ExceptionList.java similarity index 87% rename from src/mycompiler/myclass/ExceptionList.java rename to src/de/dhbwstuttgart/syntaxtree/ExceptionList.java index a402ec4e..7e41e64d 100755 --- a/src/mycompiler/myclass/ExceptionList.java +++ b/src/de/dhbwstuttgart/syntaxtree/ExceptionList.java @@ -1,10 +1,10 @@ // ino.module.ExceptionList.8559.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.ExceptionList.8559.import import java.util.Vector; -import mycompiler.mytype.RefType; -// ino.end + +import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/mycompiler/myclass/Field.java b/src/de/dhbwstuttgart/syntaxtree/Field.java similarity index 83% rename from src/mycompiler/myclass/Field.java rename to src/de/dhbwstuttgart/syntaxtree/Field.java index e612966b..04714d3b 100644 --- a/src/mycompiler/myclass/Field.java +++ b/src/de/dhbwstuttgart/syntaxtree/Field.java @@ -1,23 +1,24 @@ -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; import java.util.Vector; -import mycompiler.SyntaxTreeNode; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.GenericTypeInsertable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.Typeable; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import mycompiler.mybytecode.ClassFile; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import typinferenz.ConstraintsSet; -import typinferenz.GenericTypeInsertable; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.Typeable; -import typinferenz.TypeInsertable; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.typedeployment.TypeInsertPoint; public abstract class Field extends SyntaxTreeNode implements TypeInsertable, Typeable, Generic, GenericTypeInsertable{ diff --git a/src/mycompiler/myclass/FieldDeclaration.java b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java similarity index 86% rename from src/mycompiler/myclass/FieldDeclaration.java rename to src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java index 91ef8382..fc44782f 100644 --- a/src/mycompiler/myclass/FieldDeclaration.java +++ b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java @@ -1,23 +1,24 @@ -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; import java.util.Vector; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.OderConstraint; -import typinferenz.ResultSet; -import typinferenz.SingleConstraint; -import typinferenz.assumptions.FieldAssumption; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; -import mycompiler.SyntaxTreeNode; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.FieldAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.mybytecode.ClassFile; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Expr; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; /** diff --git a/src/mycompiler/myclass/FormalParameter.java b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java similarity index 91% rename from src/mycompiler/myclass/FormalParameter.java rename to src/de/dhbwstuttgart/syntaxtree/FormalParameter.java index cef327a5..856aa3b4 100755 --- a/src/mycompiler/myclass/FormalParameter.java +++ b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java @@ -1,15 +1,12 @@ // ino.module.FormalParameter.8561.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.FormalParameter.8561.import import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; @@ -29,14 +26,25 @@ import org.apache.log4j.Logger; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.Typeable; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.Typeable; -import typinferenz.TypeInsertable; -import typinferenz.exceptions.TypeinferenceException; -import typinferenz.typedeployment.TypeInsertPoint; -import typinferenz.typedeployment.TypeInsertSet; // ino.class.FormalParameter.23391.declaration public class FormalParameter extends SyntaxTreeNode implements ITypeReplacementListener, Typeable, TypeInsertable diff --git a/src/mycompiler/myclass/Generic.java b/src/de/dhbwstuttgart/syntaxtree/Generic.java similarity index 78% rename from src/mycompiler/myclass/Generic.java rename to src/de/dhbwstuttgart/syntaxtree/Generic.java index 0d2a37d1..0c1f7a5e 100644 --- a/src/mycompiler/myclass/Generic.java +++ b/src/de/dhbwstuttgart/syntaxtree/Generic.java @@ -1,9 +1,9 @@ -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytype.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; /** * Wird von allen Klassen implementiert, welche generische Parameter halten können. (Class, Method und Field) diff --git a/src/mycompiler/myclass/GenericDeclarationList.java b/src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java similarity index 74% rename from src/mycompiler/myclass/GenericDeclarationList.java rename to src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java index bd9f58f4..45f23959 100644 --- a/src/mycompiler/myclass/GenericDeclarationList.java +++ b/src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java @@ -1,9 +1,9 @@ -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; import java.util.Vector; -import mycompiler.myparser.GenericVarDeclarationList; -import mycompiler.mytype.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.typeinference.parser.GenericVarDeclarationList; /** diff --git a/src/mycompiler/myclass/ImportDeclarations.java b/src/de/dhbwstuttgart/syntaxtree/ImportDeclarations.java similarity index 90% rename from src/mycompiler/myclass/ImportDeclarations.java rename to src/de/dhbwstuttgart/syntaxtree/ImportDeclarations.java index 88ac5e1f..15cfad5f 100755 --- a/src/mycompiler/myclass/ImportDeclarations.java +++ b/src/de/dhbwstuttgart/syntaxtree/ImportDeclarations.java @@ -1,11 +1,13 @@ // ino.module.ImportDeclarations.8562.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.ImportDeclarations.8562.import import java.util.Vector; // ino.end +import de.dhbwstuttgart.syntaxtree.misc.UsedId; + // ino.class.ImportDeclarations.23434.description type=javadoc /** diff --git a/src/mycompiler/myclass/Method.java b/src/de/dhbwstuttgart/syntaxtree/Method.java similarity index 95% rename from src/mycompiler/myclass/Method.java rename to src/de/dhbwstuttgart/syntaxtree/Method.java index 42ee79f0..2001a1fa 100755 --- a/src/mycompiler/myclass/Method.java +++ b/src/de/dhbwstuttgart/syntaxtree/Method.java @@ -1,5 +1,5 @@ // ino.module.Method.8564.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.Method.8564.import import java.util.Enumeration; @@ -7,20 +7,11 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.IItemWithOffset; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; -import mycompiler.MyCompiler; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCMethodException; import mycompiler.myexception.SCStatementException; import mycompiler.mymodifier.Modifiers; -import mycompiler.mystatement.Block; -import mycompiler.mystatement.Return; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; @@ -32,16 +23,26 @@ import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -import typinferenz.JavaCodeResult; -import typinferenz.SingleConstraint; -import typinferenz.ConstraintsSet; -import typinferenz.ResultSet; -import typinferenz.TypeInsertable; -import typinferenz.assumptions.MethodAssumption; -import typinferenz.assumptions.ParameterAssumption; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; -import typinferenz.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.statement.Block; +import de.dhbwstuttgart.syntaxtree.statement.Return; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; +import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; diff --git a/src/mycompiler/myclass/ParameterList.java b/src/de/dhbwstuttgart/syntaxtree/ParameterList.java similarity index 95% rename from src/mycompiler/myclass/ParameterList.java rename to src/de/dhbwstuttgart/syntaxtree/ParameterList.java index ee4e75bf..a99333f3 100755 --- a/src/mycompiler/myclass/ParameterList.java +++ b/src/de/dhbwstuttgart/syntaxtree/ParameterList.java @@ -1,17 +1,20 @@ // ino.module.ParameterList.8565.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.ParameterList.8565.import import java.util.Vector; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mytype.*; import java.util.Iterator; +import de.dhbwstuttgart.syntaxtree.type.BaseType; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; + // ino.end diff --git a/src/mycompiler/myclass/DeclId.java b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java similarity index 94% rename from src/mycompiler/myclass/DeclId.java rename to src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java index 96ef68ad..c597d297 100755 --- a/src/mycompiler/myclass/DeclId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java @@ -1,30 +1,37 @@ // ino.module.DeclId.8558.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree.misc; // ino.end // ino.module.DeclId.8558.import import java.util.Vector; + import mycompiler.mybytecode.Attribute; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.mybytecode.SignatureInfo; -import mycompiler.MyCompiler; import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Final; import mycompiler.mymodifier.Modifiers; -import mycompiler.mystatement.Assign; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.ExprStmt; -import mycompiler.mystatement.InstVar; -import mycompiler.mystatement.LocalOrFieldVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; + import org.apache.log4j.Logger; // ino.end +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.syntaxtree.Constant; +import de.dhbwstuttgart.syntaxtree.statement.Assign; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.statement.ExprStmt; +import de.dhbwstuttgart.syntaxtree.statement.InstVar; +import de.dhbwstuttgart.syntaxtree.statement.LocalOrFieldVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; + + + + // ino.class.DeclId.23280.declaration public class DeclId // ino.end diff --git a/src/mycompiler/myclass/Status.java b/src/de/dhbwstuttgart/syntaxtree/misc/Status.java similarity index 95% rename from src/mycompiler/myclass/Status.java rename to src/de/dhbwstuttgart/syntaxtree/misc/Status.java index f2f46c74..ea598693 100755 --- a/src/mycompiler/myclass/Status.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/Status.java @@ -1,5 +1,5 @@ // ino.module.Status.8566.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree.misc; // ino.end // ino.module.Status.8566.import diff --git a/src/mycompiler/myclass/UsedId.java b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java similarity index 96% rename from src/mycompiler/myclass/UsedId.java rename to src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java index b367580e..c8322674 100755 --- a/src/mycompiler/myclass/UsedId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java @@ -1,17 +1,16 @@ // ino.module.UsedId.8567.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree.misc; // ino.end // ino.module.UsedId.8567.import import java.util.Iterator; import java.util.Vector; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.exceptions.TypeinferenceException; -import mycompiler.IItemWithOffset; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.mybytecode.JVMCode; -import mycompiler.mytype.Type; -// ino.end // ino.class.UsedId.23659.declaration diff --git a/src/mycompiler/myclass/UserDef.java b/src/de/dhbwstuttgart/syntaxtree/misc/UserDef.java similarity index 81% rename from src/mycompiler/myclass/UserDef.java rename to src/de/dhbwstuttgart/syntaxtree/misc/UserDef.java index 0550e99d..96085afe 100755 --- a/src/mycompiler/myclass/UserDef.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/UserDef.java @@ -1,5 +1,5 @@ // ino.module.UserDef.8568.package -package mycompiler.myclass; +package de.dhbwstuttgart.syntaxtree.misc; // ino.end // ino.class.UserDef.23741.declaration public class UserDef extends Status diff --git a/src/mycompiler/myoperator/AddOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java similarity index 82% rename from src/mycompiler/myoperator/AddOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java index c472c504..fcd93bc9 100755 --- a/src/mycompiler/myoperator/AddOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java @@ -1,5 +1,5 @@ // ino.module.AddOp.8594.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.AddOp.8594.import import java.util.HashMap; @@ -7,20 +7,20 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import typinferenz.ConstraintsSet; -import typinferenz.SingleConstraint; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.DebugException; +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.type.IntegerType; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/AndOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/AndOp.java new file mode 100755 index 00000000..85081d7a --- /dev/null +++ b/src/de/dhbwstuttgart/syntaxtree/operator/AndOp.java @@ -0,0 +1,29 @@ +// ino.module.AndOp.8595.package +package de.dhbwstuttgart.syntaxtree.operator; + +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.type.BooleanType; +import de.dhbwstuttgart.syntaxtree.type.IntegerType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; + +// ino.class.AndOp.24101.declaration +public class AndOp extends LogOp +// ino.end +// ino.class.AndOp.24101.body +{ + + // ino.method.AndOp.24105.definition + public AndOp(int offset, int variableLength) + // ino.end + // ino.method.AndOp.24105.body + { + super(offset,variableLength); + } + // ino.end + + +} +// ino.end diff --git a/src/mycompiler/myoperator/DivideOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java similarity index 88% rename from src/mycompiler/myoperator/DivideOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java index decfa052..1c6fc1df 100755 --- a/src/mycompiler/myoperator/DivideOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java @@ -1,15 +1,15 @@ // ino.module.DivideOp.8596.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.DivideOp.8596.import import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -// ino.end diff --git a/src/mycompiler/myoperator/EqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java similarity index 90% rename from src/mycompiler/myoperator/EqualOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java index 038a6ab8..059b9435 100755 --- a/src/mycompiler/myoperator/EqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java @@ -1,19 +1,20 @@ // ino.module.EqualOp.8597.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.EqualOp.8597.import import java.util.Iterator; import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.statement.Null; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.Null; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/mycompiler/myoperator/GreaterEquOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java similarity index 91% rename from src/mycompiler/myoperator/GreaterEquOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java index bcd12eb0..d0b9df89 100755 --- a/src/mycompiler/myoperator/GreaterEquOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java @@ -1,15 +1,15 @@ // ino.module.GreaterEquOp.8598.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.GreaterEquOp.8598.import import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -// ino.end diff --git a/src/mycompiler/myoperator/GreaterOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterOp.java similarity index 91% rename from src/mycompiler/myoperator/GreaterOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/GreaterOp.java index 22f66fae..aa74d16d 100755 --- a/src/mycompiler/myoperator/GreaterOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterOp.java @@ -1,15 +1,15 @@ // ino.module.GreaterOp.8599.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.GreaterOp.8599.import import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -// ino.end diff --git a/src/mycompiler/myoperator/LessEquOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LessEquOp.java similarity index 91% rename from src/mycompiler/myoperator/LessEquOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/LessEquOp.java index fb1d2853..7fc886e5 100755 --- a/src/mycompiler/myoperator/LessEquOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LessEquOp.java @@ -1,15 +1,15 @@ // ino.module.LessEquOp.8600.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.LessEquOp.8600.import import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -// ino.end diff --git a/src/mycompiler/myoperator/LessOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LessOp.java similarity index 91% rename from src/mycompiler/myoperator/LessOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/LessOp.java index bce42f97..3e43922b 100755 --- a/src/mycompiler/myoperator/LessOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LessOp.java @@ -1,15 +1,15 @@ // ino.module.LessOp.8601.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.LessOp.8601.import import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -// ino.end diff --git a/src/mycompiler/myoperator/LogOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java similarity index 92% rename from src/mycompiler/myoperator/LogOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java index 13a52c99..98f29871 100755 --- a/src/mycompiler/myoperator/LogOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java @@ -1,5 +1,5 @@ // ino.module.LogOp.8602.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.LogOp.8602.import import java.util.HashMap; @@ -7,24 +7,24 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import typinferenz.ConstraintsSet; -import typinferenz.SingleConstraint; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.DebugException; +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.statement.NotExpr; +import de.dhbwstuttgart.syntaxtree.statement.Null; +import de.dhbwstuttgart.syntaxtree.statement.Statement; +import de.dhbwstuttgart.syntaxtree.type.BooleanType; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.NotExpr; -import mycompiler.mystatement.Null; -import mycompiler.mystatement.Statement; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/mycompiler/myoperator/MinusOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/MinusOp.java similarity index 88% rename from src/mycompiler/myoperator/MinusOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/MinusOp.java index e240db97..c4c4560b 100755 --- a/src/mycompiler/myoperator/MinusOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/MinusOp.java @@ -1,15 +1,15 @@ // ino.module.MinusOp.8603.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.MinusOp.8603.import import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -// ino.end diff --git a/src/mycompiler/myoperator/ModuloOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/ModuloOp.java similarity index 88% rename from src/mycompiler/myoperator/ModuloOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/ModuloOp.java index 44245b63..5e92239d 100755 --- a/src/mycompiler/myoperator/ModuloOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/ModuloOp.java @@ -1,15 +1,15 @@ // ino.module.ModuloOp.8604.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.ModuloOp.8604.import import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -// ino.end diff --git a/src/mycompiler/myoperator/MulOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java similarity index 82% rename from src/mycompiler/myoperator/MulOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java index 40d160f3..23fb3c3e 100755 --- a/src/mycompiler/myoperator/MulOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java @@ -1,5 +1,5 @@ // ino.module.MulOp.8605.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.MulOp.8605.import @@ -8,13 +8,13 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.DebugException; +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.mystatement.Binary; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/mycompiler/myoperator/NotEqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java similarity index 90% rename from src/mycompiler/myoperator/NotEqualOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java index 00789190..9d566ba5 100755 --- a/src/mycompiler/myoperator/NotEqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java @@ -1,19 +1,20 @@ // ino.module.NotEqualOp.8606.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.NotEqualOp.8606.import import java.util.Iterator; import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.statement.Null; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.Null; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/mycompiler/myoperator/Operator.java b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java similarity index 83% rename from src/mycompiler/myoperator/Operator.java rename to src/de/dhbwstuttgart/syntaxtree/operator/Operator.java index 7ea83b24..dde6d288 100755 --- a/src/mycompiler/myoperator/Operator.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java @@ -1,5 +1,5 @@ // ino.module.Operator.8607.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.Operator.8607.import import java.util.HashMap; @@ -7,24 +7,24 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import typinferenz.ConstraintsSet; -import typinferenz.OderConstraint; -import typinferenz.SingleConstraint; -import typinferenz.UndConstraint; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; -import mycompiler.IItemWithOffset; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.UndConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/mycompiler/myoperator/OrOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/OrOp.java similarity index 89% rename from src/mycompiler/myoperator/OrOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/OrOp.java index f8a96dc5..41bbdac9 100755 --- a/src/mycompiler/myoperator/OrOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/OrOp.java @@ -1,5 +1,5 @@ // ino.module.OrOp.8608.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end diff --git a/src/mycompiler/myoperator/PlusOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/PlusOp.java similarity index 88% rename from src/mycompiler/myoperator/PlusOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/PlusOp.java index af1e5596..886ea59b 100755 --- a/src/mycompiler/myoperator/PlusOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/PlusOp.java @@ -1,15 +1,15 @@ // ino.module.PlusOp.8609.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.PlusOp.8609.import import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -// ino.end diff --git a/src/mycompiler/myoperator/RelOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java similarity index 86% rename from src/mycompiler/myoperator/RelOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java index 1b9e9f24..7ea19033 100755 --- a/src/mycompiler/myoperator/RelOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java @@ -1,5 +1,5 @@ // ino.module.RelOp.8610.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.RelOp.8610.import @@ -8,16 +8,16 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.DebugException; +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/mycompiler/myoperator/TimesOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/TimesOp.java similarity index 89% rename from src/mycompiler/myoperator/TimesOp.java rename to src/de/dhbwstuttgart/syntaxtree/operator/TimesOp.java index 723b6b4a..9e4802b2 100755 --- a/src/mycompiler/myoperator/TimesOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/TimesOp.java @@ -1,16 +1,16 @@ // ino.module.TimesOp.8611.package -package mycompiler.myoperator; +package de.dhbwstuttgart.syntaxtree.operator; // ino.end // ino.module.TimesOp.8611.import import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Expr; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; import mycompiler.myexception.JVMCodeException; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Expr; -// ino.end // ino.class.TimesOp.24312.declaration public class TimesOp extends MulOp diff --git a/src/mycompiler/mystatement/ArgumentList.java b/src/de/dhbwstuttgart/syntaxtree/statement/ArgumentList.java similarity index 92% rename from src/mycompiler/mystatement/ArgumentList.java rename to src/de/dhbwstuttgart/syntaxtree/statement/ArgumentList.java index ffda3031..98094f50 100755 --- a/src/mycompiler/mystatement/ArgumentList.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ArgumentList.java @@ -1,16 +1,16 @@ // ino.module.ArgumentList.8621.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.ArgumentList.8621.import import java.util.Iterator; import java.util.Vector; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.FormalParameter; import mycompiler.myexception.JVMCodeException; // ino.end diff --git a/src/mycompiler/mystatement/Assign.java b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java similarity index 92% rename from src/mycompiler/mystatement/Assign.java rename to src/de/dhbwstuttgart/syntaxtree/statement/Assign.java index bc81c745..2d8e125e 100755 --- a/src/mycompiler/mystatement/Assign.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java @@ -1,5 +1,5 @@ // ino.module.Assign.8622.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Assign.8622.import import java.util.Enumeration; @@ -7,20 +7,13 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CMultiplyTuple; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; @@ -35,12 +28,26 @@ import org.apache.log4j.Logger; // ino.end -import typinferenz.JavaCodeResult; -import typinferenz.SingleConstraint; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/Binary.java b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java similarity index 87% rename from src/mycompiler/mystatement/Binary.java rename to src/de/dhbwstuttgart/syntaxtree/statement/Binary.java index 80c6a885..94fb695c 100755 --- a/src/mycompiler/mystatement/Binary.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java @@ -1,5 +1,5 @@ // ino.module.Binary.8623.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Binary.8623.import import java.util.Enumeration; @@ -7,25 +7,13 @@ import java.util.HashMap; import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.myoperator.AddOp; -import mycompiler.myoperator.LogOp; -import mycompiler.myoperator.MulOp; -import mycompiler.myoperator.Operator; -import mycompiler.myoperator.RelOp; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -41,14 +29,34 @@ import org.apache.log4j.Logger; + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.operator.AddOp; +import de.dhbwstuttgart.syntaxtree.operator.LogOp; +import de.dhbwstuttgart.syntaxtree.operator.MulOp; +import de.dhbwstuttgart.syntaxtree.operator.Operator; +import de.dhbwstuttgart.syntaxtree.operator.RelOp; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.UndConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.OderConstraint; -import typinferenz.ResultSet; -import typinferenz.SingleConstraint; -import typinferenz.UndConstraint; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/BinaryExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/BinaryExpr.java similarity index 79% rename from src/mycompiler/mystatement/BinaryExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/BinaryExpr.java index a8e4ca28..561803d3 100755 --- a/src/mycompiler/mystatement/BinaryExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/BinaryExpr.java @@ -1,9 +1,8 @@ // ino.module.BinaryExpr.8624.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; -import typinferenz.ConstraintsSet; -import typinferenz.assumptions.TypeAssumptions; -// ino.end +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; // ino.class.BinaryExpr.25030.declaration diff --git a/src/mycompiler/mystatement/Block.java b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java similarity index 92% rename from src/mycompiler/mystatement/Block.java rename to src/de/dhbwstuttgart/syntaxtree/statement/Block.java index efabb756..06e27a02 100755 --- a/src/mycompiler/mystatement/Block.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java @@ -1,5 +1,5 @@ // ino.module.Block.8625.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Block.8625.import import java.util.Enumeration; @@ -7,18 +7,12 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -33,14 +27,28 @@ import org.apache.log4j.Logger; + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.SingleConstraint; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; diff --git a/src/mycompiler/mystatement/BoolLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java similarity index 90% rename from src/mycompiler/mystatement/BoolLiteral.java rename to src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java index bdc1bb79..75e6e123 100755 --- a/src/mycompiler/mystatement/BoolLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java @@ -1,21 +1,15 @@ // ino.module.BoolLiteral.8626.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.BoolLiteral.8626.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -27,10 +21,23 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.BooleanType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/CastExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java similarity index 89% rename from src/mycompiler/mystatement/CastExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java index 20add38d..75c25007 100755 --- a/src/mycompiler/mystatement/CastExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java @@ -1,22 +1,18 @@ // ino.module.CastExpr.8627.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.CastExpr.8627.import import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -29,10 +25,21 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/CharLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java similarity index 90% rename from src/mycompiler/mystatement/CharLiteral.java rename to src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java index c1ed8893..b45b874d 100755 --- a/src/mycompiler/mystatement/CharLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java @@ -1,21 +1,15 @@ // ino.module.CharLiteral.8628.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.CharLiteral.8628.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.CharacterType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -28,10 +22,23 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.CharacterType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/DoubleLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java similarity index 91% rename from src/mycompiler/mystatement/DoubleLiteral.java rename to src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java index b3188d7a..f62d77ee 100755 --- a/src/mycompiler/mystatement/DoubleLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java @@ -1,23 +1,15 @@ // ino.module.IntLiteral.8635.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.IntLiteral.8635.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.DoubleType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.LongType; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -27,12 +19,20 @@ import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.DoubleType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.IntegerType; +import de.dhbwstuttgart.syntaxtree.type.LongType; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; // ino.end -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/EmptyStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java similarity index 87% rename from src/mycompiler/mystatement/EmptyStmt.java rename to src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java index b944dcd4..2dedecbb 100755 --- a/src/mycompiler/mystatement/EmptyStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java @@ -1,18 +1,14 @@ // ino.module.EmptyStmt.8629.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.EmptyStmt.8629.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -25,11 +21,22 @@ import org.apache.log4j.Logger; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/Expr.java b/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java similarity index 90% rename from src/mycompiler/mystatement/Expr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/Expr.java index 8fd300e8..131fa867 100755 --- a/src/mycompiler/mystatement/Expr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java @@ -1,20 +1,20 @@ // ino.module.Expr.8630.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Expr.8630.import import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.ConstraintsSet; -import typinferenz.assumptions.TypeAssumptions; -import mycompiler.myclass.Class; -import mycompiler.myclass.UsedId; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CMultiplyTuple; import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.CSupportData; diff --git a/src/mycompiler/mystatement/ExprStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java similarity index 88% rename from src/mycompiler/mystatement/ExprStmt.java rename to src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java index 08eb65d9..89458d43 100755 --- a/src/mycompiler/mystatement/ExprStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java @@ -1,14 +1,11 @@ // ino.module.ExprStmt.8631.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.ExprStmt.8631.import import java.util.Iterator; import java.util.Vector; -import mycompiler.MyCompiler; -import mycompiler.mytype.Pair; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; + import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -16,9 +13,16 @@ import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListe import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.unify.Unify; + import org.apache.log4j.Logger; // ino.end + +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; + // ino.class.ExprStmt.25265.declaration public abstract class ExprStmt extends Statement implements ITypeReplacementListener // ino.end diff --git a/src/mycompiler/mystatement/FloatLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java similarity index 92% rename from src/mycompiler/mystatement/FloatLiteral.java rename to src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java index 55cec4f8..effc2c05 100755 --- a/src/mycompiler/mystatement/FloatLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java @@ -1,20 +1,14 @@ // ino.module.IntLiteral.8635.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.IntLiteral.8635.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.FloatType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -23,10 +17,16 @@ import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.FloatType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/ForStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java similarity index 84% rename from src/mycompiler/mystatement/ForStmt.java rename to src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java index 51e25223..16c7de49 100755 --- a/src/mycompiler/mystatement/ForStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java @@ -1,26 +1,17 @@ -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.myoperator.LogOp; -import mycompiler.myoperator.Operator; -import mycompiler.myoperator.RelOp; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -32,11 +23,20 @@ import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.operator.LogOp; +import de.dhbwstuttgart.syntaxtree.operator.Operator; +import de.dhbwstuttgart.syntaxtree.operator.RelOp; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/IfStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java similarity index 94% rename from src/mycompiler/mystatement/IfStmt.java rename to src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java index 421323af..8660dba0 100755 --- a/src/mycompiler/mystatement/IfStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java @@ -1,5 +1,5 @@ // ino.module.IfStmt.8632.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.IfStmt.8632.import import java.util.Enumeration; @@ -7,25 +7,13 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.myoperator.LogOp; -import mycompiler.myoperator.Operator; -import mycompiler.myoperator.RelOp; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; @@ -42,13 +30,33 @@ import org.apache.log4j.Logger; + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.operator.LogOp; +import de.dhbwstuttgart.syntaxtree.operator.Operator; +import de.dhbwstuttgart.syntaxtree.operator.RelOp; +import de.dhbwstuttgart.syntaxtree.type.BooleanType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.SingleConstraint; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/InstVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java similarity index 90% rename from src/mycompiler/mystatement/InstVar.java rename to src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java index 45a2ba42..86f93b4e 100755 --- a/src/mycompiler/mystatement/InstVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java @@ -1,5 +1,5 @@ // ino.module.InstVar.8634.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.InstVar.8634.import import java.util.Enumeration; @@ -7,22 +7,13 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; -import mycompiler.myclass.UsedId; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; @@ -39,14 +30,32 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.JavaCodeResult; -import typinferenz.OderConstraint; -import typinferenz.ResultSet; -import typinferenz.UndConstraint; -import typinferenz.assumptions.FieldAssumption; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.UndConstraint; +import de.dhbwstuttgart.typeinference.assumptions.FieldAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/InstanceOf.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java similarity index 88% rename from src/mycompiler/mystatement/InstanceOf.java rename to src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java index 07975f8b..a3a29ef3 100755 --- a/src/mycompiler/mystatement/InstanceOf.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java @@ -1,23 +1,17 @@ // ino.module.InstanceOf.8633.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.InstanceOf.8633.import import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -29,10 +23,23 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.BooleanType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/IntLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java similarity index 92% rename from src/mycompiler/mystatement/IntLiteral.java rename to src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java index 4b486986..ec93cb4e 100755 --- a/src/mycompiler/mystatement/IntLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java @@ -1,21 +1,15 @@ // ino.module.IntLiteral.8635.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.IntLiteral.8635.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -28,11 +22,24 @@ import org.apache.log4j.Logger; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.IntegerType; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/LambdaExpression.java b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java similarity index 85% rename from src/mycompiler/mystatement/LambdaExpression.java rename to src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java index 3374ecfb..5ba7b038 100755 --- a/src/mycompiler/mystatement/LambdaExpression.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java @@ -1,34 +1,34 @@ -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import typinferenz.JavaCodeResult; -import typinferenz.SingleConstraint; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.FunN; -import typinferenz.ResultSet; -import typinferenz.Typeable; -import typinferenz.assumptions.ParameterAssumption; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; -import mycompiler.SyntaxTreeNode; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ClassHelper; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.type.DoubleType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.FunN; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.Typeable; +import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassHelper; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.Method; -import mycompiler.myclass.ParameterList; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.DoubleType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/mycompiler/mystatement/LambdaParameter.java b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaParameter.java similarity index 58% rename from src/mycompiler/mystatement/LambdaParameter.java rename to src/de/dhbwstuttgart/syntaxtree/statement/LambdaParameter.java index 4dad882a..c97636e2 100644 --- a/src/mycompiler/mystatement/LambdaParameter.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaParameter.java @@ -1,11 +1,11 @@ -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; -import typinferenz.ResultSet; -import typinferenz.typedeployment.TypeInsertPoint; -import mycompiler.myclass.DeclId; -import mycompiler.myclass.FormalParameter; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; /** * Der FormalParameter einer LambdaExpression hat gesonderte Eigenschaften. diff --git a/src/mycompiler/mystatement/Literal.java b/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java similarity index 98% rename from src/mycompiler/mystatement/Literal.java rename to src/de/dhbwstuttgart/syntaxtree/statement/Literal.java index 41274a68..4b4ae7d2 100755 --- a/src/mycompiler/mystatement/Literal.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java @@ -1,5 +1,5 @@ // ino.module.Literal.8636.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Literal.8636.import diff --git a/src/mycompiler/mystatement/LocalOrFieldVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java similarity index 89% rename from src/mycompiler/mystatement/LocalOrFieldVar.java rename to src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java index 53958a98..ece05e0a 100755 --- a/src/mycompiler/mystatement/LocalOrFieldVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java @@ -1,25 +1,18 @@ // ino.module.LocalOrFieldVar.8637.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.LocalOrFieldVar.8637.import import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; -import mycompiler.myclass.UsedId; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -35,14 +28,30 @@ import org.apache.log4j.Logger; + + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.SingleConstraint; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; diff --git a/src/mycompiler/mystatement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java similarity index 93% rename from src/mycompiler/mystatement/LocalVarDecl.java rename to src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java index 76b19cd6..d69fa85e 100755 --- a/src/mycompiler/mystatement/LocalVarDecl.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java @@ -1,5 +1,5 @@ // ino.module.LocalVarDecl.8638.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.LocalVarDecl.8638.import import java.util.Enumeration; @@ -8,19 +8,9 @@ import java.util.Vector; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassHelper; -import mycompiler.myclass.DeclId; -import mycompiler.MyCompiler; -import mycompiler.SyntaxTreeNode; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -43,16 +33,36 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.SingleConstraint; -import typinferenz.TypeInsertable; -import typinferenz.assumptions.LocalVarAssumption; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; -import typinferenz.typedeployment.TypeInsertPoint; + + + + + + + + + + +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ClassHelper; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.assumptions.LocalVarAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; diff --git a/src/mycompiler/mystatement/LongLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java similarity index 91% rename from src/mycompiler/mystatement/LongLiteral.java rename to src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java index 31d1b724..73d5e9d2 100755 --- a/src/mycompiler/mystatement/LongLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java @@ -1,22 +1,15 @@ // ino.module.IntLiteral.8635.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.IntLiteral.8635.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.LongType; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -26,12 +19,19 @@ import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.IntegerType; +import de.dhbwstuttgart.syntaxtree.type.LongType; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; // ino.end -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/MethodCall.java b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java similarity index 95% rename from src/mycompiler/mystatement/MethodCall.java rename to src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java index ab73632c..2e61c530 100755 --- a/src/mycompiler/mystatement/MethodCall.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java @@ -1,5 +1,5 @@ // ino.module.MethodCall.8639.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.MethodCall.8639.import import java.util.Enumeration; @@ -7,35 +7,19 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassBody; -import mycompiler.myclass.DeclId; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.Method; -import mycompiler.myclass.ParameterList; -import mycompiler.myclass.UsedId; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CIntersectionType; import mycompiler.mytypereconstruction.CMultiplyTuple; import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.CSubstitutionGenVar; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import mycompiler.mytypereconstruction.set.CMultiplyTupleSet; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -52,13 +36,39 @@ import org.apache.log4j.Logger; + + + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ClassBody; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.Overloading; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.JavaCodeResult; -import typinferenz.Overloading; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/NegativeExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java similarity index 87% rename from src/mycompiler/mystatement/NegativeExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java index 4263d128..0c43064a 100755 --- a/src/mycompiler/mystatement/NegativeExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java @@ -1,24 +1,17 @@ // ino.module.NegativeExpr.8640.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.NegativeExpr.8640.import import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -32,10 +25,24 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/NewArray.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java similarity index 93% rename from src/mycompiler/mystatement/NewArray.java rename to src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java index cf07bbc8..eb25c781 100755 --- a/src/mycompiler/mystatement/NewArray.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java @@ -1,19 +1,15 @@ // ino.module.NewArray.8641.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.NewArray.8641.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -25,10 +21,21 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/NewClass.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java similarity index 89% rename from src/mycompiler/mystatement/NewClass.java rename to src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java index 9f250fff..c5bbc717 100755 --- a/src/mycompiler/mystatement/NewClass.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java @@ -1,5 +1,5 @@ // ino.module.NewClass.8642.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.NewClass.8642.import import java.util.Enumeration; @@ -7,21 +7,13 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; -import mycompiler.myclass.UsedId; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CMultiplyTuple; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; @@ -41,17 +33,34 @@ import org.apache.log4j.Logger; -import typinferenz.JavaCodeResult; -import typinferenz.Overloading; -import typinferenz.SingleConstraint; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.FunN; -import typinferenz.ResultSet; -import typinferenz.UndConstraint; -import typinferenz.assumptions.ConstructorAssumption; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; + + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.FunN; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.Overloading; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.UndConstraint; +import de.dhbwstuttgart.typeinference.assumptions.ConstructorAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; diff --git a/src/mycompiler/mystatement/NotExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java similarity index 86% rename from src/mycompiler/mystatement/NotExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java index 607d25d4..b86208ce 100755 --- a/src/mycompiler/mystatement/NotExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java @@ -1,24 +1,16 @@ // ino.module.NotExpr.8643.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.NotExpr.8643.import import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -34,11 +26,26 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.OderConstraint; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.BooleanType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/Null.java b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java similarity index 86% rename from src/mycompiler/mystatement/Null.java rename to src/de/dhbwstuttgart/syntaxtree/statement/Null.java index 58db707f..1743e136 100755 --- a/src/mycompiler/mystatement/Null.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java @@ -1,20 +1,15 @@ // ino.module.Null.8644.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Null.8644.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -27,10 +22,22 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/PositivExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java similarity index 89% rename from src/mycompiler/mystatement/PositivExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java index d086074b..f3e8659d 100755 --- a/src/mycompiler/mystatement/PositivExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java @@ -1,18 +1,14 @@ // ino.module.PositivExpr.8645.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.PositivExpr.8645.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -24,10 +20,21 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/PostDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java similarity index 90% rename from src/mycompiler/mystatement/PostDecExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java index 91c0f37c..e8d7293e 100755 --- a/src/mycompiler/mystatement/PostDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java @@ -1,25 +1,18 @@ // ino.module.PostDecExpr.8646.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.PostDecExpr.8646.import import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -33,10 +26,24 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/PostIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java similarity index 88% rename from src/mycompiler/mystatement/PostIncExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java index c17300d0..2aed476d 100755 --- a/src/mycompiler/mystatement/PostIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java @@ -1,26 +1,18 @@ // ino.module.PostIncExpr.8647.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.PostIncExpr.8647.import import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -37,12 +29,27 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.OderConstraint; -import typinferenz.ResultSet; -import typinferenz.UndConstraint; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.UndConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/PreDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java similarity index 90% rename from src/mycompiler/mystatement/PreDecExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java index 5f0c0718..bba29488 100755 --- a/src/mycompiler/mystatement/PreDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java @@ -1,25 +1,18 @@ // ino.module.PreDecExpr.8648.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.PreDecExpr.8648.import import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -33,10 +26,24 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/PreIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java similarity index 90% rename from src/mycompiler/mystatement/PreIncExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java index de1e4de5..fdef9377 100755 --- a/src/mycompiler/mystatement/PreIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java @@ -1,25 +1,18 @@ // ino.module.PreIncExpr.8649.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.PreIncExpr.8649.import import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.Void; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -33,10 +26,24 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/Receiver.java b/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java similarity index 90% rename from src/mycompiler/mystatement/Receiver.java rename to src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java index 650839f5..1b566fc1 100755 --- a/src/mycompiler/mystatement/Receiver.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java @@ -1,16 +1,21 @@ // ino.module.Receiver.8650.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Receiver.8650.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.myclass.Class; + import mycompiler.myexception.SCStatementException; + import org.apache.log4j.Logger; // ino.end -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; + + + +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/mystatement/Return.java b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java similarity index 86% rename from src/mycompiler/mystatement/Return.java rename to src/de/dhbwstuttgart/syntaxtree/statement/Return.java index 5e9b7dd8..6a4421d9 100755 --- a/src/mycompiler/mystatement/Return.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java @@ -1,22 +1,17 @@ // ino.module.Return.8651.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Return.8651.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -29,13 +24,25 @@ import org.apache.log4j.Logger; + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.FreshTypeVariable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.SingleConstraint; -import typinferenz.ConstraintsSet; -import typinferenz.FreshTypeVariable; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/Statement.java b/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java similarity index 86% rename from src/mycompiler/mystatement/Statement.java rename to src/de/dhbwstuttgart/syntaxtree/statement/Statement.java index 87478156..879bc88e 100755 --- a/src/mycompiler/mystatement/Statement.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java @@ -1,29 +1,29 @@ // ino.module.Statement.8652.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Statement.8652.import import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.Typeable; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.Typeable; -import typinferenz.assumptions.TypeAssumptions; -import mycompiler.IItemWithOffset; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; @@ -153,7 +153,7 @@ public abstract class Statement extends SyntaxTreeNode implements IItemWithOffse } public Type getReturnType(){ - return new mycompiler.mytype.Void(-1); + return new de.dhbwstuttgart.syntaxtree.type.Void(-1); } } // ino.end diff --git a/src/mycompiler/mystatement/StringLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java similarity index 86% rename from src/mycompiler/mystatement/StringLiteral.java rename to src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java index 9e56bc8a..53fbdc68 100755 --- a/src/mycompiler/mystatement/StringLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java @@ -1,21 +1,15 @@ // ino.module.StringLiteral.8653.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.StringLiteral.8653.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.CharacterType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -28,11 +22,25 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.CharacterType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; diff --git a/src/mycompiler/mystatement/This.java b/src/de/dhbwstuttgart/syntaxtree/statement/This.java similarity index 90% rename from src/mycompiler/mystatement/This.java rename to src/de/dhbwstuttgart/syntaxtree/statement/This.java index a77bb222..3be2dbc1 100755 --- a/src/mycompiler/mystatement/This.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/This.java @@ -1,22 +1,16 @@ // ino.module.This.8654.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.This.8654.import import java.util.Hashtable; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; -import mycompiler.myclass.UsedId; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCStatementException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -29,10 +23,24 @@ import org.apache.log4j.Logger; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mystatement/UnaryExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.java similarity index 82% rename from src/mycompiler/mystatement/UnaryExpr.java rename to src/de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.java index 86b32dd3..972ed71d 100755 --- a/src/mycompiler/mystatement/UnaryExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.java @@ -1,19 +1,19 @@ // ino.module.UnaryExpr.8655.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.UnaryExpr.8655.import import java.util.Vector; -import typinferenz.ConstraintsSet; -import typinferenz.OderConstraint; -import typinferenz.UndConstraint; -import typinferenz.assumptions.TypeAssumptions; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.UndConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.myexception.JVMCodeException; // ino.end -import mycompiler.mytype.RefType; -import mycompiler.mytype.TypePlaceholder; diff --git a/src/mycompiler/mystatement/UnaryMinus.java b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryMinus.java similarity index 93% rename from src/mycompiler/mystatement/UnaryMinus.java rename to src/de/dhbwstuttgart/syntaxtree/statement/UnaryMinus.java index cad93987..d473aa47 100755 --- a/src/mycompiler/mystatement/UnaryMinus.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryMinus.java @@ -1,5 +1,5 @@ // ino.module.UnaryMinus.8656.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.UnaryMinus.8656.import diff --git a/src/mycompiler/mystatement/UnaryNot.java b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryNot.java similarity index 96% rename from src/mycompiler/mystatement/UnaryNot.java rename to src/de/dhbwstuttgart/syntaxtree/statement/UnaryNot.java index c2cb7b0c..f884b9b8 100755 --- a/src/mycompiler/mystatement/UnaryNot.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryNot.java @@ -1,5 +1,5 @@ // ino.module.UnaryNot.8657.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.UnaryNot.8657.import diff --git a/src/mycompiler/mystatement/UnaryPlus.java b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryPlus.java similarity index 78% rename from src/mycompiler/mystatement/UnaryPlus.java rename to src/de/dhbwstuttgart/syntaxtree/statement/UnaryPlus.java index 5fbdddf3..32432ca1 100755 --- a/src/mycompiler/mystatement/UnaryPlus.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryPlus.java @@ -1,5 +1,5 @@ // ino.module.UnaryPlus.8658.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.class.UnaryPlus.26323.declaration public class UnaryPlus diff --git a/src/mycompiler/mystatement/WhileStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java similarity index 88% rename from src/mycompiler/mystatement/WhileStmt.java rename to src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java index ee4e880d..600e3fb2 100755 --- a/src/mycompiler/mystatement/WhileStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java @@ -1,5 +1,5 @@ // ino.module.WhileStmt.8659.package -package mycompiler.mystatement; +package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.WhileStmt.8659.import import java.util.Enumeration; @@ -7,23 +7,13 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.SyntaxTreeNode; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.Class; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.JVMCodeException; import mycompiler.myexception.SCExcept; import mycompiler.myexception.SCStatementException; -import mycompiler.myoperator.LogOp; -import mycompiler.myoperator.Operator; -import mycompiler.myoperator.RelOp; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -38,12 +28,30 @@ import org.apache.log4j.Logger; + + + + + + + + +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.operator.LogOp; +import de.dhbwstuttgart.syntaxtree.operator.Operator; +import de.dhbwstuttgart.syntaxtree.operator.RelOp; +import de.dhbwstuttgart.syntaxtree.type.BooleanType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.SingleConstraint; -import typinferenz.ConstraintsSet; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; diff --git a/src/mycompiler/mytype/BaseType.java b/src/de/dhbwstuttgart/syntaxtree/type/BaseType.java similarity index 93% rename from src/mycompiler/mytype/BaseType.java rename to src/de/dhbwstuttgart/syntaxtree/type/BaseType.java index 21c0c6f9..944d19e8 100755 --- a/src/mycompiler/mytype/BaseType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/BaseType.java @@ -1,8 +1,8 @@ // ino.module.BaseType.8667.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import mycompiler.IItemWithOffset; -import typinferenz.assumptions.TypeAssumptions; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; // ino.end // ino.class.BaseType.26435.declaration diff --git a/src/mycompiler/mytype/BooleanType.java b/src/de/dhbwstuttgart/syntaxtree/type/BooleanType.java similarity index 89% rename from src/mycompiler/mytype/BooleanType.java rename to src/de/dhbwstuttgart/syntaxtree/type/BooleanType.java index b66073f7..2b8dce52 100755 --- a/src/mycompiler/mytype/BooleanType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/BooleanType.java @@ -1,8 +1,8 @@ // ino.module.BooleanType.8668.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.end // ino.class.BooleanType.26451.declaration diff --git a/src/mycompiler/mytype/BoundedGenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java similarity index 93% rename from src/mycompiler/mytype/BoundedGenericTypeVar.java rename to src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java index 80632722..7d0f3308 100755 --- a/src/mycompiler/mytype/BoundedGenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java @@ -1,17 +1,17 @@ // ino.module.BoundedGenericTypeVar.8669.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; // ino.end // ino.module.BoundedGenericTypeVar.8669.import import java.util.Vector; +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import sun.reflect.generics.reflectiveObjects.NotImplementedException; // ino.end -import typinferenz.ConstraintsSet; -import typinferenz.SingleConstraint; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; // ino.class.BoundedGenericTypeVar.26464.description type=javadoc /** diff --git a/src/mycompiler/mytype/CRefTypeSet.java b/src/de/dhbwstuttgart/syntaxtree/type/CRefTypeSet.java similarity index 94% rename from src/mycompiler/mytype/CRefTypeSet.java rename to src/de/dhbwstuttgart/syntaxtree/type/CRefTypeSet.java index 296d9e26..9c909450 100755 --- a/src/mycompiler/mytype/CRefTypeSet.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/CRefTypeSet.java @@ -1,4 +1,4 @@ -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; import java.util.Iterator; import java.util.Vector; diff --git a/src/mycompiler/mytype/CharacterType.java b/src/de/dhbwstuttgart/syntaxtree/type/CharacterType.java similarity index 90% rename from src/mycompiler/mytype/CharacterType.java rename to src/de/dhbwstuttgart/syntaxtree/type/CharacterType.java index b8c78462..0b7d61be 100755 --- a/src/mycompiler/mytype/CharacterType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/CharacterType.java @@ -1,8 +1,8 @@ // ino.module.CharacterType.8670.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.end // ino.class.CharacterType.26492.declaration diff --git a/src/mycompiler/mytype/DoubleType.java b/src/de/dhbwstuttgart/syntaxtree/type/DoubleType.java similarity index 89% rename from src/mycompiler/mytype/DoubleType.java rename to src/de/dhbwstuttgart/syntaxtree/type/DoubleType.java index a497d5e7..975afd92 100755 --- a/src/mycompiler/mytype/DoubleType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/DoubleType.java @@ -1,8 +1,8 @@ // ino.module.IntegerType.8672.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.end // ino.class.IntegerType.26527.declaration diff --git a/src/mycompiler/mytype/ExtendsWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java similarity index 98% rename from src/mycompiler/mytype/ExtendsWildcardType.java rename to src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java index 132958c6..9ef46ec7 100755 --- a/src/mycompiler/mytype/ExtendsWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java @@ -1,4 +1,4 @@ -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; /** diff --git a/src/mycompiler/mytype/FloatType.java b/src/de/dhbwstuttgart/syntaxtree/type/FloatType.java similarity index 89% rename from src/mycompiler/mytype/FloatType.java rename to src/de/dhbwstuttgart/syntaxtree/type/FloatType.java index bcfde725..fa5e7a9c 100755 --- a/src/mycompiler/mytype/FloatType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FloatType.java @@ -1,8 +1,8 @@ // ino.module.IntegerType.8672.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.end // ino.class.IntegerType.26527.declaration diff --git a/src/mycompiler/mytype/FreshExtendsWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/FreshExtendsWildcardType.java similarity index 97% rename from src/mycompiler/mytype/FreshExtendsWildcardType.java rename to src/de/dhbwstuttgart/syntaxtree/type/FreshExtendsWildcardType.java index 731d9376..b79d6c72 100755 --- a/src/mycompiler/mytype/FreshExtendsWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FreshExtendsWildcardType.java @@ -1,4 +1,4 @@ -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; public class FreshExtendsWildcardType extends FreshWildcardType implements IMatchable { diff --git a/src/mycompiler/mytype/FreshSuperWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/FreshSuperWildcardType.java similarity index 97% rename from src/mycompiler/mytype/FreshSuperWildcardType.java rename to src/de/dhbwstuttgart/syntaxtree/type/FreshSuperWildcardType.java index 66889b79..a48cd03e 100755 --- a/src/mycompiler/mytype/FreshSuperWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FreshSuperWildcardType.java @@ -1,4 +1,4 @@ -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; public class FreshSuperWildcardType extends FreshWildcardType implements IMatchable { diff --git a/src/mycompiler/mytype/FreshWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java similarity index 96% rename from src/mycompiler/mytype/FreshWildcardType.java rename to src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java index e1eb4a9c..cdbba367 100755 --- a/src/mycompiler/mytype/FreshWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java @@ -1,10 +1,10 @@ -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; import java.util.Vector; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; public class FreshWildcardType extends Type { diff --git a/src/mycompiler/mytype/GenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java similarity index 92% rename from src/mycompiler/mytype/GenericTypeVar.java rename to src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java index efb5b9e3..7c6e47ab 100755 --- a/src/mycompiler/mytype/GenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java @@ -1,5 +1,5 @@ // ino.module.GenericTypeVar.8671.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; // ino.end // ino.module.GenericTypeVar.8671.import @@ -18,15 +18,20 @@ import java.util.Vector; + + + + + +import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.SingleConstraint; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; -import typinferenz.ConstraintsSet; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.SingleConstraint; -import typinferenz.TypeInsertable; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.typedeployment.TypeInsertPoint; // ino.class.GenericTypeVar.26505.description type=javadoc diff --git a/src/mycompiler/mytype/IMatchable.java b/src/de/dhbwstuttgart/syntaxtree/type/IMatchable.java similarity index 90% rename from src/mycompiler/mytype/IMatchable.java rename to src/de/dhbwstuttgart/syntaxtree/type/IMatchable.java index 0981d13f..0395001e 100755 --- a/src/mycompiler/mytype/IMatchable.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/IMatchable.java @@ -1,4 +1,4 @@ -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; /** * Dieses Interface wird von allen Klassen implementiert, die weitere Klassen diff --git a/src/mycompiler/mytype/ITypeContainer.java b/src/de/dhbwstuttgart/syntaxtree/type/ITypeContainer.java similarity index 89% rename from src/mycompiler/mytype/ITypeContainer.java rename to src/de/dhbwstuttgart/syntaxtree/type/ITypeContainer.java index 0b7fdbae..2c8ad5c0 100755 --- a/src/mycompiler/mytype/ITypeContainer.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/ITypeContainer.java @@ -1,4 +1,4 @@ -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; /** * Dieses Interface wird von allen Klassen implementiert, die weitere Klassen enthalten. diff --git a/src/mycompiler/mytype/IntegerType.java b/src/de/dhbwstuttgart/syntaxtree/type/IntegerType.java similarity index 89% rename from src/mycompiler/mytype/IntegerType.java rename to src/de/dhbwstuttgart/syntaxtree/type/IntegerType.java index 4fa05458..1bd61acf 100755 --- a/src/mycompiler/mytype/IntegerType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/IntegerType.java @@ -1,8 +1,8 @@ // ino.module.IntegerType.8672.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.end // ino.class.IntegerType.26527.declaration diff --git a/src/mycompiler/mytype/LongType.java b/src/de/dhbwstuttgart/syntaxtree/type/LongType.java similarity index 89% rename from src/mycompiler/mytype/LongType.java rename to src/de/dhbwstuttgart/syntaxtree/type/LongType.java index 9a28792f..53612cb3 100755 --- a/src/mycompiler/mytype/LongType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/LongType.java @@ -1,8 +1,8 @@ // ino.module.IntegerType.8672.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.end // ino.class.IntegerType.26527.declaration diff --git a/src/mycompiler/mytype/Pair.java b/src/de/dhbwstuttgart/syntaxtree/type/Pair.java similarity index 99% rename from src/mycompiler/mytype/Pair.java rename to src/de/dhbwstuttgart/syntaxtree/type/Pair.java index 35ce4b3d..5e14f3d5 100755 --- a/src/mycompiler/mytype/Pair.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Pair.java @@ -1,5 +1,5 @@ // ino.module.Pair.8673.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; // ino.end // ino.module.Pair.8673.import import java.util.Hashtable; diff --git a/src/mycompiler/mytype/ParaList.java b/src/de/dhbwstuttgart/syntaxtree/type/ParaList.java similarity index 97% rename from src/mycompiler/mytype/ParaList.java rename to src/de/dhbwstuttgart/syntaxtree/type/ParaList.java index 2ea154bb..efa0b35f 100755 --- a/src/mycompiler/mytype/ParaList.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/ParaList.java @@ -1,5 +1,5 @@ // ino.module.ParaList.8674.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; // ino.end // ino.module.ParaList.8674.import import java.util.Vector; diff --git a/src/mycompiler/mytype/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java similarity index 98% rename from src/mycompiler/mytype/RefType.java rename to src/de/dhbwstuttgart/syntaxtree/type/RefType.java index 6cc1a93a..5c70c5fe 100755 --- a/src/mycompiler/mytype/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -1,5 +1,5 @@ // ino.module.RefType.8675.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; // ino.end // ino.module.RefType.8675.import import java.util.ArrayList; @@ -8,9 +8,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.IItemWithOffset; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.UsedId; import mycompiler.myexception.SCException; import mycompiler.mytypereconstruction.CSubstitutionGenVar; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -23,12 +21,22 @@ import org.apache.log4j.Logger; + + + + + + + + +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.TypeInsertable; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; diff --git a/src/mycompiler/mytype/ReturnType.java b/src/de/dhbwstuttgart/syntaxtree/type/ReturnType.java similarity index 89% rename from src/mycompiler/mytype/ReturnType.java rename to src/de/dhbwstuttgart/syntaxtree/type/ReturnType.java index c7663f45..0d93f65f 100755 --- a/src/mycompiler/mytype/ReturnType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/ReturnType.java @@ -1,8 +1,8 @@ // ino.module.ReturnType.8676.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.end // ino.class.ReturnType.26703.declaration diff --git a/src/mycompiler/mytype/SuperWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java similarity index 94% rename from src/mycompiler/mytype/SuperWildcardType.java rename to src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java index 1a65a4c2..3c7d6bcc 100755 --- a/src/mycompiler/mytype/SuperWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java @@ -1,7 +1,7 @@ -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; /** * Stellt eine Wildcard mit unterer Grenze dar. diff --git a/src/mycompiler/mytype/Type.java b/src/de/dhbwstuttgart/syntaxtree/type/Type.java similarity index 94% rename from src/mycompiler/mytype/Type.java rename to src/de/dhbwstuttgart/syntaxtree/type/Type.java index d5f7dcc0..6d0d73c5 100755 --- a/src/mycompiler/mytype/Type.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Type.java @@ -1,19 +1,18 @@ // ino.module.Type.8677.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; // ino.end // ino.module.Type.8677.import import java.util.ArrayList; import java.util.Vector; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; -import mycompiler.IItemWithOffset; -import mycompiler.SyntaxTreeNode; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.mybytecode.JVMCode; -import mycompiler.myclass.UsedId; -// ino.end diff --git a/src/mycompiler/mytype/TypePlaceholder.java b/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java similarity index 98% rename from src/mycompiler/mytype/TypePlaceholder.java rename to src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java index aab6d4da..e4d79441 100755 --- a/src/mycompiler/mytype/TypePlaceholder.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java @@ -1,5 +1,5 @@ // ino.module.TypePlaceholder.8678.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; // ino.end // ino.module.TypePlaceholder.8678.import @@ -8,12 +8,12 @@ import java.util.Iterator; import java.util.Vector; import java.util.logging.Logger; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.TypeInsertable; -import typinferenz.typedeployment.TypeInsertPoint; -import typinferenz.typedeployment.TypeInsertSet; -import mycompiler.MyCompiler; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.IReplaceTypeEventProvider; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; diff --git a/src/mycompiler/mytype/Void.java b/src/de/dhbwstuttgart/syntaxtree/type/Void.java similarity index 85% rename from src/mycompiler/mytype/Void.java rename to src/de/dhbwstuttgart/syntaxtree/type/Void.java index 61426af7..4a07a13a 100755 --- a/src/mycompiler/mytype/Void.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Void.java @@ -1,10 +1,10 @@ // ino.module.Void.8679.package -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; -import mycompiler.IItemWithOffset; -import mycompiler.myclass.Method; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; // ino.end // ino.class.Void.26857.declaration diff --git a/src/mycompiler/mytype/WildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java similarity index 92% rename from src/mycompiler/mytype/WildcardType.java rename to src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java index 0a796db7..b3dd66d6 100755 --- a/src/mycompiler/mytype/WildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java @@ -1,8 +1,8 @@ -package mycompiler.mytype; +package de.dhbwstuttgart.syntaxtree.type; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; /** * Stellt eine Wildcard in Java dar. diff --git a/src/typinferenz/ConstraintsSet.java b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java similarity index 94% rename from src/typinferenz/ConstraintsSet.java rename to src/de/dhbwstuttgart/typeinference/ConstraintsSet.java index ba5aa979..6cb026fa 100755 --- a/src/typinferenz/ConstraintsSet.java +++ b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java @@ -1,9 +1,9 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytype.Pair; +import de.dhbwstuttgart.syntaxtree.type.Pair; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSet; import mycompiler.mytypereconstruction.set.CTripleSet; diff --git a/src/typinferenz/FreshTypeVariable.java b/src/de/dhbwstuttgart/typeinference/FreshTypeVariable.java similarity index 88% rename from src/typinferenz/FreshTypeVariable.java rename to src/de/dhbwstuttgart/typeinference/FreshTypeVariable.java index e381f3ab..1d3394fc 100755 --- a/src/typinferenz/FreshTypeVariable.java +++ b/src/de/dhbwstuttgart/typeinference/FreshTypeVariable.java @@ -1,7 +1,7 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; +import de.dhbwstuttgart.syntaxtree.type.Type; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.mytype.Type; public class FreshTypeVariable extends Type{ diff --git a/src/typinferenz/FunN.java b/src/de/dhbwstuttgart/typeinference/FunN.java similarity index 90% rename from src/typinferenz/FunN.java rename to src/de/dhbwstuttgart/typeinference/FunN.java index f00ae9ec..ea1616b6 100755 --- a/src/typinferenz/FunN.java +++ b/src/de/dhbwstuttgart/typeinference/FunN.java @@ -1,17 +1,17 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Iterator; import java.util.Vector; -import mycompiler.myclass.Method; -import mycompiler.myclass.ParameterList; -import typinferenz.assumptions.MethodAssumption; -import typinferenz.assumptions.TypeAssumptions; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; diff --git a/src/typinferenz/FunNInterface.java b/src/de/dhbwstuttgart/typeinference/FunNInterface.java similarity index 77% rename from src/typinferenz/FunNInterface.java rename to src/de/dhbwstuttgart/typeinference/FunNInterface.java index 0b5e3dec..d9226f4f 100644 --- a/src/typinferenz/FunNInterface.java +++ b/src/de/dhbwstuttgart/typeinference/FunNInterface.java @@ -1,13 +1,15 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Vector; -import typinferenz.assumptions.ClassAssumption; -import typinferenz.assumptions.MethodAssumption; -import typinferenz.assumptions.TypeAssumptions; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.assumptions.ClassAssumption; +import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import mycompiler.mytype.*; -import mycompiler.myclass.Class; -import mycompiler.mytype.TypePlaceholder; /** * Stellt das Interface FunN dar. diff --git a/src/typinferenz/FunNMethod.java b/src/de/dhbwstuttgart/typeinference/FunNMethod.java similarity index 81% rename from src/typinferenz/FunNMethod.java rename to src/de/dhbwstuttgart/typeinference/FunNMethod.java index 269a58ab..bb61be65 100644 --- a/src/typinferenz/FunNMethod.java +++ b/src/de/dhbwstuttgart/typeinference/FunNMethod.java @@ -1,11 +1,16 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Vector; -import typinferenz.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import mycompiler.mytype.*; import mycompiler.myclass.*; -import mycompiler.mytype.TypePlaceholder; public class FunNMethod extends Method{ /** diff --git a/src/typinferenz/GenericTypeInsertable.java b/src/de/dhbwstuttgart/typeinference/GenericTypeInsertable.java similarity index 88% rename from src/typinferenz/GenericTypeInsertable.java rename to src/de/dhbwstuttgart/typeinference/GenericTypeInsertable.java index 1d676f76..b6694ce1 100644 --- a/src/typinferenz/GenericTypeInsertable.java +++ b/src/de/dhbwstuttgart/typeinference/GenericTypeInsertable.java @@ -1,4 +1,4 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; /** * Wird von Knoten im Syntaxbaum implementiert, welche ein Einsetzen von generischen Variablendeklarationen erlauben. diff --git a/src/typinferenz/JavaCodeResult.java b/src/de/dhbwstuttgart/typeinference/JavaCodeResult.java similarity index 94% rename from src/typinferenz/JavaCodeResult.java rename to src/de/dhbwstuttgart/typeinference/JavaCodeResult.java index 4ec7160c..bd9c1978 100755 --- a/src/typinferenz/JavaCodeResult.java +++ b/src/de/dhbwstuttgart/typeinference/JavaCodeResult.java @@ -1,11 +1,10 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Vector; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.mytype.TypePlaceholder; - public class JavaCodeResult{ private String javaCode = ""; diff --git a/src/typinferenz/KarthesischesProdukt.java b/src/de/dhbwstuttgart/typeinference/KarthesischesProdukt.java similarity index 97% rename from src/typinferenz/KarthesischesProdukt.java rename to src/de/dhbwstuttgart/typeinference/KarthesischesProdukt.java index 7add75e3..48db9ff3 100755 --- a/src/typinferenz/KarthesischesProdukt.java +++ b/src/de/dhbwstuttgart/typeinference/KarthesischesProdukt.java @@ -1,4 +1,4 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Vector; diff --git a/src/typinferenz/OderConstraint.java b/src/de/dhbwstuttgart/typeinference/OderConstraint.java similarity index 88% rename from src/typinferenz/OderConstraint.java rename to src/de/dhbwstuttgart/typeinference/OderConstraint.java index 61aff4fe..92aa327a 100755 --- a/src/typinferenz/OderConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/OderConstraint.java @@ -1,11 +1,11 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Vector; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; public class OderConstraint{ private Vector oderConstraintPairs; diff --git a/src/typinferenz/Overloading.java b/src/de/dhbwstuttgart/typeinference/Overloading.java similarity index 88% rename from src/typinferenz/Overloading.java rename to src/de/dhbwstuttgart/typeinference/Overloading.java index d371e2f7..c06421ec 100755 --- a/src/typinferenz/Overloading.java +++ b/src/de/dhbwstuttgart/typeinference/Overloading.java @@ -1,15 +1,15 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Vector; -import typinferenz.assumptions.MethodAssumption; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.MethodCall; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.statement.MethodCall; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; diff --git a/src/typinferenz/ResultSet.java b/src/de/dhbwstuttgart/typeinference/ResultSet.java similarity index 94% rename from src/typinferenz/ResultSet.java rename to src/de/dhbwstuttgart/typeinference/ResultSet.java index 997c5c1d..0a124ca2 100755 --- a/src/typinferenz/ResultSet.java +++ b/src/de/dhbwstuttgart/typeinference/ResultSet.java @@ -1,11 +1,11 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytype.Pair; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; /** * Im Grunde Sammlung von Pair s mit Equal-Operatoren. diff --git a/src/typinferenz/SingleConstraint.java b/src/de/dhbwstuttgart/typeinference/SingleConstraint.java similarity index 88% rename from src/typinferenz/SingleConstraint.java rename to src/de/dhbwstuttgart/typeinference/SingleConstraint.java index 12d35320..b6bf0d2a 100755 --- a/src/typinferenz/SingleConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/SingleConstraint.java @@ -1,14 +1,14 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Vector; -import typinferenz.exceptions.DebugException; -import typinferenz.exceptions.TypeinferenceException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CTripleSet; diff --git a/src/typinferenz/TIPConstraints.java b/src/de/dhbwstuttgart/typeinference/TIPConstraints.java similarity index 62% rename from src/typinferenz/TIPConstraints.java rename to src/de/dhbwstuttgart/typeinference/TIPConstraints.java index d664e601..e65fd9bd 100644 --- a/src/typinferenz/TIPConstraints.java +++ b/src/de/dhbwstuttgart/typeinference/TIPConstraints.java @@ -1,8 +1,8 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Vector; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; /** * diff --git a/src/typinferenz/TypeInsertable.java b/src/de/dhbwstuttgart/typeinference/TypeInsertable.java similarity index 73% rename from src/typinferenz/TypeInsertable.java rename to src/de/dhbwstuttgart/typeinference/TypeInsertable.java index ca93a49e..bd283a5e 100644 --- a/src/typinferenz/TypeInsertable.java +++ b/src/de/dhbwstuttgart/typeinference/TypeInsertable.java @@ -1,8 +1,8 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; -import typinferenz.typedeployment.TypeInsertPoint; -import mycompiler.IItemWithOffset; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; public interface TypeInsertable extends ITypeReplacementListener, Typeable, IItemWithOffset { diff --git a/src/typinferenz/Typeable.java b/src/de/dhbwstuttgart/typeinference/Typeable.java similarity index 87% rename from src/typinferenz/Typeable.java rename to src/de/dhbwstuttgart/typeinference/Typeable.java index 2f307e2b..bfcc3559 100755 --- a/src/typinferenz/Typeable.java +++ b/src/de/dhbwstuttgart/typeinference/Typeable.java @@ -1,6 +1,6 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; public interface Typeable { diff --git a/src/mycompiler/mytypereconstruction/TypeinferenceResultSet.java b/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java similarity index 81% rename from src/mycompiler/mytypereconstruction/TypeinferenceResultSet.java rename to src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java index 51575b45..77eee759 100755 --- a/src/mycompiler/mytypereconstruction/TypeinferenceResultSet.java +++ b/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java @@ -1,5 +1,5 @@ // ino.module.CTypeReconstructionResult.8689.package -package mycompiler.mytypereconstruction; +package de.dhbwstuttgart.typeinference; // ino.end // ino.module.CTypeReconstructionResult.8689.import @@ -7,17 +7,15 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import typinferenz.ConstraintsSet; -import typinferenz.ResultSet; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; -import typinferenz.typedeployment.TypeInsertPoint; -import typinferenz.typedeployment.TypeInsertSet; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; @@ -50,10 +48,10 @@ public class TypeinferenceResultSet * Das unifizierte ConstaraintsSet */ private ResultSet unifiedConstraints; - private mycompiler.myclass.Class ownerOfResultSet;//Jedes Resultset gilt immer nur für eine Klasse. Diese wird in dieser Variable gespeichert. + private de.dhbwstuttgart.syntaxtree.Class ownerOfResultSet;//Jedes Resultset gilt immer nur für eine Klasse. Diese wird in dieser Variable gespeichert. // ino.method.CTypeReconstructionResult.27256.definition - public TypeinferenceResultSet(mycompiler.myclass.Class inferedClass, Vector constraints, ResultSet unifiedConstraints) + public TypeinferenceResultSet(de.dhbwstuttgart.syntaxtree.Class inferedClass, Vector constraints, ResultSet unifiedConstraints) // ino.end // ino.method.CTypeReconstructionResult.27256.body { @@ -97,7 +95,7 @@ public class TypeinferenceResultSet * Jedes TypeReconstructionResultSet entstand bei der Typinferierung einer Klasse. * @return Gibt die Klasse zurück der dieses ResultSet zugeordnet ist. */ - public mycompiler.myclass.Class getInterferedClass(){ + public de.dhbwstuttgart.syntaxtree.Class getInterferedClass(){ return this.ownerOfResultSet; } diff --git a/src/typinferenz/UndConstraint.java b/src/de/dhbwstuttgart/typeinference/UndConstraint.java similarity index 85% rename from src/typinferenz/UndConstraint.java rename to src/de/dhbwstuttgart/typeinference/UndConstraint.java index f5dc8808..96a0f217 100755 --- a/src/typinferenz/UndConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/UndConstraint.java @@ -1,9 +1,9 @@ -package typinferenz; +package de.dhbwstuttgart.typeinference; import java.util.Vector; -import mycompiler.mytype.Pair; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; /** * Stellt ein Constraint dar, welches aus mehreren Constraint-Paaren besteht. Diese gelten alle stets gleichzeitig / sind per "Und" miteinander verknüpft. diff --git a/src/typinferenz/assumptions/Assumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/Assumption.java similarity index 60% rename from src/typinferenz/assumptions/Assumption.java rename to src/de/dhbwstuttgart/typeinference/assumptions/Assumption.java index 1d52b9d1..d95089ca 100644 --- a/src/typinferenz/assumptions/Assumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/Assumption.java @@ -1,10 +1,11 @@ -package typinferenz.assumptions; +package de.dhbwstuttgart.typeinference.assumptions; -import typinferenz.TypeInsertable; -import typinferenz.Typeable; -import mycompiler.myparser.JavaClassName; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.Typeable; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import mycompiler.mytype.*; -import mycompiler.myclass.Class; public class Assumption { diff --git a/src/typinferenz/assumptions/ClassAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/ClassAssumption.java similarity index 87% rename from src/typinferenz/assumptions/ClassAssumption.java rename to src/de/dhbwstuttgart/typeinference/assumptions/ClassAssumption.java index 98b9f4b6..16699e0d 100644 --- a/src/typinferenz/assumptions/ClassAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/ClassAssumption.java @@ -1,7 +1,7 @@ -package typinferenz.assumptions; +package de.dhbwstuttgart.typeinference.assumptions; +import de.dhbwstuttgart.syntaxtree.Class; import mycompiler.myclass.*; -import mycompiler.myclass.Class; import mycompiler.mytype.*; /** diff --git a/src/typinferenz/assumptions/ConstructorAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/ConstructorAssumption.java similarity index 57% rename from src/typinferenz/assumptions/ConstructorAssumption.java rename to src/de/dhbwstuttgart/typeinference/assumptions/ConstructorAssumption.java index 855c40f9..8bc393bb 100644 --- a/src/typinferenz/assumptions/ConstructorAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/ConstructorAssumption.java @@ -1,9 +1,9 @@ -package typinferenz.assumptions; +package de.dhbwstuttgart.typeinference.assumptions; -import mycompiler.myclass.Class; -import mycompiler.myclass.Field; -import mycompiler.myclass.Method; -import mycompiler.mystatement.ArgumentList; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.Field; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.statement.ArgumentList; public class ConstructorAssumption extends MethodAssumption{ diff --git a/src/typinferenz/assumptions/FieldAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/FieldAssumption.java similarity index 76% rename from src/typinferenz/assumptions/FieldAssumption.java rename to src/de/dhbwstuttgart/typeinference/assumptions/FieldAssumption.java index 46243e71..79b60d5c 100644 --- a/src/typinferenz/assumptions/FieldAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/FieldAssumption.java @@ -1,9 +1,9 @@ -package typinferenz.assumptions; +package de.dhbwstuttgart.typeinference.assumptions; -import mycompiler.myclass.Field; -import mycompiler.myclass.Class; -import mycompiler.myparser.JavaClassName; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.Field; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; public class FieldAssumption extends Assumption { diff --git a/src/typinferenz/assumptions/GenericVarAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java similarity index 60% rename from src/typinferenz/assumptions/GenericVarAssumption.java rename to src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java index c564878a..9f45b5c4 100644 --- a/src/typinferenz/assumptions/GenericVarAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java @@ -1,10 +1,10 @@ -package typinferenz.assumptions; +package de.dhbwstuttgart.typeinference.assumptions; -import mycompiler.myparser.JavaClassName; -import mycompiler.mystatement.LocalVarDecl; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.statement.LocalVarDecl; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; public class GenericVarAssumption extends Assumption{ diff --git a/src/typinferenz/assumptions/LocalVarAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/LocalVarAssumption.java similarity index 67% rename from src/typinferenz/assumptions/LocalVarAssumption.java rename to src/de/dhbwstuttgart/typeinference/assumptions/LocalVarAssumption.java index 218c9fd2..11530f64 100644 --- a/src/typinferenz/assumptions/LocalVarAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/LocalVarAssumption.java @@ -1,8 +1,7 @@ -package typinferenz.assumptions; +package de.dhbwstuttgart.typeinference.assumptions; -import mycompiler.mytype.Type; - -import mycompiler.mystatement.LocalVarDecl; +import de.dhbwstuttgart.syntaxtree.statement.LocalVarDecl; +import de.dhbwstuttgart.syntaxtree.type.Type; public class LocalVarAssumption extends Assumption { private LocalVarDecl localVar; diff --git a/src/typinferenz/assumptions/MethodAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java similarity index 87% rename from src/typinferenz/assumptions/MethodAssumption.java rename to src/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java index 5981d0a1..98c8a564 100644 --- a/src/typinferenz/assumptions/MethodAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java @@ -1,13 +1,13 @@ -package typinferenz.assumptions; +package de.dhbwstuttgart.typeinference.assumptions; import java.util.Iterator; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.Method; -import mycompiler.myclass.Class; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; import mycompiler.mytype.*; -import mycompiler.myclass.Class; public class MethodAssumption extends FieldAssumption { diff --git a/src/typinferenz/assumptions/ParameterAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/ParameterAssumption.java similarity index 72% rename from src/typinferenz/assumptions/ParameterAssumption.java rename to src/de/dhbwstuttgart/typeinference/assumptions/ParameterAssumption.java index 543573d6..ffbcec8f 100644 --- a/src/typinferenz/assumptions/ParameterAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/ParameterAssumption.java @@ -1,6 +1,6 @@ -package typinferenz.assumptions; +package de.dhbwstuttgart.typeinference.assumptions; -import mycompiler.myclass.FormalParameter; +import de.dhbwstuttgart.syntaxtree.FormalParameter; /** * ParameterAssumptions repräsentieren die Methodenparameter innerhalb des Rumpfes einer Methode. diff --git a/src/typinferenz/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java similarity index 96% rename from src/typinferenz/assumptions/TypeAssumptions.java rename to src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index e2df73ab..13ee6266 100755 --- a/src/typinferenz/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -1,21 +1,19 @@ -package typinferenz.assumptions; +package de.dhbwstuttgart.typeinference.assumptions; import java.util.Iterator; - -import mycompiler.IItemWithOffset; -import mycompiler.myclass.Class; - import java.util.Vector; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.FunN; +import de.dhbwstuttgart.typeinference.FunNInterface; +import de.dhbwstuttgart.typeinference.FunNMethod; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import typinferenz.FunN; -import typinferenz.FunNInterface; -import typinferenz.FunNMethod; -import typinferenz.exceptions.TypeinferenceException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; diff --git a/src/typinferenz/exceptions/DebugException.java b/src/de/dhbwstuttgart/typeinference/exceptions/DebugException.java similarity index 72% rename from src/typinferenz/exceptions/DebugException.java rename to src/de/dhbwstuttgart/typeinference/exceptions/DebugException.java index 2043320a..1f2e2775 100644 --- a/src/typinferenz/exceptions/DebugException.java +++ b/src/de/dhbwstuttgart/typeinference/exceptions/DebugException.java @@ -1,4 +1,4 @@ -package typinferenz.exceptions; +package de.dhbwstuttgart.typeinference.exceptions; public class DebugException extends RuntimeException { diff --git a/src/typinferenz/exceptions/ParserError.java b/src/de/dhbwstuttgart/typeinference/exceptions/ParserError.java similarity index 56% rename from src/typinferenz/exceptions/ParserError.java rename to src/de/dhbwstuttgart/typeinference/exceptions/ParserError.java index 02105ba5..7d1d51ef 100644 --- a/src/typinferenz/exceptions/ParserError.java +++ b/src/de/dhbwstuttgart/typeinference/exceptions/ParserError.java @@ -1,6 +1,6 @@ -package typinferenz.exceptions; +package de.dhbwstuttgart.typeinference.exceptions; -import mycompiler.myparser.JavaParser.yyException; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; public class ParserError extends TypeinferenceException{ diff --git a/src/typinferenz/exceptions/TypeinferenceException.java b/src/de/dhbwstuttgart/typeinference/exceptions/TypeinferenceException.java similarity index 92% rename from src/typinferenz/exceptions/TypeinferenceException.java rename to src/de/dhbwstuttgart/typeinference/exceptions/TypeinferenceException.java index 2fe6897e..7a72266c 100755 --- a/src/typinferenz/exceptions/TypeinferenceException.java +++ b/src/de/dhbwstuttgart/typeinference/exceptions/TypeinferenceException.java @@ -1,6 +1,6 @@ -package typinferenz.exceptions; +package de.dhbwstuttgart.typeinference.exceptions; -import mycompiler.IItemWithOffset; +import de.dhbwstuttgart.core.IItemWithOffset; /** * Eine RuntimeException, welche bei einem Fehler während des Typinferenzalgorithmus ausgelöst wird. diff --git a/bin/mycompiler/myparser/.cvsignore b/src/de/dhbwstuttgart/typeinference/parser/.cvsignore similarity index 100% rename from bin/mycompiler/myparser/.cvsignore rename to src/de/dhbwstuttgart/typeinference/parser/.cvsignore diff --git a/src/mycompiler/myparser/BoundedClassIdentifierList.java b/src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java similarity index 75% rename from src/mycompiler/myparser/BoundedClassIdentifierList.java rename to src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java index da4a48cd..1dcdb4d0 100644 --- a/src/mycompiler/myparser/BoundedClassIdentifierList.java +++ b/src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java @@ -1,9 +1,9 @@ -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; public class BoundedClassIdentifierList extends Vector{ diff --git a/src/mycompiler/myparser/ClassAndParameter.java b/src/de/dhbwstuttgart/typeinference/parser/ClassAndParameter.java similarity index 94% rename from src/mycompiler/myparser/ClassAndParameter.java rename to src/de/dhbwstuttgart/typeinference/parser/ClassAndParameter.java index a72acd31..ef928aee 100755 --- a/src/mycompiler/myparser/ClassAndParameter.java +++ b/src/de/dhbwstuttgart/typeinference/parser/ClassAndParameter.java @@ -1,12 +1,12 @@ // ino.module.ClassAndParameter.8613.package -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; // ino.end // ino.module.ClassAndParameter.8613.import import java.util.Vector; -import mycompiler.mytype.ParaList; -import mycompiler.mytype.Type; -// ino.end + +import de.dhbwstuttgart.syntaxtree.type.ParaList; +import de.dhbwstuttgart.syntaxtree.type.Type; // ino.class.ClassAndParameter.24323.description type=javadoc /** diff --git a/src/mycompiler/myparser/GenericVarDeclarationList.java b/src/de/dhbwstuttgart/typeinference/parser/GenericVarDeclarationList.java similarity index 74% rename from src/mycompiler/myparser/GenericVarDeclarationList.java rename to src/de/dhbwstuttgart/typeinference/parser/GenericVarDeclarationList.java index fc9f6727..0833d370 100644 --- a/src/mycompiler/myparser/GenericVarDeclarationList.java +++ b/src/de/dhbwstuttgart/typeinference/parser/GenericVarDeclarationList.java @@ -1,9 +1,9 @@ -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; import java.util.Vector; -import typinferenz.exceptions.DebugException; -import mycompiler.mytype.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; public class GenericVarDeclarationList { diff --git a/src/mycompiler/myparser/InterfaceAndParameter.java b/src/de/dhbwstuttgart/typeinference/parser/InterfaceAndParameter.java similarity index 94% rename from src/mycompiler/myparser/InterfaceAndParameter.java rename to src/de/dhbwstuttgart/typeinference/parser/InterfaceAndParameter.java index b003846c..b13858d9 100755 --- a/src/mycompiler/myparser/InterfaceAndParameter.java +++ b/src/de/dhbwstuttgart/typeinference/parser/InterfaceAndParameter.java @@ -1,12 +1,12 @@ // ino.module.InterfaceAndParameter.8614.package -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; // ino.end // ino.module.InterfaceAndParameter.8614.import import java.util.Vector; -import mycompiler.mytype.ParaList; -import mycompiler.mytype.Type; -// ino.end + +import de.dhbwstuttgart.syntaxtree.type.ParaList; +import de.dhbwstuttgart.syntaxtree.type.Type; // ino.class.InterfaceAndParameter.24353.description type=javadoc /** diff --git a/src/mycompiler/myparser/InterfaceList.java b/src/de/dhbwstuttgart/typeinference/parser/InterfaceList.java similarity index 91% rename from src/mycompiler/myparser/InterfaceList.java rename to src/de/dhbwstuttgart/typeinference/parser/InterfaceList.java index c09a2c55..3e20555f 100755 --- a/src/mycompiler/myparser/InterfaceList.java +++ b/src/de/dhbwstuttgart/typeinference/parser/InterfaceList.java @@ -1,11 +1,11 @@ // ino.module.InterfaceList.8615.package -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; // ino.end // ino.module.InterfaceList.8615.import import java.util.Vector; -import mycompiler.myclass.UsedId; -// ino.end + +import de.dhbwstuttgart.syntaxtree.misc.UsedId; // ino.class.InterfaceList.24383.description type=javadoc /** diff --git a/src/mycompiler/myparser/JavaClassName.java b/src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java similarity index 96% rename from src/mycompiler/myparser/JavaClassName.java rename to src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java index adf9b054..12c41520 100644 --- a/src/mycompiler/myparser/JavaClassName.java +++ b/src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java @@ -1,8 +1,8 @@ -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; import java.util.Vector; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; /** * Stellt den Namen einer Java Klasse dar. diff --git a/src/mycompiler/myparser/JavaLexer.java b/src/de/dhbwstuttgart/typeinference/parser/JavaLexer.java similarity index 99% rename from src/mycompiler/myparser/JavaLexer.java rename to src/de/dhbwstuttgart/typeinference/parser/JavaLexer.java index 88c7f7cd..92f09f6a 100644 --- a/src/mycompiler/myparser/JavaLexer.java +++ b/src/de/dhbwstuttgart/typeinference/parser/JavaLexer.java @@ -6,7 +6,7 @@ * * ********************************************/ // user code: -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; public class JavaLexer { diff --git a/bin/mycompiler/myparser/JavaLexer.lex b/src/de/dhbwstuttgart/typeinference/parser/JavaLexer.lex similarity index 100% rename from bin/mycompiler/myparser/JavaLexer.lex rename to src/de/dhbwstuttgart/typeinference/parser/JavaLexer.lex diff --git a/src/mycompiler/myparser/JavaParser.java b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java similarity index 97% rename from src/mycompiler/myparser/JavaParser.java rename to src/de/dhbwstuttgart/typeinference/parser/JavaParser.java index de680870..8b944a83 100644 --- a/src/mycompiler/myparser/JavaParser.java +++ b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java @@ -6,25 +6,96 @@ Backup von JavaParser.jay 10.April 17 Uhr */ -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; -import mycompiler.myclass.FieldDeclaration; -import mycompiler.myclass.GenericDeclarationList; -import mycompiler.myclass.Field; import java.util.Vector; -import mycompiler.SourceFile; -import mycompiler.AClassOrInterface; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassBody; -import mycompiler.myclass.Constructor; -import mycompiler.myclass.Constant; -import mycompiler.myclass.ImportDeclarations; -import mycompiler.myclass.DeclId; -import mycompiler.myclass.ExceptionList; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.Method; -import mycompiler.myclass.ParameterList; -import mycompiler.myclass.UsedId; + +import de.dhbwstuttgart.core.AClassOrInterface; +import de.dhbwstuttgart.core.SourceFile; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ClassBody; +import de.dhbwstuttgart.syntaxtree.Constant; +import de.dhbwstuttgart.syntaxtree.Constructor; +import de.dhbwstuttgart.syntaxtree.ExceptionList; +import de.dhbwstuttgart.syntaxtree.Field; +import de.dhbwstuttgart.syntaxtree.FieldDeclaration; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.GenericDeclarationList; +import de.dhbwstuttgart.syntaxtree.ImportDeclarations; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.operator.AndOp; +import de.dhbwstuttgart.syntaxtree.operator.DivideOp; +import de.dhbwstuttgart.syntaxtree.operator.EqualOp; +import de.dhbwstuttgart.syntaxtree.operator.GreaterEquOp; +import de.dhbwstuttgart.syntaxtree.operator.GreaterOp; +import de.dhbwstuttgart.syntaxtree.operator.LessEquOp; +import de.dhbwstuttgart.syntaxtree.operator.LessOp; +import de.dhbwstuttgart.syntaxtree.operator.MinusOp; +import de.dhbwstuttgart.syntaxtree.operator.ModuloOp; +import de.dhbwstuttgart.syntaxtree.operator.NotEqualOp; +import de.dhbwstuttgart.syntaxtree.operator.Operator; +import de.dhbwstuttgart.syntaxtree.operator.OrOp; +import de.dhbwstuttgart.syntaxtree.operator.PlusOp; +import de.dhbwstuttgart.syntaxtree.operator.TimesOp; +import de.dhbwstuttgart.syntaxtree.statement.ArgumentList; +import de.dhbwstuttgart.syntaxtree.statement.Assign; +import de.dhbwstuttgart.syntaxtree.statement.Binary; +import de.dhbwstuttgart.syntaxtree.statement.Block; +import de.dhbwstuttgart.syntaxtree.statement.BoolLiteral; +import de.dhbwstuttgart.syntaxtree.statement.CastExpr; +import de.dhbwstuttgart.syntaxtree.statement.CharLiteral; +import de.dhbwstuttgart.syntaxtree.statement.DoubleLiteral; +import de.dhbwstuttgart.syntaxtree.statement.EmptyStmt; +import de.dhbwstuttgart.syntaxtree.statement.Expr; +import de.dhbwstuttgart.syntaxtree.statement.ExprStmt; +import de.dhbwstuttgart.syntaxtree.statement.FloatLiteral; +import de.dhbwstuttgart.syntaxtree.statement.ForStmt; +import de.dhbwstuttgart.syntaxtree.statement.IfStmt; +import de.dhbwstuttgart.syntaxtree.statement.InstVar; +import de.dhbwstuttgart.syntaxtree.statement.InstanceOf; +import de.dhbwstuttgart.syntaxtree.statement.IntLiteral; +import de.dhbwstuttgart.syntaxtree.statement.LambdaExpression; +import de.dhbwstuttgart.syntaxtree.statement.Literal; +import de.dhbwstuttgart.syntaxtree.statement.LocalOrFieldVar; +import de.dhbwstuttgart.syntaxtree.statement.LocalVarDecl; +import de.dhbwstuttgart.syntaxtree.statement.LongLiteral; +import de.dhbwstuttgart.syntaxtree.statement.MethodCall; +import de.dhbwstuttgart.syntaxtree.statement.NegativeExpr; +import de.dhbwstuttgart.syntaxtree.statement.NewClass; +import de.dhbwstuttgart.syntaxtree.statement.NotExpr; +import de.dhbwstuttgart.syntaxtree.statement.Null; +import de.dhbwstuttgart.syntaxtree.statement.PositivExpr; +import de.dhbwstuttgart.syntaxtree.statement.PostDecExpr; +import de.dhbwstuttgart.syntaxtree.statement.PostIncExpr; +import de.dhbwstuttgart.syntaxtree.statement.PreDecExpr; +import de.dhbwstuttgart.syntaxtree.statement.PreIncExpr; +import de.dhbwstuttgart.syntaxtree.statement.Receiver; +import de.dhbwstuttgart.syntaxtree.statement.Return; +import de.dhbwstuttgart.syntaxtree.statement.Statement; +import de.dhbwstuttgart.syntaxtree.statement.StringLiteral; +import de.dhbwstuttgart.syntaxtree.statement.This; +import de.dhbwstuttgart.syntaxtree.statement.UnaryMinus; +import de.dhbwstuttgart.syntaxtree.statement.UnaryNot; +import de.dhbwstuttgart.syntaxtree.statement.UnaryPlus; +import de.dhbwstuttgart.syntaxtree.statement.WhileStmt; +import de.dhbwstuttgart.syntaxtree.type.BaseType; +import de.dhbwstuttgart.syntaxtree.type.BooleanType; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.CharacterType; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.IntegerType; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.ParaList; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.syntaxtree.type.WildcardType; import mycompiler.myinterface.Interface; import mycompiler.myinterface.InterfaceBody; import mycompiler.mymodifier.Abstract; @@ -35,76 +106,6 @@ import mycompiler.mymodifier.Private; import mycompiler.mymodifier.Protected; import mycompiler.mymodifier.Public; import mycompiler.mymodifier.Static; -import mycompiler.myoperator.AndOp; -import mycompiler.myoperator.DivideOp; -import mycompiler.myoperator.EqualOp; -import mycompiler.myoperator.GreaterEquOp; -import mycompiler.myoperator.GreaterOp; -import mycompiler.myoperator.LessEquOp; -import mycompiler.myoperator.LessOp; -import mycompiler.myoperator.MinusOp; -import mycompiler.myoperator.ModuloOp; -import mycompiler.myoperator.NotEqualOp; -import mycompiler.myoperator.Operator; -import mycompiler.myoperator.OrOp; -import mycompiler.myoperator.PlusOp; -import mycompiler.myoperator.TimesOp; -import mycompiler.mystatement.ArgumentList; -import mycompiler.mystatement.Assign; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Block; -import mycompiler.mystatement.BoolLiteral; -import mycompiler.mystatement.FloatLiteral; -import mycompiler.mystatement.DoubleLiteral; -import mycompiler.mystatement.LongLiteral; -import mycompiler.mystatement.CastExpr; -import mycompiler.mystatement.CharLiteral; -import mycompiler.mystatement.EmptyStmt; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.ExprStmt; -import mycompiler.mystatement.IfStmt; -import mycompiler.mystatement.InstanceOf; -import mycompiler.mystatement.IntLiteral; -import mycompiler.mystatement.Literal; -import mycompiler.mystatement.InstVar; -import mycompiler.mystatement.LocalOrFieldVar; -import mycompiler.mystatement.LocalVarDecl; -import mycompiler.mystatement.MethodCall; -import mycompiler.mystatement.NegativeExpr; -import mycompiler.mystatement.NewClass; -import mycompiler.mystatement.NotExpr; -import mycompiler.mystatement.Null; -import mycompiler.mystatement.PositivExpr; -import mycompiler.mystatement.PostDecExpr; -import mycompiler.mystatement.PostIncExpr; -import mycompiler.mystatement.PreDecExpr; -import mycompiler.mystatement.PreIncExpr; -import mycompiler.mystatement.Receiver; -import mycompiler.mystatement.Return; -import mycompiler.mystatement.Statement; -import mycompiler.mystatement.StringLiteral; -import mycompiler.mystatement.This; -import mycompiler.mystatement.UnaryMinus; -import mycompiler.mystatement.UnaryNot; -import mycompiler.mystatement.UnaryPlus; -import mycompiler.mystatement.WhileStmt; -import mycompiler.mystatement.ForStmt; -import mycompiler.mystatement.LambdaExpression; -import mycompiler.mytype.BaseType; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.CharacterType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.ParaList; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; -import mycompiler.mytype.WildcardType; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Pair; public class JavaParser{ public Vector path = new Vector(); diff --git a/bin/mycompiler/myparser/JavaParser.jay b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay similarity index 100% rename from bin/mycompiler/myparser/JavaParser.jay rename to src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay diff --git a/bin/mycompiler/myparser/JavaParser_old.jay b/src/de/dhbwstuttgart/typeinference/parser/JavaParser_old.jay similarity index 100% rename from bin/mycompiler/myparser/JavaParser_old.jay rename to src/de/dhbwstuttgart/typeinference/parser/JavaParser_old.jay diff --git a/src/mycompiler/myparser/Scanner.java b/src/de/dhbwstuttgart/typeinference/parser/Scanner.java similarity index 96% rename from src/mycompiler/myparser/Scanner.java rename to src/de/dhbwstuttgart/typeinference/parser/Scanner.java index 95553520..e8a0f9b9 100755 --- a/src/mycompiler/myparser/Scanner.java +++ b/src/de/dhbwstuttgart/typeinference/parser/Scanner.java @@ -1,5 +1,5 @@ // ino.module.Scanner.8618.package -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; // ino.end // ino.class.Scanner.24842.declaration public class Scanner extends JavaLexer implements JavaParser.yyInput diff --git a/src/mycompiler/myparser/Token.java b/src/de/dhbwstuttgart/typeinference/parser/Token.java similarity index 98% rename from src/mycompiler/myparser/Token.java rename to src/de/dhbwstuttgart/typeinference/parser/Token.java index 3a7133bf..4c433d08 100755 --- a/src/mycompiler/myparser/Token.java +++ b/src/de/dhbwstuttgart/typeinference/parser/Token.java @@ -1,5 +1,5 @@ // ino.module.Token.8619.package -package mycompiler.myparser; +package de.dhbwstuttgart.typeinference.parser; // ino.end // ino.class.Token.24859.declaration public class Token diff --git a/src/typinferenz/typedeployment/GenericTypeInsertPoint.java b/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java similarity index 87% rename from src/typinferenz/typedeployment/GenericTypeInsertPoint.java rename to src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java index 61322247..5939a91b 100644 --- a/src/typinferenz/typedeployment/GenericTypeInsertPoint.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java @@ -1,20 +1,20 @@ -package typinferenz.typedeployment; +package de.dhbwstuttgart.typeinference.typedeployment; import java.util.Iterator; import java.util.Vector; -import typinferenz.GenericTypeInsertable; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.TypeInsertable; -import typinferenz.exceptions.DebugException; -import mycompiler.IItemWithOffset; -import mycompiler.SyntaxTreeNode; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.GenericTypeInsertable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; /** * Ein InsertPoint für Generische Variablen diff --git a/src/typinferenz/typedeployment/SourcePatchPoint.java b/src/de/dhbwstuttgart/typeinference/typedeployment/SourcePatchPoint.java similarity index 69% rename from src/typinferenz/typedeployment/SourcePatchPoint.java rename to src/de/dhbwstuttgart/typeinference/typedeployment/SourcePatchPoint.java index b6139669..75c69b01 100644 --- a/src/typinferenz/typedeployment/SourcePatchPoint.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/SourcePatchPoint.java @@ -1,8 +1,8 @@ -package typinferenz.typedeployment; +package de.dhbwstuttgart.typeinference.typedeployment; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.TypeInsertable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; public abstract class SourcePatchPoint implements Comparable{ protected ResultSet resultSet; diff --git a/src/typinferenz/typedeployment/TypeInsertPoint.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java similarity index 85% rename from src/typinferenz/typedeployment/TypeInsertPoint.java rename to src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java index a00258b1..54ad0c1a 100644 --- a/src/typinferenz/typedeployment/TypeInsertPoint.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java @@ -1,16 +1,18 @@ -package typinferenz.typedeployment; +package de.dhbwstuttgart.typeinference.typedeployment; import java.util.Vector; -import typinferenz.GenericTypeInsertable; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.TypeInsertable; -import typinferenz.exceptions.DebugException; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.Field; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.GenericTypeInsertable; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; import mycompiler.myclass.*; -import mycompiler.myclass.Class; -import mycompiler.IItemWithOffset; -import mycompiler.SyntaxTreeNode; import mycompiler.mytype.*; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; diff --git a/src/typinferenz/typedeployment/TypeInsertSet.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java similarity index 89% rename from src/typinferenz/typedeployment/TypeInsertSet.java rename to src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java index 5503cf62..5d939f3c 100644 --- a/src/typinferenz/typedeployment/TypeInsertSet.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java @@ -1,4 +1,4 @@ -package typinferenz.typedeployment; +package de.dhbwstuttgart.typeinference.typedeployment; import java.util.Collections; import java.util.HashMap; @@ -7,15 +7,15 @@ import java.util.Vector; import org.apache.log4j.Logger; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -import typinferenz.TypeInsertable; -import mycompiler.IItemWithOffset; -import mycompiler.SyntaxTreeNode; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; /** * Bündelt ein Set von TypeInsertPoints, welche zu einem TypeInferenceResultSet gehören. diff --git a/src/mycompiler/mybytecode/ClassFile.java b/src/mycompiler/mybytecode/ClassFile.java index 619c8aed..2306a10f 100755 --- a/src/mycompiler/mybytecode/ClassFile.java +++ b/src/mycompiler/mybytecode/ClassFile.java @@ -13,20 +13,25 @@ import java.io.OutputStream; import java.lang.reflect.Array; import java.util.Vector; -import mycompiler.myclass.ParameterList; -import mycompiler.myclass.UsedId; -import mycompiler.MyCompiler; import mycompiler.myexception.JVMCodeException; import mycompiler.myinterface.Interface; -import mycompiler.mystatement.Assign; -import mycompiler.mystatement.Block; -import mycompiler.mytype.Type; -import mycompiler.SourceFile; import org.apache.log4j.Logger; // ino.end + + + +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.SourceFile; +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.statement.Assign; +import de.dhbwstuttgart.syntaxtree.statement.Block; +import de.dhbwstuttgart.syntaxtree.type.Type; + + // ino.class.ClassFile.21492.description type=javadoc /** * Darstellung einer Klassendatei aus Sicht fuer die JVM. diff --git a/src/mycompiler/mybytecode/CodeAttribute.java b/src/mycompiler/mybytecode/CodeAttribute.java index 86997fdc..d8844f20 100755 --- a/src/mycompiler/mybytecode/CodeAttribute.java +++ b/src/mycompiler/mybytecode/CodeAttribute.java @@ -14,10 +14,9 @@ import java.io.OutputStream; import java.lang.reflect.Array; import java.util.Vector; +import de.dhbwstuttgart.syntaxtree.type.Type; import sun.reflect.generics.reflectiveObjects.NotImplementedException; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.Type; -// ino.end // ino.class.CodeAttribute.21681.declaration public class CodeAttribute extends Attribute diff --git a/src/mycompiler/mybytecode/JVMCode.java b/src/mycompiler/mybytecode/JVMCode.java index aaa0392b..7e3e5c90 100755 --- a/src/mycompiler/mybytecode/JVMCode.java +++ b/src/mycompiler/mybytecode/JVMCode.java @@ -3,11 +3,14 @@ package mycompiler.mybytecode; // ino.end // ino.module.JVMCode.8547.import import java.util.Vector; + import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.GenericTypeVar; + import org.apache.log4j.Logger; // ino.end +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; + // ino.class.JVMCode.22140.description type=javadoc /** * Enthaelt die Befehle fuer die Umsetzung in JVM-Code und diff --git a/src/mycompiler/mybytecode/SignatureInfo.java b/src/mycompiler/mybytecode/SignatureInfo.java index a7d2e6c1..8bb42166 100755 --- a/src/mycompiler/mybytecode/SignatureInfo.java +++ b/src/mycompiler/mybytecode/SignatureInfo.java @@ -8,17 +8,20 @@ import java.io.IOException; import java.io.OutputStream; import java.util.Vector; -import mycompiler.myclass.ParameterList; -import mycompiler.myclass.UsedId; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import org.apache.log4j.Logger; // ino.end + + + +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import sun.reflect.generics.reflectiveObjects.NotImplementedException; // ino.class.SignatureInfo.22968.description type=javadoc diff --git a/src/mycompiler/myexception/CTypeReconstructionException.java b/src/mycompiler/myexception/CTypeReconstructionException.java index ccb15f67..132daf7b 100755 --- a/src/mycompiler/myexception/CTypeReconstructionException.java +++ b/src/mycompiler/myexception/CTypeReconstructionException.java @@ -4,8 +4,8 @@ package mycompiler.myexception; // ino.module.CTypeReconstructionException.8572.import import java.util.Vector; -import mycompiler.IItemWithOffset; -// ino.end + +import de.dhbwstuttgart.core.IItemWithOffset; // ino.class.CTypeReconstructionException.23746.description type=javadoc /** diff --git a/src/mycompiler/myinterface/Interface.java b/src/mycompiler/myinterface/Interface.java index 2e7cad7f..d19a49b1 100755 --- a/src/mycompiler/myinterface/Interface.java +++ b/src/mycompiler/myinterface/Interface.java @@ -5,28 +5,27 @@ package mycompiler.myinterface; // ino.module.Interface.8582.import import java.util.Vector; -import mycompiler.AClassOrInterface; +import de.dhbwstuttgart.core.AClassOrInterface; +import de.dhbwstuttgart.core.SourceFile; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ClassHelper; +import de.dhbwstuttgart.syntaxtree.Constant; +import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import mycompiler.mybytecode.ClassFile; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassHelper; -import mycompiler.myclass.Constant; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.Method; -import mycompiler.myclass.ParameterList; -import mycompiler.myclass.UsedId; import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CIntersectionType; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; -import mycompiler.SourceFile; -// ino.end /** * Ein Interface ist eine abstrakte Klasse, erbt daher von Class diff --git a/src/mycompiler/myinterface/InterfaceBody.java b/src/mycompiler/myinterface/InterfaceBody.java index 35123ef2..56135a0a 100755 --- a/src/mycompiler/myinterface/InterfaceBody.java +++ b/src/mycompiler/myinterface/InterfaceBody.java @@ -5,11 +5,10 @@ package mycompiler.myinterface; // ino.module.InterfaceBody.8583.import import java.util.Vector; -import mycompiler.myclass.Field; - +import de.dhbwstuttgart.syntaxtree.Constant; +import de.dhbwstuttgart.syntaxtree.Field; +import de.dhbwstuttgart.syntaxtree.Method; import mycompiler.mybytecode.ClassFile; -import mycompiler.myclass.Constant; -import mycompiler.myclass.Method; import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; // ino.end diff --git a/src/mycompiler/mymodifier/Abstract.java b/src/mycompiler/mymodifier/Abstract.java index 17a4c21e..69027ed7 100755 --- a/src/mycompiler/mymodifier/Abstract.java +++ b/src/mycompiler/mymodifier/Abstract.java @@ -1,9 +1,8 @@ // ino.module.Abstract.8585.package package mycompiler.mymodifier; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -// ino.end +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.class.Abstract.24015.description type=javadoc diff --git a/src/mycompiler/mymodifier/Final.java b/src/mycompiler/mymodifier/Final.java index 487b6424..8330eba5 100755 --- a/src/mycompiler/mymodifier/Final.java +++ b/src/mycompiler/mymodifier/Final.java @@ -1,9 +1,8 @@ // ino.module.Final.8586.package package mycompiler.mymodifier; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -// ino.end +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.class.Final.24022.description type=javadoc diff --git a/src/mycompiler/mymodifier/InterfaceModifier.java b/src/mycompiler/mymodifier/InterfaceModifier.java index 6c38c8c3..8de2bee1 100755 --- a/src/mycompiler/mymodifier/InterfaceModifier.java +++ b/src/mycompiler/mymodifier/InterfaceModifier.java @@ -3,8 +3,8 @@ */ package mycompiler.mymodifier; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; /** * @author Daniel diff --git a/src/mycompiler/mymodifier/Modifier.java b/src/mycompiler/mymodifier/Modifier.java index 61430824..1d72d4e7 100755 --- a/src/mycompiler/mymodifier/Modifier.java +++ b/src/mycompiler/mymodifier/Modifier.java @@ -1,8 +1,8 @@ // ino.module.Modifier.8587.package package mycompiler.mymodifier; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.end // ino.class.Modifier.24029.declaration diff --git a/src/mycompiler/mymodifier/Modifiers.java b/src/mycompiler/mymodifier/Modifiers.java index 7ae00aeb..c51a0ccd 100755 --- a/src/mycompiler/mymodifier/Modifiers.java +++ b/src/mycompiler/mymodifier/Modifiers.java @@ -5,11 +5,11 @@ package mycompiler.mymodifier; // ino.module.Modifiers.8588.import import java.util.Vector; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.syntaxtree.type.BaseType; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.end -import mycompiler.mytype.BaseType; // ino.class.Modifiers.24035.description type=javadoc /** diff --git a/src/mycompiler/mymodifier/Private.java b/src/mycompiler/mymodifier/Private.java index d2ab98f5..4b36125c 100755 --- a/src/mycompiler/mymodifier/Private.java +++ b/src/mycompiler/mymodifier/Private.java @@ -1,9 +1,8 @@ // ino.module.Private.8589.package package mycompiler.mymodifier; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -// ino.end +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.class.Private.24059.declaration diff --git a/src/mycompiler/mymodifier/Protected.java b/src/mycompiler/mymodifier/Protected.java index 9f05e62d..c732b00f 100755 --- a/src/mycompiler/mymodifier/Protected.java +++ b/src/mycompiler/mymodifier/Protected.java @@ -1,9 +1,8 @@ // ino.module.Protected.8590.package package mycompiler.mymodifier; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -// ino.end +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.class.Protected.24066.declaration diff --git a/src/mycompiler/mymodifier/Public.java b/src/mycompiler/mymodifier/Public.java index 79444d89..0236b80e 100755 --- a/src/mycompiler/mymodifier/Public.java +++ b/src/mycompiler/mymodifier/Public.java @@ -1,9 +1,8 @@ // ino.module.Public.8591.package package mycompiler.mymodifier; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -// ino.end +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.class.Public.24073.declaration diff --git a/src/mycompiler/mymodifier/Static.java b/src/mycompiler/mymodifier/Static.java index 1e79cd7c..c5de6ead 100755 --- a/src/mycompiler/mymodifier/Static.java +++ b/src/mycompiler/mymodifier/Static.java @@ -1,9 +1,8 @@ // ino.module.Static.8592.package package mycompiler.mymodifier; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; -// ino.end +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; // ino.class.Static.24080.declaration diff --git a/src/mycompiler/mymodifier/Super.java b/src/mycompiler/mymodifier/Super.java index e5608506..c12de826 100755 --- a/src/mycompiler/mymodifier/Super.java +++ b/src/mycompiler/mymodifier/Super.java @@ -3,8 +3,8 @@ */ package mycompiler.mymodifier; -import typinferenz.JavaCodeResult; -import typinferenz.ResultSet; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; /** * @author Daniel diff --git a/src/mycompiler/myoperator/AndOp.java b/src/mycompiler/myoperator/AndOp.java deleted file mode 100755 index 91926d7d..00000000 --- a/src/mycompiler/myoperator/AndOp.java +++ /dev/null @@ -1,30 +0,0 @@ -// ino.module.AndOp.8595.package -package mycompiler.myoperator; - -import mycompiler.mystatement.Expr; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.Type; -import typinferenz.ConstraintsSet; -import typinferenz.SingleConstraint; -import typinferenz.assumptions.TypeAssumptions; -// ino.end - -// ino.class.AndOp.24101.declaration -public class AndOp extends LogOp -// ino.end -// ino.class.AndOp.24101.body -{ - - // ino.method.AndOp.24105.definition - public AndOp(int offset, int variableLength) - // ino.end - // ino.method.AndOp.24105.body - { - super(offset,variableLength); - } - // ino.end - - -} -// ino.end diff --git a/src/mycompiler/myparser/.cvsignore b/src/mycompiler/myparser/.cvsignore deleted file mode 100755 index 4f70a70a..00000000 --- a/src/mycompiler/myparser/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -JavaLexer.java -JavaParser.java - diff --git a/src/mycompiler/myparser/JavaLexer.lex b/src/mycompiler/myparser/JavaLexer.lex deleted file mode 100755 index cae5b2ce..00000000 --- a/src/mycompiler/myparser/JavaLexer.lex +++ /dev/null @@ -1,173 +0,0 @@ -/******************************************** - * file: JavaLexer.lex * - * * - * enth�lt die JLex-Spezifikation f�r die * - * Generierung des lexical analyzers * - * * - ********************************************/ - -// user code: -package mycompiler.myparser; - -%% - -%char -%line - -%{ - Token token; -%} - -%public -%class JavaLexer -%type boolean -%eofval{ - return false; -%eofval} - -ws = [ \t\r\n\b\015]+ -%state commentblock -%state commentsingleline -%% - -abstract {this.token = new Token(JavaParser.ABSTRACT, yytext(), yyline, yychar);return true;} -boolean {this.token = new Token(JavaParser.BOOLEAN, yytext(), yyline, yychar);return true;} -break {this.token = new Token(JavaParser.BREAK, yytext(), yyline, yychar);return true;} -case {this.token = new Token(JavaParser.CASE, yytext(), yyline, yychar);return true;} -catch {this.token = new Token(JavaParser.CATCH, yytext(), yyline, yychar);return true;} -char {this.token = new Token(JavaParser.CHAR, yytext(), yyline, yychar);return true;} -class {this.token = new Token(JavaParser.CLASS, yytext(), yyline, yychar);return true;} -continue {this.token = new Token(JavaParser.CONTINUE, yytext(), yyline, yychar);return true;} -default {this.token = new Token(JavaParser.DEFAULT, yytext(), yyline, yychar);return true;} -do {this.token = new Token(JavaParser.DO, yytext(), yyline, yychar);return true;} -else {this.token = new Token(JavaParser.ELSE, yytext(), yyline, yychar);return true;} -extends {this.token = new Token(JavaParser.EXTENDS, yytext(), yyline, yychar);return true;} -final {this.token = new Token(JavaParser.FINAL, yytext(), yyline, yychar);return true;} -finally {this.token = new Token(JavaParser.FINALLY, yytext(), yyline, yychar);return true;} -for {this.token = new Token(JavaParser.FOR, yytext(), yyline, yychar);return true;} -if {this.token = new Token(JavaParser.IF, yytext(), yyline, yychar);return true;} -instanceof {this.token = new Token(JavaParser.INSTANCEOF, yytext(), yyline, yychar);return true;} -interface {this.token = new Token(JavaParser.INTERFACE, yytext(), yyline, yychar);return true;} -int {this.token = new Token(JavaParser.INT, yytext(), yyline, yychar);return true;} -implements {this.token = new Token(JavaParser.IMPLEMENTS, yytext(), yyline, yychar);return true;} -new {this.token = new Token(JavaParser.NEW, yytext(), yyline, yychar);return true;} -package {this.token = new Token(JavaParser.PACKAGE, yytext(), yyline, yychar);return true;} -import {this.token = new Token(JavaParser.IMPORT, yytext(), yyline, yychar);return true;} -private {this.token = new Token(JavaParser.PRIVATE, yytext(), yyline, yychar);return true;} -protected {this.token = new Token(JavaParser.PROTECTED, yytext(), yyline, yychar);return true;} -public {this.token = new Token(JavaParser.PUBLIC, yytext(), yyline, yychar);return true;} -return {this.token = new Token(JavaParser.RETURN, yytext(), yyline, yychar);return true;} -static {this.token = new Token(JavaParser.STATIC, yytext(), yyline, yychar);return true;} -super {this.token = new Token(JavaParser.SUPER, yytext(), yyline, yychar);return true;} -switch {this.token = new Token(JavaParser.SWITCH, yytext(), yyline, yychar);return true;} -this {this.token = new Token(JavaParser.THIS, yytext(), yyline,yychar);return true;} -throw {this.token = new Token(JavaParser.THROW, yytext(), yyline, yychar);return true;} -throws {this.token = new Token(JavaParser.THROWS, yytext(), yyline, yychar);return true;} -try {this.token = new Token(JavaParser.TRY, yytext(), yyline, yychar);return true;} -void {this.token = new Token(JavaParser.VOID, yytext(), yyline, yychar);return true;} -while {this.token = new Token(JavaParser.WHILE, yytext(), yyline, yychar);return true;} - -"//" {yybegin(commentsingleline);} -"/*" {yybegin(commentblock);} - "*/" {yybegin(YYINITIAL);} - [^\*]* {} - "*" {} - [\t\r\n\b\015]+ {yybegin(YYINITIAL);} - [^\\t\r\n\b\015]+ {} - -[1-9][0-9]*[L]? { - String lexem = yytext(); - if(lexem.endsWith("L")) - { - lexem = lexem.substring(0, lexem.length() - 1); - this.token = new Token(JavaParser.LONGLITERAL, lexem, yyline, yychar);return true; - } - else - { - this.token = new Token(JavaParser.INTLITERAL, lexem, yyline, yychar);return true; - } -} -0[xX][0-9a-fA-F]+[L]? { - String lexem = yytext(); - if(lexem.endsWith("L")) - { - lexem = lexem.substring(0, lexem.length() - 1); - this.token = new Token(JavaParser.LONGLITERAL, lexem, yyline, yychar);return true; - } - else - { - this.token = new Token(JavaParser.INTLITERAL, lexem, yyline, yychar);return true; - } -} -0[0-7]*[L]? { - String lexem = yytext(); - if(lexem.endsWith("L")) - { - lexem = lexem.substring(0, lexem.length() - 1); - this.token = new Token(JavaParser.LONGLITERAL, lexem, yyline, yychar);return true; - } - else - { - this.token = new Token(JavaParser.INTLITERAL, lexem, yyline, yychar);return true; - } -} -[1-9][0-9]*[.]?[0-9]*[f] { - this.token = new Token(JavaParser.FLOATLITERAL, yytext(), yyline, yychar);return true; -} - -[1-9][0-9]*[.][0-9]* { - this.token = new Token(JavaParser.DOUBLELITERAL, yytext(), yyline, yychar);return true; -} - -true|false { - this.token = new Token(JavaParser.BOOLLITERAL, yytext(), yyline, yychar);return true; -} -null { - this.token = new Token(JavaParser.JNULL, yytext(), yyline, yychar);return true; -} -\'[a-zA-Z0-9!@#$%\&*\(\),\<.\>/\?;:]\' { - this.token = new Token(JavaParser.CHARLITERAL, yytext(), yyline, yychar);return true; -} -\"[a-zA-Z0-9!@#$%^&*\(\),\<.\>/\?;:\ ]*\" { - this.token = new Token(JavaParser.STRINGLITERAL, yytext(), yyline, yychar);return true; -} -[a-zA-Z$_][a-zA-Z0-9$_]* { - this.token = new Token(JavaParser.IDENTIFIER, yytext(), yyline, yychar);return true; -} -[()\{\}\[\];,.] { - this.token = new Token(JavaParser.BRACE,yytext().charAt(0), yyline, yychar);return true; -} -[=>=" {this.token = new Token(JavaParser.GREATEREQUAL, yytext(), yyline, yychar);return true;} -"!=" {this.token = new Token(JavaParser.NOTEQUAL, yytext(), yyline, yychar);return true;} -"||" {this.token = new Token(JavaParser.LOGICALOR, yytext(), yyline, yychar);return true;} -"&&" {this.token = new Token(JavaParser.LOGICALAND, yytext(), yyline, yychar);return true;} -"++" {this.token = new Token(JavaParser.INCREMENT, yytext(), yyline, yychar);return true;} -"--" {this.token = new Token(JavaParser.DECREMENT, yytext(), yyline, yychar);return true;} - -[+\-*/&|^%] { - this.token = new Token(JavaParser.OP, yytext().charAt(0), yyline, yychar);return true; -} -//"<<" {this.token = new Token(JavaParser.SHIFTLEFT, yytext(), yyline, yychar);return true;} -//">>" {this.token = new Token(JavaParser.SHIFTRIGHT, yytext(), yyline, yychar);return true;} -//">>>" {this.token = new Token(JavaParser.UNSIGNEDSHIFTRIGHT, yytext(), yyline, yychar);return true;} -"+=" {this.token = new Token(JavaParser.PLUSEQUAL, yytext(), yyline, yychar);return true;} -"-=" {this.token = new Token(JavaParser.MINUSEQUAL, yytext(), yyline, yychar);return true;} -"*=" {this.token = new Token(JavaParser.TIMESEQUAL, yytext(), yyline, yychar);return true;} -"/=" {this.token = new Token(JavaParser.DIVIDEEQUAL, yytext(), yyline, yychar);return true;} -"&=" {this.token = new Token(JavaParser.ANDEQUAL, yytext(), yyline, yychar);return true;} -"|=" {this.token = new Token(JavaParser.OREQUAL, yytext(), yyline, yychar);return true;} -"^=" {this.token = new Token(JavaParser.XOREQUAL, yytext(), yyline, yychar);return true;} -"%=" {this.token = new Token(JavaParser.MODULOEQUAL, yytext(), yyline, yychar);return true;} -//"<<=" {this.token = new Token(JavaParser.SHIFTLEFTEQUAL, yytext(), yyline, yychar);return true;} -//">>=" {this.token = new Token(JavaParser.SIGNEDSHIFTRIGHTEQUAL, yytext(), yyline, yychar);return true;} -//">>>=" {this.token = new Token(JavaParser.UNSIGNEDSHIFTRIGHTEQUAL, yytext(), yyline, yychar);return true;} -{ws}|\n { /* System.out.print(yytext()); */ } -\\.\n {org.apache.log4j.Logger.getLogger("parser").debug("Kommentar: "+yytext());} -"->" {this.token = new Token(JavaParser.LAMBDAASSIGNMENT, yytext(), yyline, yychar);return true;} - - diff --git a/src/mycompiler/myparser/JavaParser.jay b/src/mycompiler/myparser/JavaParser.jay deleted file mode 100755 index 851e8e65..00000000 --- a/src/mycompiler/myparser/JavaParser.jay +++ /dev/null @@ -1,2473 +0,0 @@ -%{ - -/* -Backup von JavaParser.jay 10.April 17 Uhr -*/ - -package mycompiler.myparser; - -import mycompiler.myclass.FieldDeclaration; -import mycompiler.myclass.GenericDeclarationList; -import mycompiler.myclass.Field; -import java.util.Vector; -import mycompiler.SourceFile; -import mycompiler.AClassOrInterface; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassBody; -import mycompiler.myclass.Constructor; -import mycompiler.myclass.Constant; -import mycompiler.myclass.ImportDeclarations; -import mycompiler.myclass.DeclId; -import mycompiler.myclass.ExceptionList; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.Method; -import mycompiler.myclass.ParameterList; -import mycompiler.myclass.UsedId; -import mycompiler.myinterface.Interface; -import mycompiler.myinterface.InterfaceBody; -import mycompiler.mymodifier.Abstract; -import mycompiler.mymodifier.Final; -import mycompiler.mymodifier.Modifier; -import mycompiler.mymodifier.Modifiers; -import mycompiler.mymodifier.Private; -import mycompiler.mymodifier.Protected; -import mycompiler.mymodifier.Public; -import mycompiler.mymodifier.Static; -import mycompiler.myoperator.AndOp; -import mycompiler.myoperator.DivideOp; -import mycompiler.myoperator.EqualOp; -import mycompiler.myoperator.GreaterEquOp; -import mycompiler.myoperator.GreaterOp; -import mycompiler.myoperator.LessEquOp; -import mycompiler.myoperator.LessOp; -import mycompiler.myoperator.MinusOp; -import mycompiler.myoperator.ModuloOp; -import mycompiler.myoperator.NotEqualOp; -import mycompiler.myoperator.Operator; -import mycompiler.myoperator.OrOp; -import mycompiler.myoperator.PlusOp; -import mycompiler.myoperator.TimesOp; -import mycompiler.mystatement.ArgumentList; -import mycompiler.mystatement.Assign; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Block; -import mycompiler.mystatement.BoolLiteral; -import mycompiler.mystatement.FloatLiteral; -import mycompiler.mystatement.DoubleLiteral; -import mycompiler.mystatement.LongLiteral; -import mycompiler.mystatement.CastExpr; -import mycompiler.mystatement.CharLiteral; -import mycompiler.mystatement.EmptyStmt; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.ExprStmt; -import mycompiler.mystatement.IfStmt; -import mycompiler.mystatement.InstanceOf; -import mycompiler.mystatement.IntLiteral; -import mycompiler.mystatement.Literal; -import mycompiler.mystatement.InstVar; -import mycompiler.mystatement.LocalOrFieldVar; -import mycompiler.mystatement.LocalVarDecl; -import mycompiler.mystatement.MethodCall; -import mycompiler.mystatement.NegativeExpr; -import mycompiler.mystatement.NewClass; -import mycompiler.mystatement.NotExpr; -import mycompiler.mystatement.Null; -import mycompiler.mystatement.PositivExpr; -import mycompiler.mystatement.PostDecExpr; -import mycompiler.mystatement.PostIncExpr; -import mycompiler.mystatement.PreDecExpr; -import mycompiler.mystatement.PreIncExpr; -import mycompiler.mystatement.Receiver; -import mycompiler.mystatement.Return; -import mycompiler.mystatement.Statement; -import mycompiler.mystatement.StringLiteral; -import mycompiler.mystatement.This; -import mycompiler.mystatement.UnaryMinus; -import mycompiler.mystatement.UnaryNot; -import mycompiler.mystatement.UnaryPlus; -import mycompiler.mystatement.WhileStmt; -import mycompiler.mystatement.ForStmt; -import mycompiler.mystatement.LambdaExpression; -import mycompiler.mytype.BaseType; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.CharacterType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.ParaList; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; -import mycompiler.mytype.WildcardType; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Pair; - -public class JavaParser{ -public Vector path = new Vector(); - -//PL 05-07-30 eingefuegt. ANFANG -private Vector containedTypes = new Vector(); -private Vector usedIdsToCheck = new Vector(); - //Vektor aller Typdeklarationen die in aktueller Klasse vorkommen. - //wird nach Beendigung der Klasse des Attributs der jeweiligen - //Klasse zugeordnet - //nach dem Parsen wird mit wandleGeneric2RefType die - //die RefTypes gesetzt. -void initContainedTypes() { - this.containedTypes = new Vector(); -} -void initUsedIdsToCheck() { - this.usedIdsToCheck = new Vector(); -} -//PL 05-07-30 eingefuegt. ENDE - -//LUAR 07-05-29 Anfang für Wildcard Test -public Vector testPair = new Vector(); -//LUAR 07-05-29 Ende -%} - -%token ABSTRACT -%token BOOLEAN -%token BREAK -%token CASE -%token CATCH -%token CHAR -%token CLASS -%token CONTINUE -%token DEFAULT -%token DO -%token ELSE -%token EXTENDS -%token FINAL -%token FINALLY -%token FOR -%token IF -%token INSTANCEOF -%token INT -%token NEW -%token PRIVATE -%token PROTECTED -%token PUBLIC -%token PACKAGE -%token IMPORT -%token INTERFACE -%token IMPLEMENTS -%token RETURN -%token STATIC -%token SUPER -%token SWITCH -%token THIS -%token THROW -%token THROWS -%token TRY -%token VOID -%token WHILE -%token INTLITERAL -%token LONGLITERAL -%token DOUBLELITERAL -%token FLOATLITERAL -%token BOOLLITERAL -%token JNULL -%token CHARLITERAL -%token STRINGLITERAL -%token IDENTIFIER -%token EQUAL -%token LESSEQUAL -%token GREATEREQUAL -%token NOTEQUAL -%token LOGICALOR -%token LOGICALAND -%token INCREMENT -%token DECREMENT -%token SHIFTLEFT -%token SHIFTRIGHT -%token UNSIGNEDSHIFTRIGHT -%token SIGNEDSHIFTRIGHT -%token PLUSEQUAL -%token MINUSEQUAL -%token TIMESEQUAL -%token DIVIDEEQUAL -%token ANDEQUAL -%token OREQUAL -%token XOREQUAL -%token MODULOEQUAL -%token SHIFTLEFTEQUAL -%token SIGNEDSHIFTRIGHTEQUAL -%token UNSIGNEDSHIFTRIGHTEQUAL -%token BRACE -%token RELOP -%token OP -%token EOF -%token LAMBDAASSIGNMENT -%token ENDOFGENERICVARDECLARATION - -%type classdeclaration -%type interfacedeclaration -%type interfacebody -%type interfacememberdeclarations -%type interfacememberdeclaration -%type abstractmethoddeclaration -%type classbody -%type classidentifier -%type interfaceidentifier -%type constantdeclaration -%type genericdeclarationlist -%type fielddeclaration -%type methodheader -%type methoddeclaration -%type methoddeclarator -%type classbodydeclarations -%type classbodydeclaration -%type classmemberdeclaration -%type variabledeclarators -%type fielddeclarator; -%type variabledeclarator -%type variabledeclaratorid -%type simplename -%type typename -%type qualifiedname -%type importqualifiedname -%type importdeclaration -%type importdeclarations -%type name -%type super -%type classtype -%type classorinterfacetype -%type interfacetype -%type interfaces -%type extendsinterfaces -%type integraltype -%type numerictype -%type primitivetype -%type referencetype -%type classtypelist -%type type -%type modifiers -%type modifier -%type block -%type methodbody -%type blockstatements -%type lambdabody -%type localvariabledeclarationstatement -%type localvariabledeclaration -%type throws -%type formalparameter -%type formalparameterlist -%type lambdaexpressionparameter -%type literal -%type primarynonewarray -%type primary -%type postfixexpression -%type unaryexpressionnotplusminus -%type unaryexpression -%type multiplicativeexpression -%type additiveexpression -%type shiftexpression -%type relationalexpression -%type equalityexpression -%type andexpression -%type exclusiveorexpression -%type inclusiveorexpression -%type conditionalandexpression -%type conditionalorexpression -%type conditionalexpression -%type assignmentexpression -%type lambdaexpression /*added by Andreas Stadelmeier*/ -%type expression -%type statementexpression -%type preincrementexpression -%type predecrementexpression -%type postincrementexpression -%type postdecrementexpression -%type expressionstatement -%type variableinitializer -%type statementwithouttrailingsubstatement -%type blockstatement -%type statement -%type statementnoshortif -%type whilestatement -%type forstatement -%type whilestatementnoshortif -%type ifthenstatement -%type ifthenelsestatement -%type ifthenelsestatementnoshortif -%type emptystatement -%type returnstatement -%type classinstancecreationexpression -%type compilationunit -%type typedeclarations -%type boundedMethodParameter; -%type boundedClassParameter; -%type boundedclassidentifierlist //Vector -%type boundedMethodParameters; // Vector -%type boundedClassParameters; // ParaList -%type packagedeclaration -%type assignment -%type assignmentoperator -%type lambdaassignmentoperator /*added by Andreas Stadelmeier*/ -%type lefthandside -%type argumentlist -%type methodinvocation -%type typedeclaration -%type constructordeclaration -%type constructordeclarator -%type constructorbody -%type explicitconstructorinvocation -%type staticinitializer -%type castexpression -%type paralist -%type typelist parameter -%type wildcardparameter -%left ',' -%% - -compilationunit : typedeclarations - { - $$=$1; - } - |importdeclarations typedeclarations - { - $2.addImports($1); - $$=$2; - } - | packagedeclaration importdeclarations typedeclarations - { - // SCJU: Package - $3.setPackageName($1); - $3.addImports($2); - $$=$3; - } - | packagedeclaration typedeclarations - { - // SCJU: Package - $2.setPackageName($1); - $$=$2; - } - | type type compilationunit - { - this.testPair.add(new Pair($1,$2)); - $$=$3; - } - -packagedeclaration : PACKAGE name ';' ; - { - // SCJU: Package - $$ = $2; - } - -importdeclarations :importdeclaration - { - ImportDeclarations declarations=new ImportDeclarations(); - declarations.addElement($1); - $$=declarations; - } - |importdeclarations importdeclaration - { - $1.addElement($2); - $$=$1; - } - -importdeclaration : IMPORT importqualifiedname ';' - { - $$=$2; - } - -typedeclarations :typedeclaration - { - SourceFile Scfile = new SourceFile(); - Scfile.addElement($1); - $$=Scfile; - } - |typedeclarations typedeclaration - { - $1.addElement($2); - $$=$1; - } - -name :qualifiedname - { - $$=$1; - } - |simplename - { - $$=$1; - } - -typedeclaration :classdeclaration - { - $$=$1; - } - | interfacedeclaration - { - // SCJU: Interface - $$=$1; - } - - -qualifiedname : name '.' IDENTIFIER - { - $1.set_Name($3.getLexem()); - $1.setOffset($1.getOffset()); - $$=$1; - } - -importqualifiedname : name '.' IDENTIFIER - { - $1.set_Name($3.getLexem()); - $1.setOffset($1.getOffset()); - $$=$1; - } - | name '.' '*' - { - $1.set_Name("*"); - $1.setOffset($1.getOffset()); - $$=$1; - } - - -simplename : IDENTIFIER - { - UsedId UI = new UsedId($1.getOffset()); - UI.set_Name( $1.getLexem() ); - UI.setOffset($1.getOffset());//hinzugef�gt hoth: 07.04.2006 - $$ = UI; - } - -classdeclaration : CLASS classidentifier classbody - { - // SCJU: Um das hier uebersichtlicher zu halten, - // gibt es einen allumfassenden Konstruktor fuer Class - // Parameter: - // String name, - // Modifiers mod, - // ClassBody classbody, - // Vector containedtypes, - // UsedId superclass, - // Vector SuperInterfaces, - // Vector Parameterliste - - $$ = new Class($2.getName(), null, $3, containedTypes, usedIdsToCheck, null, null, $2.getParaVector(), $1.getOffset()); - this.initContainedTypes(); - this.initUsedIdsToCheck(); - } - | modifiers CLASS classidentifier classbody - { - $$ = new Class($3.getName(), $1, $4, containedTypes,usedIdsToCheck, null, null, $3.getParaVector(), $2.getOffset()); - this.initContainedTypes(); - this.initUsedIdsToCheck(); - } - | CLASS classidentifier super classbody - { - $$ = new Class($2.getName(), null, $4, containedTypes,usedIdsToCheck, $3, null, $2.getParaVector(), $1.getOffset()); - this.initContainedTypes(); - this.initUsedIdsToCheck(); - } - | modifiers CLASS classidentifier super classbody - { - $$ = new Class($3.getName(), $1, $5, containedTypes, usedIdsToCheck, $4, null, $3.getParaVector(), $2.getOffset()); - this.initContainedTypes(); - this.initUsedIdsToCheck(); - } - ///* auskommentiert von Andreas Stadelmeier A10023 - | CLASS classidentifier interfaces classbody - { - $$ = new Class($2.getName(), null, $4, containedTypes, usedIdsToCheck, null, $3.getVector(), $2.getParaVector(), $1.getOffset()); - this.initContainedTypes(); - this.initUsedIdsToCheck(); - } - | modifiers CLASS classidentifier interfaces classbody - { - $$ = new Class($3.getName(), $1, $5, containedTypes, usedIdsToCheck, null, $4.getVector(), $3.getParaVector(), $2.getOffset()); - this.initContainedTypes(); - this.initUsedIdsToCheck(); - } - | CLASS classidentifier super interfaces classbody - { - $$ = new Class($2.getName(), null, $5, containedTypes,usedIdsToCheck, $3, $4.getVector(), $2.getParaVector(), $1.getOffset()); - this.initContainedTypes(); - this.initUsedIdsToCheck(); - } - | modifiers CLASS classidentifier super interfaces classbody - { - $$ = new Class($3.getName(), $1, $6, containedTypes, usedIdsToCheck, $4, $5.getVector(), $3.getParaVector(), $2.getOffset()); - this.initContainedTypes(); - this.initUsedIdsToCheck(); - } - //*/ -interfaceidentifier : IDENTIFIER - { - // HOTI - // Verbindet den Namen eines Interfaces mit einer optionalen Parameterliste - $$ = new InterfaceAndParameter($1.getLexem()); - } - | IDENTIFIER '<' boundedClassParameters '>' - { - $$ = new InterfaceAndParameter($1.getLexem(), $3); - } - -classidentifier : IDENTIFIER - { - // SCJU: Hilfskonstrukt, um die Grammatik ueberschaubar zu halten - // Verbindet den Namen einer Klasse mit einer optionalen Parameterliste - $$ = new ClassAndParameter($1.getLexem()); - } - | IDENTIFIER '<' boundedClassParameters '>' - { - $$ = new ClassAndParameter($1.getLexem(), $3); - } - -interfacedeclaration: INTERFACE interfaceidentifier interfacebody - { - // SCJU: Interface - Interface ic = new Interface($2.getName(), $1.getOffset()); - ic.setParaList($2.getParaVector()); - ic.setInterfaceBody($3); - ic.setContainedTypes(containedTypes); - initContainedTypes(); - $$ = ic; - } - | modifiers INTERFACE interfaceidentifier interfacebody - { - Interface ic = new Interface($3.getName(), $1, $2.getOffset()); - ic.setInterfaceBody($4); - ic.setParaList($3.getParaVector()); - ic.setContainedTypes(containedTypes); - initContainedTypes(); - $$ = ic; - } - | INTERFACE interfaceidentifier extendsinterfaces interfacebody - { - Interface ic = new Interface($2.getName(), $1.getOffset()); - ic.setParaList($2.getParaVector()); - ic.setSuperInterfaces($3.getVector()); - ic.setInterfaceBody($4); - ic.setContainedTypes(containedTypes); - initContainedTypes(); - $$ = ic; - } - | modifiers INTERFACE interfaceidentifier extendsinterfaces interfacebody ; - { - Interface ic = new Interface($3.getName(), $1, $2.getOffset()); - ic.setParaList($3.getParaVector()); - ic.setSuperInterfaces($4.getVector()); - ic.setInterfaceBody($5); - ic.setContainedTypes(containedTypes); - initContainedTypes(); - $$ = ic; - } - -paralist : IDENTIFIER - { - ParaList pl = new ParaList(); - /* #JB# 05.04.2005 */ - /* ########################################################### */ - pl.getParalist().addElement(new GenericTypeVar($1.getLexem(), $1.getOffset())); - //pl.getParalist().addElement( new TypePlaceholder($1.getLexem()) ); - /* ########################################################### */ - org.apache.log4j.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + $1.getLexem() + " TV"); - $$ = pl; - } - | IDENTIFIER '<' paralist '>' - { - ParaList pl = new ParaList(); - RefType t = new RefType( $1.getLexem(),$1.getOffset() ); - t.set_ParaList( $3.get_ParaList() ); - pl.getParalist().addElement(t); - org.apache.log4j.Logger.getLogger("parser").debug( "IDENTIFIER '<' paralist '>' --> Paralist f�r " + $1.getLexem() + ": RefType"); - $$ = pl; - } - | wildcardparameter - { - ParaList pl = new ParaList(); - pl.getParalist().addElement($1); - $$ = pl; - } - | paralist ',' IDENTIFIER - { - - /* #JB# 05.04.2005 */ - /* ########################################################### */ - $1.getParalist().addElement(new GenericTypeVar($3.getLexem(),$3.getOffset())); - //$1.getParalist().addElement(new TypePlaceholder($3.getLexem())); - /* ########################################################### */ - org.apache.log4j.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER --> Paralist f�r " + $3.getLexem() + ": TV"); - org.apache.log4j.Logger.getLogger("parser").debug( "paralist: " + $1.getParalist()); - $$=$1; - } - - | paralist ',' IDENTIFIER '<' paralist '>' - { - RefType t = new RefType( $3.getLexem() ,$3.getOffset() ); - t.set_ParaList( $5.get_ParaList() ); - $1.getParalist().addElement(t); - org.apache.log4j.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist f�r " + $3.getLexem() + ": RefType"); - $$=$1; - } - | paralist ',' wildcardparameter - { - $1.getParalist().addElement($3); - $$=$1; - } - -wildcardparameter : '?' - { - //Luar 29.11.06 Offset auf -1, da keine Angabe vorhanden - WildcardType wc = new WildcardType(-1); - $$ = wc; - } - | '?' EXTENDS referencetype - { - ExtendsWildcardType ewc = new ExtendsWildcardType($2.getOffset(),$3); - $$ = ewc; - } - | '?' SUPER referencetype - { - SuperWildcardType swc = new SuperWildcardType($2.getOffset(),$3); - $$ = swc; - } - -classbody : '{' '}' - { - ClassBody CB = new ClassBody(); - $$ = CB; - } - - | '{' classbodydeclarations '}' - { - $$ = $2; - } - -modifiers :modifier - { - Modifiers Mod = new Modifiers(); - Mod.addModifier($1); - $$ = Mod; - } - |modifiers modifier - { - $1.addModifier($2); - $$ = $1; - } - -super :EXTENDS classtype - { - $$ = $2; - } - -interfaces : IMPLEMENTS interfacetype - { - // SCJU: Interface - InterfaceList il = new InterfaceList(); - il.addInterface($2); - $$ = il; - } - | interfaces ',' interfacetype ; - { - $1.addInterface($3); - $$ = $1; - } - -interfacebody : '{' '}' - { - // SCJU: Interface - $$ = new InterfaceBody(); - } - | '{' interfacememberdeclarations '}' - { - $$ = $2; - } - - - -extendsinterfaces : EXTENDS interfacetype - { - // SCJU: Interface - InterfaceList il = new InterfaceList(); - il.addInterface($2); - $$ = il; - } - | extendsinterfaces ',' interfacetype ; - { - $1.addInterface($3); - $$ = $1; - } - - -classbodydeclarations : classbodydeclaration - { - ClassBody CB = new ClassBody(); - CB.addField( $1 ); - $$=CB; - } - | classbodydeclarations classbodydeclaration - { - $1.addField($2); - $$ = $1; - } - - -modifier : PUBLIC - { - Public Pub = new Public(); - $$=Pub; - } - | PROTECTED - { - Protected Pro = new Protected(); - $$=Pro; - } - | PRIVATE - { - Private Pri = new Private(); - $$=Pri; - } - | STATIC - { - Static Sta = new Static(); - $$=Sta; - } - | ABSTRACT - { - Abstract Abs = new Abstract(); - $$=Abs; - } - | FINAL - { Final fin = new Final(); - $$ = fin; - } - - -classtype : classorinterfacetype - { - //PL 05-07-30 eingefuegt containedTypes ANFANG - RefType RT = new RefType(-1); - //RT.set_UsedId($1); - //RT.setName(RT.get_UsedId().get_Name_1Element()); - RT.set_ParaList($1.get_RealParaList()); - RT.setName($1.get_Name_1Element()); - containedTypes.addElement(RT); - //PL 05-07-30 eingefuegt containedTypes ENDE - - $$ = $1; - } - - -interfacememberdeclarations : interfacememberdeclaration - { - // SCJU: Interface - InterfaceBody ib = new InterfaceBody(); - ib.addElement($1); - $$ = ib; - } - | interfacememberdeclarations interfacememberdeclaration ; - { - $1.addElement($2); - $$ = $1; - } - -interfacetype : classorinterfacetype ; - { - // SCJU: Interfaces - $$ = $1; - } - -classbodydeclaration : classmemberdeclaration - { - $$=$1; - } - ///* auskommentiert von Andreas Stadelmeier a10023 - | staticinitializer - { - $$=$1; - } - | constructordeclaration - { - $$=$1; - } - //*/ - -classorinterfacetype : name parameter - { - if ($2 != null) { - //$1.set_ParaList($2.get_ParaList()); - $1.set_ParaList($2);//Änderung von Andreas Stadelmeier. Type statt GenericVarType - /* otth: originale (also diese) Parameterliste retten */ - //((UsedId)$1).vParaOrg = new Vector( $2.get_ParaList() ); - } - $$=$1; - } - -typelist : type - { - Vector tl = new Vector(); - tl.add($1); - $$ = tl; - } - | typelist ',' type - { - $1.add($3); - $$=$1; - } - | typelist ',' wildcardparameter - { - $1.add($3); - $$=$1; - } - | wildcardparameter - { - Vector tl = new Vector(); - tl.add($1); - $$ = tl; - } - -/* PL 05-07-28 erg�nzt, weil jeder classorinterfacetype auch parametrisiert sein kann */ -//TODO: Das hier ist möglicherweise falsch. Ein Typ hat keine parameterliste, nur eine Liste von RefTypes -parameter : { $$ = null; } - | '<' typelist '>' //'<'paralist'>'//typelist statt - { - $$ = $2; - } - -interfacememberdeclaration : constantdeclaration - { - // SCJU: Interfaces, Spezialform Konstantendef. - $$ = $1; - } - | abstractmethoddeclaration - { - $$ = $1; - } - -classmemberdeclaration : fielddeclaration - { - $$=$1; - } - | methoddeclaration - { - $$=$1; - } - -staticinitializer : STATIC block - { - Method STAT = new Method($1.getOffset()); - DeclId DST = new DeclId(); - DST.set_Name($1.getLexem()); - STAT.set_DeclId(DST); - Static ST = new Static(); - Modifiers MOD = new Modifiers(); - MOD.addModifier(ST); - STAT.set_Modifiers(MOD); - STAT.set_Block($2); - $$=STAT; - } - -constructordeclaration : constructordeclarator constructorbody - { - $1.set_Block($2); - $$ = $1; - } - | modifiers constructordeclarator constructorbody - { - $2.set_Block($3); - $2.set_Modifiers($1); - $$ = $2; - } - -constantdeclaration : modifiers type IDENTIFIER '=' expression';' ; - { - // SCJU: Interface - Constant c = new Constant($3.getLexem(), $1); - c.setType($2); - c.setValue($5); - $$ = c; - } - -abstractmethoddeclaration : methodheader ';' ; - { - // SCJU: Interface - $$ = $1; - } - -/* -added by Andreas Stadelmeier, a10023 -Bei Lokalen Variablen ist eine initialisierung der Variablen während der Deklarisierung nicht erlaubt. -Beispiel: var = 2; -Bei einer lokalen Variable lässt sich hier nicht ermitteln ob die Variable deklariert werden soll oder bereits deklariert wurde und ihr nur ein Wert zugewiesen werden soll. -Dieses Problem ist bei Feldern nicht der Fall. -*/ -fielddeclarator : - /* - type variabledeclarator '=' expression - { - FieldDeclaration ret = new FieldDeclaration($2.getOffset()); - ret.setType($1); - ret.set_DeclId($2); - ret.setWert($4); - $$=ret; - } - | - */ - variabledeclarator '=' expression - { - FieldDeclaration ret = new FieldDeclaration($1.getOffset()); - ret.set_DeclId($1); - ret.setWert($3); - $$=ret; - } - | variabledeclarator - { - FieldDeclaration ret = new FieldDeclaration($1.getOffset()); - ret.set_DeclId($1); - $$=ret; - } - -genericdeclarationlist : '<' boundedMethodParameters '>' - { - GenericDeclarationList ret = new GenericDeclarationList($2.getElements(),$2.getEndOffset()); - $$ = ret; - } - - -fielddeclaration : fielddeclarator ';' - { - $$=$1; - } - | type fielddeclarator ';' - { - $2.setType($1); - $$=$2; - } - | genericdeclarationlist type fielddeclarator ';' - {//angefügt von Andreas Stadelmeier - $3.setType($2); - $3.setGenericParameter($1); - $$=$3; - } - | - variabledeclarators ';' - { - $$=$1; - } - | - type variabledeclarators ';' - { - org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + $1); - $2.setType($1); - $$ = $2; - } - - | modifiers type variabledeclarators ';' - { - $3.setType($2); - for(int i=0;i<($3.getDeclIdVector().size());i++) - { - $3.getDeclIdVector().elementAt(i).modifiers=$1; - } - $$ = $3; - } - -methoddeclaration : methodheader methodbody - { - $1.set_Block($2); - $$=$1; - } - -block : '{' '}' - - { - Block Bl = new Block(); - $$=Bl; - } - - | '{' blockstatements '}' - { - $$=$2; - } - -constructordeclarator : simplename '(' ')' - { - Constructor CON = new Constructor(null); //TODO: Der Parser kann sowieso nicht zwischen einem Konstruktor und einer Methode unterscheiden. Das hier kann wegfallen... - DeclId DIDCon = new DeclId(); - DIDCon.set_Name($1.get_Name_1Element()); - CON.set_DeclId(DIDCon); - $$=CON; - } - | simplename '('formalparameterlist')' - { - Constructor CONpara = new Constructor(null); - DeclId DIconpara = new DeclId(); - DIconpara.set_Name($1.get_Name_1Element()); - CONpara.set_DeclId(DIconpara); - CONpara.setParameterList($3); - $$=CONpara; - } - -constructorbody : '{' '}' - { - Block CBL = new Block(); - $$=CBL; - } - | '{' explicitconstructorinvocation '}' - { - Block CBLexpl = new Block(); - CBLexpl.set_Statement($2); - $$=CBLexpl; - } - | '{' blockstatements '}' - { - $$=$2; - } - | '{'explicitconstructorinvocation blockstatements '}' - { - Block CBes = new Block(); - CBes.set_Statement($2); - for(int j=0;j<$3.statements.size();j++) - { - CBes.set_Statement((Statement)$3.statements.elementAt(j)); - } - $$=CBes; - } - -throws : THROWS classtypelist - { - ExceptionList EL = new ExceptionList(); - EL.set_addElem($2); - $$=EL; - } - -boundedClassParameter : boundedMethodParameter - { - $$ = $1; - } - -boundedClassParameters : boundedClassParameter - { - ParaList p = new ParaList(); - p.add_ParaList($1); - $$=p; - } - | boundedClassParameters ',' boundedClassParameter - { - $1.add_ParaList($3); - $$=$1; - } - -// returns GenericTypeVar -boundedMethodParameter : IDENTIFIER - { - $$=new GenericTypeVar($1.getLexem(),$1.getOffset()); - } - | IDENTIFIER EXTENDS boundedclassidentifierlist - { - BoundedGenericTypeVar gtv=new BoundedGenericTypeVar($1.getLexem(), $3, $1.getOffset() ,$3.getEndOffset()); - //gtv.setBounds($3); - $$=gtv; - } -// returns Vector -boundedclassidentifierlist : referencetype - { - Vector vec=new Vector(); - vec.addElement($1); - containedTypes.addElement($1); - $$=new BoundedClassIdentifierList(vec, $1.getOffset()+$1.getName().length()); - } - | boundedclassidentifierlist '&' referencetype - { - $1.addElement($3); - $1.addOffsetOff($3); - containedTypes.addElement($3); - $$=$1; - } -// returns Vector -boundedMethodParameters : boundedMethodParameter - { - GenericVarDeclarationList vec=new GenericVarDeclarationList(); - vec.addElement($1); - $$=vec; - } - | boundedMethodParameters ',' boundedMethodParameter - { - $1.addElement($3); - $$=$1; - } - - -// returns Method -methodheader :genericdeclarationlist type methoddeclarator - { - $3.setType($2); - $3.setGenericParameter($1); - $$=$3; - } - | type methoddeclarator - { - $2.setType($1); - $$=$2; - } - | modifiers type methoddeclarator - { - $3.set_Modifiers($1); - $3.setType($2); - $$=$3; - } - | modifiers genericdeclarationlist type methoddeclarator - { - $4.set_Modifiers($1); - $4.setGenericParameter($2); - $4.setType($3); - $$=$4; - } - | type methoddeclarator throws - { - $2.setType($1); - $2.set_ExceptionList($3); - $$=$2; - } - | genericdeclarationlist type methoddeclarator throws - { - $3.setGenericParameter($1); - $3.setType($2); - $3.set_ExceptionList($4); - $$=$3; - } - | modifiers type methoddeclarator throws - { - $3.set_Modifiers($1); - $3.setType($2); - $3.set_ExceptionList($4); - $$=$3; - } - | modifiers genericdeclarationlist type methoddeclarator throws - { - $4.set_Modifiers($1); - $4.setGenericParameter($2); - $4.setType($3); - $4.set_ExceptionList($5); - $$=$4; - } - | VOID methoddeclarator - { - Void Voit = new Void($1.getOffset()); - $2.setType(Voit); - $$=$2; - } - | modifiers VOID methoddeclarator - { - Void voit = new Void($2.getOffset()); - $3.set_Modifiers($1); - $3.setType(voit); - $$=$3; - } - | VOID methoddeclarator throws - { - Void voyt = new Void($1.getOffset()); - $2.setType(voyt); - $2.set_ExceptionList($3); - $$=$2; - } - | modifiers VOID methoddeclarator throws - { - Void voyd = new Void($2.getOffset()); - $3.set_Modifiers($1); - $3.setType(voyd); - $3.set_ExceptionList($4); - $$=$3; - } - | genericdeclarationlist VOID methoddeclarator - { - Void Voit = new Void($2.getOffset()); - $3.setType(Voit); - $3.setGenericParameter($1); - $$=$3; - } - | modifiers genericdeclarationlist VOID methoddeclarator - { - Void voit = new Void($3.getOffset()); - $4.set_Modifiers($1); - $4.setType(voit); - $4.setGenericParameter($2); - $$=$4; - } - | genericdeclarationlist VOID methoddeclarator throws - { - Void voyt = new Void($2.getOffset()); - $3.setType(voyt); - $3.set_ExceptionList($4); - $3.setGenericParameter($1); - $$=$3; - } - | modifiers genericdeclarationlist VOID methoddeclarator throws - { - Void voyd = new Void($3.getOffset()); - $4.set_Modifiers($1); - $4.setType(voyd); - $4.set_ExceptionList($5); - $4.setGenericParameter($2); - $$=$4; - } - - | methoddeclarator - { - //auskommentiert von Andreas Stadelmeier (a10023) $1.setType(TypePlaceholder.fresh()); - $$=$1; - } - | genericdeclarationlist methoddeclarator - { - //auskommentiert von Andreas Stadelmeier (a10023) $4.setType(TypePlaceholder.fresh()); - $2.setGenericParameter($1); - $$=$2; - } - - | modifiers methoddeclarator - { - $2.set_Modifiers($1); - //auskommentiert von Andreas Stadelmeier (a10023) $2.setType(TypePlaceholder.fresh()); - $$=$2; - } - | methoddeclarator throws - { - //auskommentiert von Andreas Stadelmeier (a10023) $1.setType(TypePlaceholder.fresh()); - $1.set_ExceptionList($2); - $$=$1; - } - | modifiers methoddeclarator throws - { - $2.set_Modifiers($1); - //auskommentiert von Andreas Stadelmeier (a10023) $2.setType(TypePlaceholder.fresh()); - $2.set_ExceptionList($3); - $$=$2; - } - - -type : primitivetype - { - $$=$1; - } - |primitivetype '[' ']' - { - $1.setArray(true); - } - |referencetype - { - $$=$1; - } - |referencetype '[' ']' - { - $1.setArray(true); - } -variabledeclarators : variabledeclarator - { - FieldDeclaration IVD = new FieldDeclaration($1.getOffset()); - IVD.getDeclIdVector().addElement( $1 ); - IVD.setOffset($1.getOffset()); - $$ = IVD; - } - | variabledeclarators ',' variabledeclarator - { - $1.getDeclIdVector().addElement($3); - $$=$1; - } - -methodbody : block - { - $$=$1; - } - -blockstatements : blockstatement - { - Block Blstat = new Block(); - Blstat.set_Statement($1); - $$=Blstat; - } - - | blockstatements blockstatement - { - $1.set_Statement($2); - $$=$1; - } - -formalparameterlist :formalparameter - { - ParameterList PL = new ParameterList(); - PL.set_AddParameter($1); - $$ = PL; - } - |formalparameterlist ',' formalparameter - { - $1.set_AddParameter($3); - $$ = $1; - } - -explicitconstructorinvocation : THIS '(' ')' ';' - { - This THCON = new This($1.getOffset(),$1.getLexem().length()); - $$=THCON; - } - |THIS '(' argumentlist ')' ';' - { - This THCONargl = new This($1.getOffset(),$1.getLexem().length()); - THCONargl.set_ArgumentList($3); - $$=THCONargl; - } - // |SUPER '(' ')' ';' - // |SUPER '(' argumentlist ')' ';' - -classtypelist : classtype - { - RefType RT = new RefType(-1); - RT.set_UsedId($1); - RT.setName(RT.get_UsedId().get_Name_1Element()); - $$=RT; - } - | classtypelist ',' classtype - { - $1.set_UsedId($3); - $1.setName($1.get_UsedId().get_Name_1Element()); - $$=$1; - } - -methoddeclarator :IDENTIFIER '(' ')' - { - Method met = new Method($1.getOffset()); - /* #JB# 10.04.2005 */ - /* ########################################################### */ - met.setLineNumber($1.getLineNumber()); - met.setOffset($1.getOffset());//hinzugef�gt hoth: 07.04.2006 - /* ########################################################### */ - DeclId DImethod = new DeclId(); - DImethod.set_Name($1.getLexem()); - met.set_DeclId(DImethod); - $$ = met; - } - |IDENTIFIER '(' formalparameterlist ')' - { - Method met_para = new Method($1.getOffset()); - /* #JB# 10.04.2005 */ - /* ########################################################### */ - met_para.setLineNumber($1.getLineNumber()); - met_para.setOffset($1.getOffset());//hinzugef�gt hoth: 07.04.2006 - /* ########################################################### */ - DeclId Dimet_para = new DeclId(); - Dimet_para.set_Name($1.getLexem()); - met_para.set_DeclId(Dimet_para); - met_para.setParameterList($3); - $$ = met_para; - } - -primitivetype :BOOLEAN - { - BooleanType BT = new BooleanType(); - /* #JB# 05.04.2005 */ - /* ########################################################### */ - //BT.setName($1.getLexem()); - /* ########################################################### */ - $$=BT; - } - |numerictype - { - $$=$1; - } - -referencelongtype : typename parameter - { - if ($2 != null) { - //$1.set_ParaList($2.get_ParaList()); - $1.set_ParaList($2);//Änderung von Andreas Stadelmeier. Type statt GenericVarType - /* otth: originale (also diese) Parameterliste retten */ - //((UsedId)$1).vParaOrg = new Vector( $2.get_ParaList() ); - } - UsedId uid = $1; - RefType RT = new RefType(uid.getOffset()); - - RT.set_ParaList(uid.get_RealParaList()); - RT.setName(uid.getQualifiedName()); - - - //PL 05-07-30 eingefuegt containedTypes ANFANG - containedTypes.addElement(RT); - //PL 05-07-30 eingefuegt containedTypes ENDE - - $$=RT; - } - -referencetype :classorinterfacetype - { - org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->referenctype: " + $1); - RefType RT = new RefType($1.getOffset()); - - //ausgetauscht PL 05-07-30 - //RT.set_UsedId($1); - //RT.setName(RT.get_UsedId().get_Name_1Element()); - RT.set_ParaList($1.get_RealParaList()); - RT.setName($1.getQualifiedName()); - - - //PL 05-07-30 eingefuegt containedTypes ANFANG - containedTypes.addElement(RT); - //PL 05-07-30 eingefuegt containedTypes ENDE - - $$=RT; - } - - -/* 05-07-28 PL Parameterdeklarationen zur classorinterfacetype verschoben */ - -variabledeclarator : variabledeclaratorid - { - $$=$1; - } - /* auskommentiert von Andreas Stadelmeier, a10023: - eine Variable mit Initialisierung wird sowieso nicht geparst. - | variabledeclaratorid '=' variableinitializer - { - $1.set_Wert($3); - $$=$1; - } - */ -/* 05-07-28 PL auskommentiert - wird nicht ben�tigt aufgrund neuer classorinterfacetype declaration - | '<' paralist'>' variabledeclaratorid '=' variableinitializer - { - $4.set_Wert($6); - $4.set_Paratyp($2.get_ParaList()); - $$=$4; - } -*/ -blockstatement :localvariabledeclarationstatement - { - $$=$1; - } - |statement - { - $$=$1; - } - -formalparameter : type variabledeclaratorid - { - FormalParameter FP = new FormalParameter($2); - FP.setType($1); - //FP.set_DeclId($2); //auskommentiert von Andreas Stadelmeier. DeclId wird nun dem Konstruktor von FormalParameter übergeben. - $$=FP; - } - - /* otth: Methodenargumente koennen hiermit auch polymorph sein. */ -/* 05-07-28 PL auskommentiert - wird nicht ben�tigt aufgrund neuer classorinterfacetype declaration - | type '<'paralist'>' variabledeclaratorid - { - Parameterliste setzen - $5.set_Paratyp($3.get_ParaList()); - - FormalParameter FP = new FormalParameter($5); - FP.setType($1); - //FP.set_DeclId($5); - $$=FP; - - org.apache.log4j.Logger.getLogger("parser").debug("P->Polymorphes Methodenargument hinzugefuegt: Name = " + $5.get_Name() + " Typ = " + $1.getName()); - } -*/ - - | variabledeclaratorid - { - org.apache.log4j.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + $1.name); - - FormalParameter FP = new FormalParameter($1); - - // #JB# 31.03.2005 - // ########################################################### - //Type T = TypePlaceholder.fresh(); //auskommentiert von Andreas Stadelmeier - // Type T = new TypePlaceholder(""); /* otth: Name wird automatisch berechnet */ - // ########################################################### - //org.apache.log4j.Logger.getLogger("parser").debug("\n--> berechneter Name: " + T.getName()); - - //auskommentiert von Andreas Stadelmeier (a10023) FP.setType( T ); - //FP.set_DeclId($1); - - $$=FP; - } - -argumentlist : expression - { - ArgumentList AL = new ArgumentList(); - AL.expr.addElement($1); - $$=AL; - } - |argumentlist ',' expression - { - $1.expr.addElement($3); - $$=$1; - } - -numerictype :integraltype - { - $$=$1; - } - -variabledeclaratorid : IDENTIFIER - { - DeclId DI = new DeclId(); - /* #JB# 10.04.2005 */ - /* ########################################################### */ - DI.setLineNumber($1.getLineNumber()); - DI.setOffset($1.getOffset());//hinzugef�gt hoth: 07.04.2006 - /* ########################################################### */ - DI.set_Name($1.getLexem()); - $$=DI; - } - -variableinitializer :expression - { - $$=$1; - } - -localvariabledeclarationstatement :localvariabledeclaration ';' - { - $$=$1; - } - -statement :statementwithouttrailingsubstatement - { - $$=$1; - } - |ifthenstatement - { - $$=$1; - } - |ifthenelsestatement - { - $$=$1; - } - |whilestatement - { - $$=$1; - } - |forstatement - { - $$=$1; - } - -expression :assignmentexpression - { - $$=$1; - } - |classinstancecreationexpression - { - $$=$1; - } - -integraltype :INT - { - IntegerType IT = new IntegerType(); - /* #JB# 05.04.2005 */ - /* ########################################################### */ - //IT.setName($1.getLexem()); - /* ########################################################### */ - $$=IT; - } - | CHAR - { - CharacterType CT = new CharacterType(); - /* #JB# 05.04.2005 */ - /* ########################################################### */ - //CT.setName($1.getLexem()); - /* ########################################################### */ - $$=CT; - } - -localvariabledeclaration : type variabledeclarators - { - org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); - LocalVarDecl LVD = new LocalVarDecl($1.getOffset(),$1.getVariableLength()); - LVD.setType($1); - LVD.setDeclidVector($2.getDeclIdVector()); - $$ = LVD; - } - - /* #JB# 31.03.2005 */ - /* ########################################################### */ - |variabledeclarators - { - org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); - LocalVarDecl LVD = new LocalVarDecl($1.getOffset(),$1.getVariableLength()); - //auskommentiert von Andreas Stadelmeier (a10023) LVD.setType(TypePlaceholder.fresh()); - LVD.setDeclidVector($1.getDeclIdVector()); - $$ = LVD; - } - /* ########################################################### */ - -statementwithouttrailingsubstatement : block - { - $$=$1; - } - | emptystatement - { - $$=$1; - } - | expressionstatement - { - $$=$1; - } - | returnstatement - { - $$=$1; - } - -ifthenstatement : IF '(' expression ')' statement - { - IfStmt Ifst = new IfStmt($3.getOffset(),$3.getVariableLength()); - Ifst.set_Expr($3); - Ifst.set_Then_block($5); - $$=Ifst; - } - -ifthenelsestatement : IF '('expression ')'statementnoshortif ELSE statement - { - IfStmt IfstElst = new IfStmt($3.getOffset(),$3.getVariableLength()); - IfstElst.set_Expr($3); - IfstElst.set_Then_block($5); - IfstElst.set_Else_block($7); - $$=IfstElst; - } - -whilestatement : WHILE '(' expression ')' statement - { - WhileStmt Whlst = new WhileStmt($3.getOffset(),$3.getVariableLength()); - Whlst.set_Expr($3); - Whlst.set_Loop_block($5); - $$=Whlst; - } - -//forschleife -forstatement - //Bsp: for(i=0 ; i<10 ; i++){System.out.println(i)} - : FOR '(' expression ';' expression ';' expression ')' statement - { - ForStmt Fst = new ForStmt($3.getOffset(),$3.getVariableLength()); - Fst.set_head_Initializer($3); - Fst.set_head_Condition($5); - Fst.set_head_Loop_expr($7); - Fst.set_body_Loop_block($9); - - //Typannahme - $$ = Fst; - } - //Bsp: for(i=0 ; i<10 ; ){System.out.println(i)} - | FOR '(' expression ';' expression ';' ')' statement - { - ForStmt Fst = new ForStmt($3.getOffset(),$3.getVariableLength()); - Fst.set_head_Initializer($3); - Fst.set_head_Condition($5); - Fst.set_body_Loop_block($8); - - //Typannahme - $$ = Fst; - } - //Bsp: for(i=0 ; ; i++){System.out.println(i)} - | FOR '(' expression ';' ';' expression ')' statement - { - ForStmt Fst = new ForStmt($3.getOffset(),$3.getVariableLength()); - Fst.set_head_Initializer($3); - Fst.set_head_Loop_expr($6); - Fst.set_body_Loop_block($8); - - //Typannahme - $$ = Fst; - } - //Bsp: for( ; i<10 ; i++){System.out.println(i)} - | FOR '(' ';' expression ';' expression ')' statement - { - ForStmt Fst = new ForStmt($4.getOffset(),$4.getVariableLength()); - Fst.set_head_Condition($4); - Fst.set_head_Loop_expr($6); - Fst.set_body_Loop_block($8); - - //Typannahme - $$ = Fst; - } - //Bsp: for(i=0 ; ; ){System.out.println(i)} - | FOR '(' expression ';' ';' ')' statement - { - ForStmt Fst = new ForStmt($3.getOffset(),$3.getVariableLength()); - Fst.set_head_Initializer($3); - Fst.set_body_Loop_block($7); - - //Typannahme - $$ = Fst; - } - //Bsp: for( ; i<10 ; ){System.out.println(i)} - | FOR '(' ';' expression ';' ')' statement - { - ForStmt Fst = new ForStmt($4.getOffset(),$4.getVariableLength()); - Fst.set_head_Condition($4); - Fst.set_body_Loop_block($7); - - //Typannahme - $$ = Fst; - } - //Bsp: for( ; ; i++){System.out.println(i)} - | FOR '(' ';' ';' expression ')' statement - { - ForStmt Fst = new ForStmt($5.getOffset(),$5.getVariableLength()); - Fst.set_head_Loop_expr($5); - Fst.set_body_Loop_block($7); - - //Typannahme - $$ = Fst; - } - //Bsp: for( ; ; ){System.out.println(i)} - | FOR '(' ';' ';' ')' statement - { - ForStmt Fst = new ForStmt($6.getOffset(),$6.getVariableLength()); - Fst.set_body_Loop_block($6); - - //Typannahme - $$ = Fst; - } - -assignmentexpression : conditionalexpression - { - org.apache.log4j.Logger.getLogger("parser").debug("conditionalexpression"); - $$=$1; - } - | assignment - { - $$=$1; - } - - -emptystatement : ';' - { - EmptyStmt Empst = new EmptyStmt(); - $$=Empst; - } - -expressionstatement : statementexpression ';' - { - $$=$1; - } - -returnstatement : RETURN ';' - { - Return ret = new Return(-1,-1); - $$= ret; - } - | RETURN expression ';' - { - Return retexp = new Return($2.getOffset(),$2.getVariableLength()); - retexp.set_ReturnExpr($2); - $$=retexp; - } - -statementnoshortif :statementwithouttrailingsubstatement - { - $$=$1; - } - | ifthenelsestatementnoshortif - { - $$=$1; - } - | whilestatementnoshortif - { - $$=$1; - } - -conditionalexpression :conditionalorexpression - { - $$=$1; - } - // | conditionalorexpression '?' expression ':' conditionalexpression - -assignment :lefthandside assignmentoperator assignmentexpression - { - org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n"); - Assign Ass = new Assign($1.getOffset(),$1.getVariableLength()); - LocalOrFieldVar LOFV = new LocalOrFieldVar($1.getOffset(),$1.getVariableLength()); - LOFV.set_UsedId($1); - //auskommentiert von Andreas Stadelmeier (a10023) LOFV.setType(TypePlaceholder.fresh()); - //auskommentiert von Andreas Stadelmeier (a10023) Ass.setType(TypePlaceholder.fresh()); - if( $2 == null ) - { - org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> " + $3 + " \n"); - Ass.set_Expr( LOFV,$3 ); - } - else - { - Binary Bin = new Binary($3.getOffset(),$3.getVariableLength()); - Bin.set_Expr1(LOFV); - Bin.set_Operator($2); - Bin.set_Expr2($3); - org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1 --> Binary\n"); - //auskommentiert von Andreas Stadelmeier (a10023) Bin.setType(TypePlaceholder.fresh()); - Ass.set_Expr( LOFV, Bin ); - } - $$=Ass; - } - | lefthandside assignmentoperator classinstancecreationexpression - { - Assign Ass =new Assign($1.getOffset(),$1.getVariableLength()); - LocalOrFieldVar LOFV = new LocalOrFieldVar($1.getOffset(),$1.getVariableLength()); - LOFV.set_UsedId($1); - //auskommentiert von Andreas Stadelmeier (a10023) LOFV.setType(TypePlaceholder.fresh()); - //auskommentiert von Andreas Stadelmeier (a10023) Ass.setType(TypePlaceholder.fresh()); - if($2==null) - { - Ass.set_Expr(LOFV,$3); - } - else - { - Binary Bin = new Binary($3.getOffset(),$3.getVariableLength()); - Bin.set_Expr1(LOFV); - Bin.set_Operator($2); - //auskommentiert von Andreas Stadelmeier (a10023) Bin.setType(TypePlaceholder.fresh()); - Bin.set_Expr2($3); - Ass.set_Expr(LOFV,Bin); - } - $$=Ass; - } - -statementexpression :assignment - { - $$=$1; - } - | preincrementexpression - { - $$=$1; - } - | predecrementexpression - { - $$=$1; - } - | postincrementexpression - { - $$=$1; - } - | postdecrementexpression - { - $$=$1; - } - | methodinvocation - { - $$=$1; - } -/* | classinstancecreationexpression - { - $$=$1; - } -*/ - -ifthenelsestatementnoshortif :IF '(' expression ')' statementnoshortif - ELSE statementnoshortif - { - IfStmt IfElno = new IfStmt($3.getOffset(),$3.getVariableLength()); - IfElno.set_Expr($3); - IfElno.set_Then_block($5); - IfElno.set_Else_block($7); - $$=IfElno; - } - -whilestatementnoshortif :WHILE '(' expression ')' statementnoshortif - { - WhileStmt Whstno = new WhileStmt($3.getOffset(),$3.getVariableLength()); - Whstno.set_Expr($3); - Whstno.set_Loop_block($5); - $$=Whstno; - } - -conditionalorexpression : conditionalandexpression - { - $$=$1; - } - | conditionalorexpression LOGICALOR conditionalandexpression - { - Binary LogOr = new Binary($1.getOffset(),$1.getVariableLength()); - OrOp OrO = new OrOp($1.getOffset(),$1.getVariableLength()); - LogOr.set_Expr1($1); - LogOr.set_Expr2($3); - LogOr.set_Operator(OrO); - //auskommentiert von Andreas Stadelmeier (a10023) LogOr.setType(TypePlaceholder.fresh()); - $$=LogOr; - } - -// LambdaExpression eingefügt von Andreas Stadelmeier, a10023: - -lambdaassignmentoperator : LAMBDAASSIGNMENT - { - $$=null; - } - -lambdabody : block - { - $$=$1; - } - | expression - { - //Lambdabody kann auch nur aus einer Expression bestehen. In diesem Fall wird ein Block erstellt, welcher als einziges Statement ein return statment mit der expression hat. - //Bsp.: Aus der Expression |var=="hallo"| wird: |{return var=="hallo";}| - Block ret=new Block(); - ret.statements.add((Statement)new Return(0,0).set_ReturnExpr($1)); - //ret.statements.add((ExprStmt)$1); - $$=ret; - } - -lambdaexpressionparameter : '(' ')' - { - $$=null; - } - | '(' formalparameterlist ')' - { - $$=$2; - } - -lambdaexpression : lambdaexpressionparameter lambdaassignmentoperator lambdabody - { - LambdaExpression lambda = new LambdaExpression(/*((ParameSterList)$2).getOffset(),((ParameterList)$2).getVariableLength()*/0,0); - if($1!=null)lambda.setParameterList($1); - lambda.setBody((Block)$3); - $$=lambda; - } - - /* - | '(' ')' lambdaassignmentoperator lambdabody - { - LambdaExpression lambda = new LambdaExpression(0,0); //hier noch fixen - lambda.setBody((Block)$4); - $$=lambda; - } - */ - - - -lefthandside :name - { - $$=$1; - } - -assignmentoperator : '=' - { - $$=null; - } - | TIMESEQUAL - { - TimesOp TEO = new TimesOp(-1,-1); - $$=TEO; - } - | DIVIDEEQUAL - { - DivideOp DEO = new DivideOp(-1,-1); - $$=DEO; - } - | MODULOEQUAL - { - ModuloOp MEO = new ModuloOp(-1,-1); - $$=MEO; - } - | PLUSEQUAL - { - PlusOp PEO = new PlusOp(-1,-1); - $$=PEO; - } - | MINUSEQUAL - { - MinusOp MEO = new MinusOp(-1,-1); - $$=MEO; - } - // | SHIFTLEFTEQUAL - // | SIGNEDSHIFTRIGHTEQUAL - // | UNSIGNEDSHIFTRIGHTEQUAL - // | ANDEQUAL - // | XOREQUAL - // | OREQUAL - -preincrementexpression :INCREMENT unaryexpression - { - PreIncExpr PRINC = new PreIncExpr($2.getOffset(),$2.getVariableLength()); - PRINC.set_Expr($2); - $$=PRINC; - } - -predecrementexpression :DECREMENT unaryexpression - { - PreDecExpr PRDEC = new PreDecExpr($2.getOffset(),$2.getVariableLength()); - PRDEC.set_Expr($2); - $$=PRDEC; - } - -postincrementexpression :postfixexpression INCREMENT - { - PostIncExpr PIE = new PostIncExpr($1.getOffset(),$1.getVariableLength()); - PIE.set_Expr($1); - $$=PIE; - } - -postdecrementexpression :postfixexpression DECREMENT - { - PostDecExpr PDE = new PostDecExpr($1.getOffset(),$1.getVariableLength()); - PDE.set_Expr($1); - $$=PDE; - } - -methodinvocation: - name '(' ')' - { - org.apache.log4j.Logger.getLogger("parser").debug("M1"); - MethodCall MC = new MethodCall($1.getOffset(),$1.getVariableLength()); - UsedId udidmeth = new UsedId($1.getOffset()); - udidmeth.set_Name((String)(($1.get_Name()).elementAt($1.get_Name().size()-1))); - MC.set_UsedId(udidmeth); - Receiver rec = null; - if ($1.get_Name().size() > 2) { - - $1.removeLast(); - - //macht aus der Liste von Strings - //in usedid.name einen InstVar - InstVar INSTVA = new InstVar($1,$1.getOffset(),$1.getVariableLength()); - - //auskommentiert von Andreas Stadelmeier (a10023) INSTVA.setType(TypePlaceholder.fresh()); - rec = new Receiver(INSTVA); - } - else if ($1.get_Name().size() == 2) { - LocalOrFieldVar LOFV = new LocalOrFieldVar($1.getOffset(),$1.getVariableLength()); - $1.removeLast(); - LOFV.set_UsedId($1); - //auskommentiert von Andreas Stadelmeier (a10023) LOFV.setType(TypePlaceholder.fresh()); - rec = new Receiver(LOFV); - } - MC.set_Receiver(rec); - //auskommentiert von Andreas Stadelmeier (a10023) MC.setType(TypePlaceholder.fresh()); - $$=MC; - } - | name '('argumentlist')' - { - org.apache.log4j.Logger.getLogger("parser").debug("M2"); - MethodCall MCarg = new MethodCall($1.getOffset(),$1.getVariableLength()); - UsedId udidmeth = new UsedId($1.getOffset()); - udidmeth.set_Name((String)(($1.get_Name()).elementAt($1.get_Name().size()-1))); - MCarg.set_UsedId(udidmeth); - Receiver rec = null; - if ($1.get_Name().size() > 2) { - - $1.removeLast(); - - //macht aus der Liste von Strings - //in usedid.name einen InstVar - InstVar INSTVA = new InstVar($1,$1.getOffset(),$1.getVariableLength()); - - //auskommentiert von Andreas Stadelmeier (a10023) INSTVA.setType(TypePlaceholder.fresh()); - rec = new Receiver(INSTVA); - } - else if ($1.get_Name().size() == 2) { - LocalOrFieldVar LOFV = new LocalOrFieldVar($1.getOffset(),$1.getVariableLength()); - $1.removeLast(); - LOFV.set_UsedId($1); - //auskommentiert von Andreas Stadelmeier (a10023) LOFV.setType(TypePlaceholder.fresh()); - rec = new Receiver(LOFV); - } - MCarg.set_Receiver(rec); - MCarg.set_ArgumentList($3); - //auskommentiert von Andreas Stadelmeier (a10023) MCarg.setType(TypePlaceholder.fresh()); - $$=MCarg; - } - | primary '.' IDENTIFIER '(' ')' - { - org.apache.log4j.Logger.getLogger("parser").debug("M3"); - MethodCall MCpr = new MethodCall($1.getOffset(),$1.getVariableLength()); - - // PL 05-08-21 primary ist kein UsedId - //$1.usedid.set_Name($3.getLexem()); - //MCpr.set_UsedId($1.get_UsedId()); - UsedId udidmeth = new UsedId($1.getOffset()); - udidmeth.set_Name($3.getLexem()); - MCpr.set_UsedId(udidmeth); - - /* #JB# 04.06.2005 */ - /* ########################################################### */ - MCpr.set_Receiver(new Receiver($1)); - /* ########################################################### */ - //auskommentiert von Andreas Stadelmeier (a10023) MCpr.setType(TypePlaceholder.fresh()); - $$=MCpr; - } - | primary '.' IDENTIFIER '('argumentlist ')' - { - org.apache.log4j.Logger.getLogger("parser").debug("M4"); - MethodCall MCPA = new MethodCall($1.getOffset(),$1.getVariableLength()); - - // PL 05-08-21 primary ist kein UsedId - //$1.usedid.set_Name($3.getLexem()); - //MCPA.set_UsedId($1.get_UsedId()); - UsedId udidmeth = new UsedId($3.getOffset()); - udidmeth.set_Name($3.getLexem()); - MCPA.set_UsedId(udidmeth); - - /* #JB# 04.06.2005 */ - /* ########################################################### */ - MCPA.set_Receiver(new Receiver($1)); - /* ########################################################### */ - MCPA.set_ArgumentList($5); - //auskommentiert von Andreas Stadelmeier (a10023) MCPA.setType(TypePlaceholder.fresh()); - $$=MCPA; - } - // | SUPER '.' IDENTIFIER '(' ')' - // | SUPER '.' IDENTIFIER '('argumentlist')' - -classinstancecreationexpression : NEW classtype '(' ')' - { - NewClass NC = new NewClass($2.getOffset(),$2.getVariableLength()); - NC.set_UsedId($2); - usedIdsToCheck.addElement($2); - //auskommentiert von Andreas Stadelmeier (a10023) NC.setType(TypePlaceholder.fresh()); - $$=NC; - } - | NEW classtype '(' argumentlist ')' - { - NewClass NCarg = new NewClass($2.getOffset(),$2.getVariableLength()); - NCarg.set_UsedId($2); - usedIdsToCheck.addElement($2); - NCarg.set_ArgumentList($4); - //auskommentiert von Andreas Stadelmeier (a10023) NCarg.setType(TypePlaceholder.fresh()); - $$=NCarg; - } - -conditionalandexpression : inclusiveorexpression - { - $$=$1; - } - | conditionalandexpression LOGICALAND inclusiveorexpression - { - Binary And = new Binary($1.getOffset(),$1.getVariableLength()); - AndOp AndO = new AndOp($1.getOffset(),$1.getVariableLength()); - And.set_Expr1($1); - And.set_Expr2($3); - And.set_Operator(AndO); - //auskommentiert von Andreas Stadelmeier (a10023) And.setType(TypePlaceholder.fresh()); - $$=And; - } - -/* -fieldaccess :primary '.' IDENTIFIER - | SUPER '.' IDENTIFIER -*/ - -unaryexpression : preincrementexpression - { - $$=$1; - } - | predecrementexpression - { - $$=$1; - } - | '+' unaryexpression - { - PositivExpr POSEX=new PositivExpr($2.getOffset(),$2.getVariableLength()); - UnaryPlus UP= new UnaryPlus(); - POSEX.set_UnaryPlus(UP); - POSEX.set_Expr($2); - $$=POSEX; - } - | '-' unaryexpression - { - NegativeExpr NEGEX=new NegativeExpr($2.getOffset(),$2.getVariableLength()); - UnaryMinus UM=new UnaryMinus(); - NEGEX.set_UnaryMinus(UM); - NEGEX.set_Expr($2); - $$=NEGEX; - } - | unaryexpressionnotplusminus - { - $$=$1; - } - -postfixexpression :primary - { - $$=$1; - } - | name - { - if ($1.get_Name().size() > 1) { - - //macht aus der Liste von Strings - //in usedid.name einen InstVar - InstVar INSTVA = new InstVar($1,$1.getOffset(),$1.getVariableLength()); - - //auskommentiert von Andreas Stadelmeier (a10023) INSTVA.setType(TypePlaceholder.fresh()); - $$ = INSTVA; - } - else { - LocalOrFieldVar Postincexpr = new LocalOrFieldVar($1.getOffset(),$1.getVariableLength()); - Postincexpr.set_UsedId($1); - //auskommentiert von Andreas Stadelmeier (a10023) Postincexpr.setType(TypePlaceholder.fresh()); - $$=Postincexpr; - } - } - | postincrementexpression - { - $$=$1; - } - | postdecrementexpression - { - $$=$1; - } - -primary : primarynonewarray - { - $$=$1; - } - -inclusiveorexpression : exclusiveorexpression - { - $$=$1; - } - | inclusiveorexpression '|' exclusiveorexpression - -primarynonewarray : literal - { - $$=$1; - } - | THIS - { - This T = new This($1.getOffset(),$1.getLexem().length()); - UsedId UT = new UsedId($1.getOffset()); - UT.set_Name($1.getLexem()); - T.set_UsedId(UT); - $$=T; - } -/* auskommentiert von Andreas Stadelmeier - | '('expression')' - { - $$=$2; - } - */ -/* - | classinstancecreationexpression - { - $$=$1; - } - | fieldaccess -*/ - | methodinvocation - { - $$=$1; - } - |lambdaexpression - { - $$=$1; - } - - -unaryexpressionnotplusminus : postfixexpression {$$=$1;} - // | '~' unaryexpression - | '!' unaryexpression {NotExpr NE=new NotExpr($2.getOffset(),$2.getVariableLength()); - UnaryNot UN=new UnaryNot(); - NE.set_UnaryNot(UN); - NE.set_Expr($2); - $$=NE; - } - | castexpression {$$=$1;} - -exclusiveorexpression :andexpression {$$=$1;} - | exclusiveorexpression '^' andexpression //{ - // - //} - -literal : INTLITERAL {IntLiteral IL = new IntLiteral(); - IL.set_Int($1.String2Int()); - $$ = IL; - } - - | BOOLLITERAL {BoolLiteral BL = new BoolLiteral(); - BL.set_Bool($1.String2Bool()); - $$ = BL; - } - | CHARLITERAL {CharLiteral CL = new CharLiteral(); - CL.set_Char($1.CharInString()); - $$=CL; - } - | STRINGLITERAL - { - StringLiteral ST = new StringLiteral(); - ST.set_String($1.get_String()); - $$=ST; - } - | LONGLITERAL { LongLiteral LL = new LongLiteral(); - LL.set_Long($1.String2Long()); - $$ = LL; - } - | FLOATLITERAL { - FloatLiteral FL = new FloatLiteral(); - FL.set_Float($1.String2Float()); - $$ = FL; - } - | DOUBLELITERAL { - DoubleLiteral DL = new DoubleLiteral(); - DL.set_Double($1.String2Double()); - $$ = DL; - } - | JNULL; - { - Null NN = new Null(); - $$=NN; - } - -castexpression : '(' primitivetype ')' unaryexpression - { - CastExpr CaEx=new CastExpr($4.getOffset(),$4.getVariableLength()); - CaEx.set_Type($2); - CaEx.set_Expr($4); - $$=CaEx; - } - //| '(' expression ')' unaryexpressionnotplusminus - -andexpression :equalityexpression - { - $$=$1; - } - | andexpression '&' equalityexpression - { - } - -equalityexpression : relationalexpression - { - $$=$1; - } - | equalityexpression EQUAL relationalexpression - { - Binary EQ = new Binary($1.getOffset(),$1.getVariableLength()); - EqualOp EO = new EqualOp($1.getOffset(),$1.getVariableLength()); - EQ.set_Expr1($1); - EQ.set_Expr2($3); - EQ.set_Operator(EO); - //auskommentiert von Andreas Stadelmeier (a10023) EQ.setType(TypePlaceholder.fresh()); - $$=EQ; - } - | equalityexpression NOTEQUAL relationalexpression - { - Binary NEQ = new Binary($1.getOffset(),$1.getVariableLength()); - NotEqualOp NEO = new NotEqualOp($1.getOffset(),$1.getVariableLength()); - NEQ.set_Expr1($1); - NEQ.set_Expr2($3); - NEQ.set_Operator(NEO); - //auskommentiert von Andreas Stadelmeier (a10023) NEQ.setType(TypePlaceholder.fresh()); - $$=NEQ; - } - -relationalexpression : shiftexpression - { - $$=$1; - } - | relationalexpression '<' shiftexpression - { - Binary LO = new Binary($1.getOffset(),$1.getVariableLength()); - LessOp LOO = new LessOp($1.getOffset(),$1.getVariableLength()); - LO.set_Expr1($1); - LO.set_Expr2($3); - LO.set_Operator(LOO); - //auskommentiert von Andreas Stadelmeier (a10023) LO.setType(TypePlaceholder.fresh()); - $$=LO; - } - | relationalexpression '>' shiftexpression - { - Binary GO = new Binary($1.getOffset(),$1.getVariableLength()); - GreaterOp GOO = new GreaterOp($1.getOffset(),$1.getVariableLength()); - GO.set_Expr1($1); - GO.set_Expr2($3); - GO.set_Operator( GOO ); - //auskommentiert von Andreas Stadelmeier (a10023) GO.setType(TypePlaceholder.fresh()); - $$=GO; - } - | relationalexpression LESSEQUAL shiftexpression - { - Binary LE = new Binary($1.getOffset(),$1.getVariableLength()); - LessEquOp LEO = new LessEquOp($1.getOffset(),$1.getVariableLength()); - LE.set_Expr1($1); - LE.set_Expr2($3); - LE.set_Operator(LEO); - //auskommentiert von Andreas Stadelmeier (a10023) LE.setType(TypePlaceholder.fresh()); - $$=LE; - } - | relationalexpression GREATEREQUAL shiftexpression - { - Binary GE = new Binary($1.getOffset(),$1.getVariableLength()); - GreaterEquOp GEO = new GreaterEquOp($1.getOffset(),$1.getVariableLength()); - GE.set_Expr1($1); - GE.set_Expr2($3); - GE.set_Operator(GEO); - //auskommentiert von Andreas Stadelmeier (a10023) GE.setType(TypePlaceholder.fresh()); - $$=GE; - } - | relationalexpression INSTANCEOF referencetype - { - InstanceOf ISO=new InstanceOf($1.getOffset(),$1.getVariableLength()); - ISO.set_Expr($1); - ISO.set_Type($3); - $$=ISO; - } - -shiftexpression : additiveexpression - { - $$=$1; - } - -additiveexpression :multiplicativeexpression - { - $$=$1; - } - | additiveexpression '+' multiplicativeexpression - { - Binary AD = new Binary($1.getOffset(),$1.getVariableLength()); - PlusOp PO = new PlusOp($1.getOffset(),$1.getVariableLength()); - AD.set_Expr1($1); - AD.set_Expr2($3); - AD.set_Operator(PO); - //auskommentiert von Andreas Stadelmeier (a10023) AD.setType(TypePlaceholder.fresh()); - $$=AD; - } - | additiveexpression '-' multiplicativeexpression - { - Binary MI = new Binary($1.getOffset(),$1.getVariableLength()); - MinusOp MO = new MinusOp($1.getOffset(),$1.getVariableLength()); - MI.set_Expr1($1); - MI.set_Expr2($3); - MI.set_Operator(MO); - //auskommentiert von Andreas Stadelmeier (a10023) MI.setType(TypePlaceholder.fresh()); - $$=MI; - } - -multiplicativeexpression : unaryexpression - { - $$=$1; - } - | multiplicativeexpression '*' unaryexpression - { - Binary ML = new Binary($1.getOffset(),$1.getVariableLength()); - TimesOp TO = new TimesOp($1.getOffset(),$1.getVariableLength()); - ML.set_Expr1($1); - ML.set_Expr2($3); - ML.set_Operator(TO); - //auskommentiert von Andreas Stadelmeier (a10023) ML.setType(TypePlaceholder.fresh()); - $$=ML; - } - | multiplicativeexpression '/' unaryexpression - { - Binary DV = new Binary($1.getOffset(),$1.getVariableLength()); - DivideOp DO = new DivideOp($1.getOffset(),$1.getVariableLength()); - DV.set_Expr1($1); - DV.set_Expr2($3); - DV.set_Operator(DO); - //auskommentiert von Andreas Stadelmeier (a10023) DV.setType(TypePlaceholder.fresh()); - $$ = DV; - } - | multiplicativeexpression '%' unaryexpression - { - Binary MD = new Binary($1.getOffset(),$1.getVariableLength()); - ModuloOp MO = new ModuloOp($1.getOffset(),$1.getVariableLength()); - MD.set_Expr1($1); - MD.set_Expr2($3); - MD.set_Operator(MO); - //auskommentiert von Andreas Stadelmeier (a10023) MD.setType(TypePlaceholder.fresh()); - $$ =MD; - } - - -%% \ No newline at end of file diff --git a/src/mycompiler/myparser/JavaParser_old.jay b/src/mycompiler/myparser/JavaParser_old.jay deleted file mode 100755 index 4c5a00e4..00000000 --- a/src/mycompiler/myparser/JavaParser_old.jay +++ /dev/null @@ -1,1567 +0,0 @@ -%{ -package mycompiler.myparser; - -import java.util.Vector; - -import mycompiler.DeclId; -import mycompiler.ExceptionList; -import mycompiler.MyCompiler; -import mycompiler.ParaList; -import mycompiler.SourceFile; -import mycompiler.UsedId; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassBody; -import mycompiler.myclass.ClassDeclId; -import mycompiler.myclass.Constructor; -import mycompiler.myclass.FieldDecl; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.InstVarDecl; -import mycompiler.myclass.Method; -import mycompiler.myclass.ParameterList; -import mycompiler.mymodifier.Abstract; -import mycompiler.mymodifier.Modifier; -import mycompiler.mymodifier.Modifiers; -import mycompiler.mymodifier.Private; -import mycompiler.mymodifier.Protected; -import mycompiler.mymodifier.Public; -import mycompiler.mymodifier.Static; -import mycompiler.myoperator.AndOp; -import mycompiler.myoperator.DivideOp; -import mycompiler.myoperator.EqualOp; -import mycompiler.myoperator.GreaterEquOp; -import mycompiler.myoperator.GreaterOp; -import mycompiler.myoperator.LessEquOp; -import mycompiler.myoperator.LessOp; -import mycompiler.myoperator.MinusOp; -import mycompiler.myoperator.ModuloOp; -import mycompiler.myoperator.NotEqualOp; -import mycompiler.myoperator.Operator; -import mycompiler.myoperator.OrOp; -import mycompiler.myoperator.PlusOp; -import mycompiler.myoperator.TimesOp; -import mycompiler.mystatement.ArgumentList; -import mycompiler.mystatement.Assign; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Block; -import mycompiler.mystatement.BoolLiteral; -import mycompiler.mystatement.CastExpr; -import mycompiler.mystatement.CharLiteral; -import mycompiler.mystatement.EmptyStmt; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.ExprStmt; -import mycompiler.mystatement.IfStmt; -import mycompiler.mystatement.InstanceOf; -import mycompiler.mystatement.IntLiteral; -import mycompiler.mystatement.Literal; -import mycompiler.mystatement.LocalOrFieldVar; -import mycompiler.mystatement.LocalVarDecl; -import mycompiler.mystatement.MethodCall; -import mycompiler.mystatement.NegativeExpr; -import mycompiler.mystatement.NewClass; -import mycompiler.mystatement.NotExpr; -import mycompiler.mystatement.Null; -import mycompiler.mystatement.PositivExpr; -import mycompiler.mystatement.PostDecExpr; -import mycompiler.mystatement.PostIncExpr; -import mycompiler.mystatement.PreDecExpr; -import mycompiler.mystatement.PreIncExpr; -import mycompiler.mystatement.Return; -import mycompiler.mystatement.Statement; -import mycompiler.mystatement.StringLiteral; -import mycompiler.mystatement.This; -import mycompiler.mystatement.UnaryMinus; -import mycompiler.mystatement.UnaryNot; -import mycompiler.mystatement.UnaryPlus; -import mycompiler.mystatement.WhileStmt; -import mycompiler.mytype.BaseType; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.CharacterType; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TyploseVariable; - -public class JavaParser{ -public Vector path = new Vector(); -%} - -%token ABSTRACT -%token BOOLEAN -%token BREAK -%token CASE -%token CATCH -%token CHAR -%token CLASS -%token CONTINUE -%token DEFAULT -%token DO -%token ELSE -%token EXTENDS -%token FINALLY -%token FOR -%token IF -%token INSTANCEOF -%token INT -%token NEW -%token PRIVATE -%token PROTECTED -%token PUBLIC -%token RETURN -%token STATIC -%token SUPER -%token SWITCH -%token THIS -%token THROW -%token THROWS -%token TRY -%token VOID -%token WHILE -%token INTLITERAL -%token BOOLLITERAL -%token JNULL -%token CHARLITERAL -%token STRINGLITERAL -%token IDENTIFIER -%token EQUAL -%token LESSEQUAL -%token GREATEREQUAL -%token NOTEQUAL -%token LOGICALOR -%token LOGICALAND -%token INCREMENT -%token DECREMENT -%token SHIFTLEFT -%token SHIFTRIGHT -%token UNSIGNEDSHIFTRIGHT -%token SIGNEDSHIFTRIGHT -%token PLUSEQUAL -%token MINUSEQUAL -%token TIMESEQUAL -%token DIVIDEEQUAL -%token ANDEQUAL -%token OREQUAL -%token XOREQUAL -%token MODULOEQUAL -%token SHIFTLEFTEQUAL -%token SIGNEDSHIFTRIGHTEQUAL -%token UNSIGNEDSHIFTRIGHTEQUAL -%token BRACE -%token RELOP -%token OP -%token EOF - -%type classdeclaration -%type classbody -%type fielddeclaration -%type methodheader -%type methoddeclaration -%type methoddeclarator -%type classbodydeclarations -%type classbodydeclaration -%type classmemberdeclaration -%type variabledeclarators -%type variabledeclarator -%type variabledeclaratorid -%type simplename -%type qualifiedname -%type name -%type super -%type classtype -%type classorinterfacetype -%type integraltype -%type numerictype -%type primitivetype -%type referencetype -%type classtypelist -%type type -%type modifiers -%type modifier -%type block -%type methodbody -%type blockstatements -%type localvariabledeclarationstatement -%type localvariabledeclaration -%type throws -%type formalparameter -%type formalparameterlist -%type literal -%type primarynonewarray -%type primary -%type postfixexpression -%type unaryexpressionnotplusminus -%type unaryexpression -%type multiplicativeexpression -%type additiveexpression -%type shiftexpression -%type relationalexpression -%type equalityexpression -%type andexpression -%type exclusiveorexpression -%type inclusiveorexpression -%type conditionalandexpression -%type conditionalorexpression -%type conditionalexpression -%type assignmentexpression -%type expression -%type statementexpression -%type preincrementexpression -%type predecrementexpression -%type postincrementexpression -%type postdecrementexpression -%type expressionstatement -%type variableinitializer -%type statementwithouttrailingsubstatement -%type blockstatement -%type statement -%type statementnoshortif -%type whilestatement -%type whilestatementnoshortif -%type ifthenstatement -%type ifthenelsestatement -%type ifthenelsestatementnoshortif -%type emptystatement -%type returnstatement -%type classinstancecreationexpression -%type compilationunit -%type typedeclarations -%type assignment -%type assignmentoperator -%type lefthandside -%type argumentlist -%type methodinvocation -%type typedeclaration -%type constructordeclaration -%type constructordeclarator -%type constructorbody -%type explicitconstructorinvocation -%type staticinitializer -%type castexpression -%type paralist -%left ',' -%% - -compilationunit :typedeclarations - { - $$=$1; - } - -typedeclarations :typedeclaration - { - SourceFile Scfile = new SourceFile(); - Scfile.set_Class($1); - $$=Scfile; - } - |typedeclarations typedeclaration - { - $1.set_Class($2); - $$=$1; - } - -name :qualifiedname - { - $$=$1; - } - |simplename - { - $$=$1; - } - -typedeclaration :classdeclaration - { - $$=$1; - } - -qualifiedname : name '.' IDENTIFIER - { - $1.set_Name($3.getLexem()); - $$=$1; - } - -simplename : IDENTIFIER - { - UsedId UI = new UsedId(); - UI.set_Name( $1.getLexem() ); - $$ = UI; - } - -classdeclaration : CLASS IDENTIFIER classbody - { - MyCompiler.Debug("P->Neue Klasse: " + $2.getLexem(), 3); - Class C = new Class(); - ClassDeclId CDI = new ClassDeclId(); - CDI.set_classname( $2.getLexem() ); - C.set_ClassDeclId( CDI ); - C.set_ClassBody($3); - $$ = C; - } - - | modifiers CLASS IDENTIFIER classbody - { - Class Cmod = new Class(); - ClassDeclId CDImod = new ClassDeclId(); - CDImod.set_Modifiers($1); - CDImod.set_classname($3.getLexem()); - Cmod.set_ClassDeclId(CDImod); - Cmod.set_ClassBody($4); - $$ = Cmod; - } - - | CLASS IDENTIFIER super classbody - { - Class Csup = new Class(); - ClassDeclId CDIsup = new ClassDeclId(); - CDIsup.set_classname($2.getLexem()); - Csup.set_ClassDeclId(CDIsup); - Csup.set_UsedId($3); - Csup.set_ClassBody($4); - $$ = Csup; - } - - |modifiers CLASS IDENTIFIER super classbody - { - Class Cmodsup = new Class(); - ClassDeclId CDImodsup = new ClassDeclId(); - CDImodsup.set_Modifiers($1); - CDImodsup.set_classname($3.getLexem()); - Cmodsup.set_ClassDeclId(CDImodsup); - Cmodsup.set_UsedId($4); - Cmodsup.set_ClassBody($5); - $$ = Cmodsup; - } - | modifiers CLASS IDENTIFIER '<'paralist'>'classbody - { - Class Cmod = new Class(); - ClassDeclId CDImod = new ClassDeclId(); - CDImod.set_Modifiers($1); - CDImod.set_classname($3.getLexem()); - Cmod.set_ClassDeclId(CDImod); - Cmod.set_ParaList($5.get_ParaList()); - Cmod.set_ClassBody($7); - $$ = Cmod; - } - - |CLASS IDENTIFIER '<' paralist '>'classbody - { - Class C = new Class(); - ClassDeclId CDI = new ClassDeclId(); - CDI.set_classname($2.getLexem()); - C.set_ClassDeclId(CDI); - C.set_ClassBody($6); - C.set_ParaList($4.get_ParaList()); - $$ = C; - } - - | CLASS IDENTIFIER '<' paralist '>'super classbody - { - MyCompiler.Debug( "Klassendefinition: Basisklassen-Parameter = " + $4.get_ParaList(), 3 ); - MyCompiler.Debug( "Klassendefinition: Superklassen-Parameter = " + $6.get_ParaList(), 3 ); - MyCompiler.Debug( "Klassendefinition: Superklassen-Parameter = " + $6.get_ParaList().hashCode(), 3 ); - Class Csup = new Class(); - ClassDeclId CDIsup = new ClassDeclId(); - CDIsup.set_classname($2.getLexem()); - Csup.set_ClassDeclId(CDIsup); - Csup.set_ParaList($4.get_ParaList()); - Csup.set_UsedId($6); - Csup.set_ClassBody($7); - $$ = Csup; - } - - |modifiers CLASS IDENTIFIER '<'paralist'>'super classbody - { - Class Cmodsup = new Class(); - ClassDeclId CDImodsup = new ClassDeclId(); - CDImodsup.set_Modifiers($1); - CDImodsup.set_classname($3.getLexem()); - Cmodsup.set_ClassDeclId(CDImodsup); - Cmodsup.set_ParaList($5.get_ParaList()); - Cmodsup.set_UsedId($7); - Cmodsup.set_ClassBody($8); - $$ = Cmodsup; - } - - -paralist : IDENTIFIER - { - ParaList pl = new ParaList(); - pl.paralist.addElement( new TyploseVariable($1.getLexem()) ); - MyCompiler.Debug( "IDENTIFIER --> Paralist für " + $1.getLexem() + " TV", 3 ); - $$ = pl; - } - - | IDENTIFIER '<' paralist '>' - { - ParaList pl = new ParaList(); - RefType t = new RefType( $1.getLexem() ); - t.set_ParaList( $3.get_ParaList() ); - pl.paralist.addElement(t); - MyCompiler.Debug( "IDENTIFIER '<' paralist '>' --> Paralist für " + $1.getLexem() + ": RefType", 3 ); - $$ = pl; - } - - | paralist ',' IDENTIFIER - { - $1.paralist.addElement(new TyploseVariable($3.getLexem())); - MyCompiler.Debug( "paralist ',' IDENTIFIER --> Paralist für " + $3.getLexem() + ": TV", 3 ); - MyCompiler.Debug( "paralist: " + $1.paralist, 3 ); - $$=$1; - } - - | paralist ',' IDENTIFIER '<' paralist '>' - { - RefType t = new RefType( $3.getLexem() ); - t.set_ParaList( $5.get_ParaList() ); - $1.paralist.addElement(t); - MyCompiler.Debug( "paralist ',' IDENTIFIER '<' paralist '>' --> Paralist für " + $3.getLexem() + ": RefType", 3 ); - $$=$1; - } - -classbody : '{' '}' - { - ClassBody CB = new ClassBody(); - $$ = CB; - } - - | '{'classbodydeclarations '}' - { - $$ = $2; - } - -modifiers :modifier - { - Modifiers Mod = new Modifiers(); - Mod.modifier.addElement($1); - $$ = Mod; - } - |modifiers modifier - { - $1.modifier.addElement($2); - $$ = $1; - } - -super :EXTENDS classtype - { - $$ = $2; - } - -classbodydeclarations : classbodydeclaration - { - ClassBody CB = new ClassBody(); - CB.set_FieldDecl( $1 ); - $$=CB; - } - | classbodydeclarations classbodydeclaration - { - $1.set_FieldDecl($2); - $$ = $1; - } - - -modifier : PUBLIC - { - Public Pub = new Public(); - $$=Pub; - } - | PROTECTED - { - Protected Pro = new Protected(); - $$=Pro; - } - | PRIVATE - { - Private Pri = new Private(); - $$=Pri; - } - | STATIC - { - Static Sta = new Static(); - $$=Sta; - } - | ABSTRACT - { - Abstract Abs = new Abstract(); - $$=Abs; - } - -classtype : classorinterfacetype - { - $$ = $1; - } - | classorinterfacetype '<'paralist'>' - { - $1.set_ParaList($3.get_ParaList()); - - /* otth: originale (also diese) Parameterliste retten */ - ((UsedId)$1).vParaOrg = new Vector( $3.get_ParaList() ); - - $$ = $1; - } - -classbodydeclaration : classmemberdeclaration - { - $$=$1; - } - | staticinitializer - { - $$=$1; - } - | constructordeclaration - { - $$=$1; - } - -classorinterfacetype : name - { - $$=$1; - } - -classmemberdeclaration : fielddeclaration - { - $$=$1; - } - | methoddeclaration - { - $$=$1; - } - -staticinitializer : STATIC block - { - Method STAT = new Method(); - DeclId DST = new DeclId(); - DST.set_Name($1.getLexem()); - STAT.set_DeclId(DST); - Static ST = new Static(); - Modifiers MOD = new Modifiers(); - MOD.modifier.addElement(ST); - STAT.set_Modifiers(MOD); - STAT.set_Block($2); - $$=STAT; - } - -constructordeclaration : constructordeclarator constructorbody - { - $1.set_Block($2); - $$ = $1; - } - | modifiers constructordeclarator constructorbody - { - $2.set_Block($3); - $2.set_Modifiers($1); - $$ = $2; - } - -fielddeclaration : type variabledeclarators ';' - { - MyCompiler.Debug("T->Parser->fielddeclaration ...: type " + $1, 5); - $2.set_Type($1); - $$ = $2; - } - - | modifiers type variabledeclarators ';' - { - $3.set_Type($2); - for(int i=0;i<($3.declid.size());i++) - { - $3.declid.setElementAt((((DeclId)($3.declid.elementAt(i))).modifiers=$1),i); - } - $$ = $3; - } - -methoddeclaration : methodheader methodbody - { - $1.set_Block($2); - $$=$1; - } - -block : '{' '}' - - { - Block Bl = new Block(); - $$=Bl; - } - - | '{' blockstatements '}' - { - $$=$2; - } - -constructordeclarator : simplename '(' ')' - { - Constructor CON = new Constructor(); - DeclId DIDCon = new DeclId(); - DIDCon.set_Name($1.get_Name_1Element()); - CON.set_DeclId(DIDCon); - $$=CON; - } - | simplename '('formalparameterlist')' - { - Constructor CONpara = new Constructor(); - DeclId DIconpara = new DeclId(); - DIconpara.set_Name($1.get_Name_1Element()); - CONpara.set_DeclId(DIconpara); - CONpara.set_ParaList($3); - $$=CONpara; - } - -constructorbody : '{' '}' - { - Block CBL = new Block(); - $$=CBL; - } - | '{' explicitconstructorinvocation '}' - { - Block CBLexpl = new Block(); - CBLexpl.set_Statement($2); - $$=CBLexpl; - } - | '{' blockstatements '}' - { - $$=$2; - } - | '{'explicitconstructorinvocation blockstatements '}' - { - Block CBes = new Block(); - CBes.set_Statement($2); - for(int j=0;j<$3.statements.size();j++) - { - CBes.set_Statement((Statement)$3.statements.elementAt(j)); - } - $$=CBes; - } - -throws : THROWS classtypelist - { - ExceptionList EL = new ExceptionList(); - EL.set_addElem($2); - $$=EL; - } - -methodheader : type methoddeclarator - { - $2.set_ReturnType($1); - $$=$2; - } - | modifiers type methoddeclarator - { - $3.set_Modifiers($1); - $3.set_ReturnType($2); - $$=$3; - } - | type methoddeclarator throws - { - $2.set_ReturnType($1); - $2.set_ExceptionList($3); - $$=$2; - } - | modifiers type methoddeclarator throws - { - $3.set_Modifiers($1); - $3.set_ReturnType($2); - $3.set_ExceptionList($4); - $$=$3; - } - | VOID methoddeclarator - { - Type Voit = new Type(); - Voit.set_Type($1.getLexem()); - $2.set_ReturnType(Voit); - $$=$2; - } - | modifiers VOID methoddeclarator - { - Type voit = new Type(); - voit.set_Type($2.getLexem()); - $3.set_Modifiers($1); - $3.set_ReturnType(voit); - $$=$3; - } - | VOID methoddeclarator throws - { - Type voyt = new Type(); - voyt.set_Type($1.getLexem()); - $2.set_ReturnType(voyt); - $2.set_ExceptionList($3); - $$=$2; - } - | modifiers VOID methoddeclarator throws - { - Type voyd = new Type(); - voyd.set_Type($2.getLexem()); - $3.set_Modifiers($1); - $3.set_ReturnType(voyd); - $3.set_ExceptionList($4); - $$=$3; - } - -type : primitivetype - { - $$=$1; - } - |referencetype - { - $$=$1; - } - -variabledeclarators : variabledeclarator - { - InstVarDecl IVD = new InstVarDecl(); - IVD.declid.addElement( $1 ); - $$ = IVD; - } - | variabledeclarators ',' variabledeclarator - { - $1.declid.addElement($3); - $$=$1; - } - -methodbody : block - { - $$=$1; - } - -blockstatements : blockstatement - { - Block Blstat = new Block(); - Blstat.set_Statement($1); - $$=Blstat; - } - - | blockstatements blockstatement - { - $1.set_Statement($2); - $$=$1; - } - -formalparameterlist :formalparameter - { - ParameterList PL = new ParameterList(); - PL.set_AddParameter($1); - $$ = PL; - } - |formalparameterlist ',' formalparameter - { - $1.set_AddParameter($3); - $$ = $1; - } - -explicitconstructorinvocation : THIS '(' ')' ';' - { - This THCON = new This(); - $$=THCON; - } - |THIS '(' argumentlist ')' ';' - { - This THCONargl = new This(); - THCONargl.set_ArgumentList($3); - $$=THCONargl; - } - // |SUPER '(' ')' ';' - // |SUPER '(' argumentlist ')' ';' - -classtypelist : classtype - { - RefType RT = new RefType(); - RT.set_UsedId($1); - RT.set_Type(RT.used.get_Name_1Element()); - $$=RT; - } - | classtypelist ',' classtype - { - $1.set_UsedId($3); - $1.set_Type($1.used.get_Name_1Element()); - $$=$1; - } - -methoddeclarator :IDENTIFIER '(' ')' - { - Method met = new Method(); - DeclId DImethod = new DeclId(); - DImethod.set_Name($1.getLexem()); - met.set_DeclId(DImethod); - $$ = met; - } - |IDENTIFIER '(' formalparameterlist ')' - { - Method met_para = new Method(); - DeclId Dimet_para = new DeclId(); - Dimet_para.set_Name($1.getLexem()); - met_para.set_DeclId(Dimet_para); - met_para.set_ParaList($3); - $$ = met_para; - } - -primitivetype :BOOLEAN - { - BooleanType BT = new BooleanType(); - BT.set_Type($1.getLexem()); - $$=BT; - } - |numerictype - { - $$=$1; - } - -referencetype :classorinterfacetype - { - MyCompiler.Debug("T->Parser->referenctype: " + $1, 5); - RefType RT = new RefType(); - RT.set_UsedId($1); - RT.set_Type(RT.used.get_Name_1Element()); - $$=RT; - } - -variabledeclarator : variabledeclaratorid - { - $$=$1; - } - - | variabledeclaratorid '=' variableinitializer - { - $1.set_Wert($3); - $$=$1; - } - - | '<' paralist'>' variabledeclaratorid '=' variableinitializer - { - $4.set_Wert($6); - $4.set_Paratyp($2.get_ParaList()); - $$=$4; - } - -blockstatement :localvariabledeclarationstatement - { - $$=$1; - } - |statement - { - $$=$1; - } - -formalparameter : type variabledeclaratorid - { - FormalParameter FP = new FormalParameter(); - FP.set_Type($1); - FP.set_DeclId($2); - $$=FP; - } - - /* otth: Methodenargumente koennen hiermit auch polymorph sein. */ - | type '<'paralist'>' variabledeclaratorid - { - /* Parameterliste setzen */ - $5.set_Paratyp($3.get_ParaList()); - - FormalParameter FP = new FormalParameter(); - FP.set_Type($1); - FP.set_DeclId($5); - $$=FP; - - MyCompiler.Debug("P->Polymorphes Methodenargument hinzugefuegt: Name = " + $5.get_Name() + " Typ = " + $1.get_Type(), 3); - } - -argumentlist : expression - { - ArgumentList AL = new ArgumentList(); - AL.expr.addElement($1); - $$=AL; - } - |argumentlist ',' expression - { - $1.expr.addElement($3); - $$=$1; - } - -numerictype :integraltype - { - $$=$1; - } - -variabledeclaratorid :IDENTIFIER - { - DeclId DI = new DeclId(); - DI.set_Name($1.getLexem()); - $$=DI; - } - -variableinitializer :expression - { - $$=$1; - } - -localvariabledeclarationstatement :localvariabledeclaration ';' - { - $$=$1; - } - -statement :statementwithouttrailingsubstatement - { - $$=$1; - } - |ifthenstatement - { - $$=$1; - } - |ifthenelsestatement - { - $$=$1; - } - |whilestatement - { - $$=$1; - } - -expression :assignmentexpression - { - $$=$1; - } - |classinstancecreationexpression - { - $$=$1; - } - -integraltype :INT - { - IntegerType IT = new IntegerType(); - IT.set_Type($1.getLexem()); - $$=IT; - } - | CHAR - { - CharacterType CT = new CharacterType(); - CT.set_Type($1.getLexem()); - $$=CT; - } - -localvariabledeclaration : type variabledeclarators - { - MyCompiler.Debug("P -> Lokale Variable angelegt!", 3); - LocalVarDecl LVD = new LocalVarDecl(); - LVD.set_Type($1); - LVD.declid=$2.declid; - $$ = LVD; - } - -statementwithouttrailingsubstatement : block - { - $$=$1; - } - | emptystatement - { - $$=$1; - } - | expressionstatement - { - $$=$1; - } - | returnstatement - { - $$=$1; - } - -ifthenstatement : IF '(' expression ')' statement - { - IfStmt Ifst = new IfStmt(); - Ifst.set_Expr($3); - Ifst.set_Then_block($5); - $$=Ifst; - } - -ifthenelsestatement : IF '('expression ')'statementnoshortif ELSE statement - { - IfStmt IfstElst = new IfStmt(); - IfstElst.set_Expr($3); - IfstElst.set_Then_block($5); - IfstElst.set_Else_block($7); - $$=IfstElst; - } - -whilestatement : WHILE '(' expression ')' statement - { - WhileStmt Whlst = new WhileStmt(); - Whlst.set_Expr($3); - Whlst.set_Loop_block($5); - $$=Whlst; - } - -assignmentexpression : conditionalexpression - { - $$=$1; - } - | assignment - { - $$=$1; - } - -emptystatement : ';' - { - EmptyStmt Empst = new EmptyStmt(); - $$=Empst; - } - -expressionstatement : statementexpression ';' - { - $$=$1; - } - -returnstatement : RETURN ';' - { - Return ret = new Return(); - $$= ret; - } - | RETURN expression ';' - { - Return retexp = new Return(); - retexp.set_ReturnExpr($2); - $$=retexp; - } - -statementnoshortif :statementwithouttrailingsubstatement - { - $$=$1; - } - | ifthenelsestatementnoshortif - { - $$=$1; - } - | whilestatementnoshortif - { - $$=$1; - } - -conditionalexpression :conditionalorexpression - { - $$=$1; - } - // | conditionalorexpression '?' expression ':' conditionalexpression - -assignment :lefthandside assignmentoperator assignmentexpression - { - MyCompiler.Debug("\nParser --> Zuweisung1!\n", 3); - Assign Ass = new Assign(); - LocalOrFieldVar LOFV = new LocalOrFieldVar(); - LOFV.set_UsedId($1); - if( $2 == null ) - { - MyCompiler.Debug("\nParser --> Zuweisung1 --> " + $3 + " \n", 3); - Ass.set_Expr( LOFV,$3 ); - } - else - { - Binary Bin = new Binary(); - Bin.set_Expr1(LOFV); - Bin.set_Operator($2); - Bin.set_Expr2($3); - MyCompiler.Debug("\nParser --> Zuweisung1 --> Binary\n", 3); - Ass.set_Expr( LOFV, Bin ); - } - $$=Ass; - } - | lefthandside assignmentoperator classinstancecreationexpression - { - Assign Ass =new Assign(); - LocalOrFieldVar LOFV = new LocalOrFieldVar(); - LOFV.set_UsedId($1); - if($2==null) - { - Ass.set_Expr(LOFV,$3); - } - else - { - Binary Bin = new Binary(); - Bin.set_Expr1(LOFV); - Bin.set_Operator($2); - Bin.set_Expr2($3); - Ass.set_Expr(LOFV,Bin); - } - $$=Ass; - } - -statementexpression :assignment - { - $$=$1; - } - | preincrementexpression - { - $$=$1; - } - | predecrementexpression - { - $$=$1; - } - | postincrementexpression - { - $$=$1; - } - | postdecrementexpression - { - $$=$1; - } - | methodinvocation - { - $$=$1; - } -/* | classinstancecreationexpression - { - $$=$1; - } -*/ - -ifthenelsestatementnoshortif :IF '(' expression ')' statementnoshortif - ELSE statementnoshortif - { - IfStmt IfElno = new IfStmt(); - IfElno.set_Expr($3); - IfElno.set_Then_block($5); - IfElno.set_Else_block($7); - $$=IfElno; - } - -whilestatementnoshortif :WHILE '(' expression ')' statementnoshortif - { - WhileStmt Whstno = new WhileStmt(); - Whstno.set_Expr($3); - Whstno.set_Loop_block($5); - $$=Whstno; - } - -conditionalorexpression : conditionalandexpression - { - $$=$1; - } - | conditionalorexpression LOGICALOR conditionalandexpression - { - Binary LogOr = new Binary(); - OrOp OrO = new OrOp(); - LogOr.set_Expr1($1); - LogOr.set_Expr2($3); - LogOr.set_Operator(OrO); - $$=LogOr; - } - - -lefthandside :name - { - $$=$1; - } - -assignmentoperator : '=' - { - $$=null; - } - | TIMESEQUAL - { - TimesOp TEO = new TimesOp(); - $$=TEO; - } - | DIVIDEEQUAL - { - DivideOp DEO = new DivideOp(); - $$=DEO; - } - | MODULOEQUAL - { - ModuloOp MEO = new ModuloOp(); - $$=MEO; - } - | PLUSEQUAL - { - PlusOp PEO = new PlusOp(); - $$=PEO; - } - | MINUSEQUAL - { - MinusOp MEO = new MinusOp(); - $$=MEO; - } - // | SHIFTLEFTEQUAL - // | SIGNEDSHIFTRIGHTEQUAL - // | UNSIGNEDSHIFTRIGHTEQUAL - // | ANDEQUAL - // | XOREQUAL - // | OREQUAL - -preincrementexpression :INCREMENT unaryexpression - { - PreIncExpr PRINC = new PreIncExpr(); - PRINC.set_Expr($2); - $$=PRINC; - } - -predecrementexpression :DECREMENT unaryexpression - { - PreDecExpr PRDEC = new PreDecExpr(); - PRDEC.set_Expr($2); - $$=PRDEC; - } - -postincrementexpression :postfixexpression INCREMENT - { - PostIncExpr PIE = new PostIncExpr(); - PIE.set_Expr($1); - $$=PIE; - } - -postdecrementexpression :postfixexpression DECREMENT - { - PostDecExpr PDE = new PostDecExpr(); - PDE.set_Expr($1); - $$=PDE; - } - -methodinvocation :name '(' ')' - { - MethodCall MC = new MethodCall(); - MC.set_UsedId($1); - $$=MC; - } - | name '('argumentlist')' - { - MethodCall MCarg = new MethodCall(); - MCarg.set_UsedId($1); - MCarg.set_ArgumentList($3); - $$=MCarg; - } - | primary '.' IDENTIFIER '(' ')' - { - MethodCall MCpr = new MethodCall(); - $1.usedid.set_Name($3.getLexem()); - MCpr.set_UsedId($1.get_UsedId()); - $$=MCpr; - } - | primary '.' IDENTIFIER '('argumentlist ')' - { - MethodCall MCPA = new MethodCall(); - $1.usedid.set_Name($3.getLexem()); - MCPA.set_UsedId($1.get_UsedId()); - MCPA.set_ArgumentList($5); - $$=MCPA; - } - // | SUPER '.' IDENTIFIER '(' ')' - // | SUPER '.' IDENTIFIER '('argumentlist')' - -classinstancecreationexpression : NEW classtype '(' ')' - { - NewClass NC = new NewClass(); - NC.set_UsedId($2); - $$=NC; - } - | NEW classtype '(' argumentlist ')' - { - NewClass NCarg = new NewClass(); - NCarg.set_UsedId($2); - NCarg.set_ArgumentList($4); - $$=NCarg; - } - -conditionalandexpression : inclusiveorexpression - { - $$=$1; - } - | conditionalandexpression LOGICALAND inclusiveorexpression - { - Binary And = new Binary(); - AndOp AndO = new AndOp(); - And.set_Expr1($1); - And.set_Expr2($3); - And.set_Operator(AndO); - $$=And; - } - -/* -fieldaccess :primary '.' IDENTIFIER - | SUPER '.' IDENTIFIER -*/ - -unaryexpression : preincrementexpression - { - $$=$1; - } - | predecrementexpression - { - $$=$1; - } - | '+' unaryexpression - { - PositivExpr POSEX=new PositivExpr(); - UnaryPlus UP= new UnaryPlus(); - POSEX.set_UnaryPlus(UP); - POSEX.set_Expr($2); - $$=POSEX; - } - | '-' unaryexpression - { - NegativeExpr NEGEX=new NegativeExpr(); - UnaryMinus UM=new UnaryMinus(); - NEGEX.set_UnaryMinus(UM); - NEGEX.set_Expr($2); - $$=NEGEX; - } - | unaryexpressionnotplusminus - { - $$=$1; - } - -postfixexpression :primary - { - $$=$1; - } - | name - { - LocalOrFieldVar Postincexpr = new LocalOrFieldVar(); - Postincexpr.set_UsedId($1); - $$=Postincexpr; - } - | postincrementexpression - { - $$=$1; - } - | postdecrementexpression - { - $$=$1; - } - -primary : primarynonewarray - { - $$=$1; - } - -inclusiveorexpression : exclusiveorexpression - { - $$=$1; - } - | inclusiveorexpression '|' exclusiveorexpression - -primarynonewarray : literal - { - $$=$1; - } - | THIS - { - This T = new This(); - UsedId UT = new UsedId(); - UT.set_Name($1.getLexem()); - T.set_UsedId(UT); - $$=T; - } - - | '('expression')' - { - $$=$2; - } -/* - | classinstancecreationexpression - { - $$=$1; - } - | fieldaccess -*/ - | methodinvocation - { - $$=$1; - } - -unaryexpressionnotplusminus : postfixexpression {$$=$1;} - // | '~' unaryexpression - | '!' unaryexpression {NotExpr NE=new NotExpr(); - UnaryNot UN=new UnaryNot(); - NE.set_UnaryNot(UN); - NE.set_Expr($2); - $$=NE; - } - | castexpression {$$=$1;} - -exclusiveorexpression :andexpression {$$=$1;} - | exclusiveorexpression '^' andexpression //{ - // - //} - -literal : INTLITERAL {IntLiteral IL = new IntLiteral(); - IL.set_Int($1.String2Int()); - $$ = IL; - } - - | BOOLLITERAL {BoolLiteral BL = new BoolLiteral(); - BL.set_Bool($1.String2Bool()); - $$ = BL; - } - | CHARLITERAL {CharLiteral CL = new CharLiteral(); - CL.set_Char($1.CharInString()); - $$=CL; - } - | STRINGLITERAL - { - StringLiteral ST = new StringLiteral(); - ST.set_String($1.get_String()); - $$=ST; - } - | JNULL; - { - Null NN = new Null(); - $$=NN; - } - -castexpression : '(' primitivetype ')' unaryexpression - { - CastExpr CaEx=new CastExpr(); - CaEx.set_Type($2); - CaEx.set_Expr($4); - $$=CaEx; - } - //| '(' expression ')' unaryexpressionnotplusminus - -andexpression :equalityexpression - { - $$=$1; - } - | andexpression '&' equalityexpression - { - } - -equalityexpression : relationalexpression - { - $$=$1; - } - | equalityexpression EQUAL relationalexpression - { - Binary EQ = new Binary(); - EqualOp EO = new EqualOp(); - EQ.set_Expr1($1); - EQ.set_Expr2($3); - EQ.set_Operator(EO); - $$=EQ; - } - | equalityexpression NOTEQUAL relationalexpression - { - Binary NEQ = new Binary(); - NotEqualOp NEO = new NotEqualOp(); - NEQ.set_Expr1($1); - NEQ.set_Expr2($3); - NEQ.set_Operator(NEO); - $$=NEQ; - } - -relationalexpression : shiftexpression - { - $$=$1; - } - | relationalexpression '<' shiftexpression - { - Binary LO = new Binary(); - LessOp LOO = new LessOp(); - LO.set_Expr1($1); - LO.set_Expr2($3); - LO.set_Operator(LOO); - $$=LO; - } - | relationalexpression '>' shiftexpression - { - Binary GO = new Binary(); - GreaterOp GOO = new GreaterOp(); - GO.set_Expr1($1); - GO.set_Expr2($3); - GO.set_Operator( GOO ); - $$=GO; - } - | relationalexpression LESSEQUAL shiftexpression - { - Binary LE = new Binary(); - LessEquOp LEO = new LessEquOp(); - LE.set_Expr1($1); - LE.set_Expr2($3); - LE.set_Operator(LEO); - $$=LE; - } - | relationalexpression GREATEREQUAL shiftexpression - { - Binary GE = new Binary(); - GreaterEquOp GEO = new GreaterEquOp(); - GE.set_Expr1($1); - GE.set_Expr2($3); - GE.set_Operator(GEO); - $$=GE; - } - | relationalexpression INSTANCEOF referencetype - { - InstanceOf ISO=new InstanceOf(); - ISO.set_Expr($1); - ISO.set_Type($3); - $$=ISO; - } - -shiftexpression : additiveexpression - { - $$=$1; - } - -additiveexpression :multiplicativeexpression - { - $$=$1; - } - | additiveexpression '+' multiplicativeexpression - { - Binary AD = new Binary(); - PlusOp PO = new PlusOp(); - AD.set_Expr1($1); - AD.set_Expr2($3); - AD.set_Operator(PO); - $$=AD; - } - | additiveexpression '-' multiplicativeexpression - { - Binary MI = new Binary(); - MinusOp MO = new MinusOp(); - MI.set_Expr1($1); - MI.set_Expr2($3); - MI.set_Operator(MO); - $$=MI; - } - -multiplicativeexpression : unaryexpression - { - $$=$1; - } - | multiplicativeexpression '*' unaryexpression - { - Binary ML = new Binary(); - TimesOp TO = new TimesOp(); - ML.set_Expr1($1); - ML.set_Expr2($3); - ML.set_Operator(TO); - $$=ML; - } - | multiplicativeexpression '/' unaryexpression - { - Binary DV = new Binary(); - DivideOp DO = new DivideOp(); - DV.set_Expr1($1); - DV.set_Expr2($3); - DV.set_Operator(DO); - $$ = DV; - } - | multiplicativeexpression '%' unaryexpression - { - Binary MD = new Binary(); - ModuloOp MO = new ModuloOp(); - MD.set_Expr1($1); - MD.set_Expr2($3); - MD.set_Operator(MO); - $$ =MD; - } - -/* OTTH: Methodenparametertypen müssen nicht mehr angegeben werden */ - -formalparameter : variabledeclaratorid - { - MyCompiler.Debug("\nFunktionsdeklaration mit typlosen Parametern: " + $1.name, 3); - - FormalParameter FP = new FormalParameter(); - - Type T = new TyploseVariable(""); /* otth: Name wird automatisch berechnet */ - MyCompiler.Debug("\n--> berechneter Name: " + T.get_Type(), 3); - - FP.set_Type( T ); - FP.set_DeclId($1); - - $$=FP; - } - -%% \ No newline at end of file diff --git a/src/mycompiler/mytest/APITest.java b/src/mycompiler/mytest/APITest.java index eade20e6..947e6405 100755 --- a/src/mycompiler/mytest/APITest.java +++ b/src/mycompiler/mytest/APITest.java @@ -1,7 +1,7 @@ package mycompiler.mytest; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; public class APITest { diff --git a/src/mycompiler/mytest/LambdaTest.java b/src/mycompiler/mytest/LambdaTest.java index a86bcf75..f1c61f27 100755 --- a/src/mycompiler/mytest/LambdaTest.java +++ b/src/mycompiler/mytest/LambdaTest.java @@ -15,14 +15,14 @@ import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.apache.log4j.SimpleLayout; -import typinferenz.assumptions.TypeAssumptions; -import typinferenz.exceptions.TypeinferenceException; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import mycompiler.mytypereconstruction.CSubstitution; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; public class LambdaTest { diff --git a/src/mycompiler/mytypereconstruction/CMultiplyTuple.java b/src/mycompiler/mytypereconstruction/CMultiplyTuple.java index 08641175..1a386ee0 100755 --- a/src/mycompiler/mytypereconstruction/CMultiplyTuple.java +++ b/src/mycompiler/mytypereconstruction/CMultiplyTuple.java @@ -5,7 +5,8 @@ package mycompiler.mytypereconstruction; // ino.module.CMultiplyTuple.8683.import import java.util.Iterator; import java.util.Vector; -import mycompiler.mytype.Type; + +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; // ino.end diff --git a/src/mycompiler/mytypereconstruction/CSubstitution.java b/src/mycompiler/mytypereconstruction/CSubstitution.java index 9ba5ecfa..13586222 100755 --- a/src/mycompiler/mytypereconstruction/CSubstitution.java +++ b/src/mycompiler/mytypereconstruction/CSubstitution.java @@ -5,16 +5,19 @@ package mycompiler.mytypereconstruction; // ino.module.CSubstitution.8685.import import java.util.Iterator; import java.util.Vector; + import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.set.CSubstitutionSet; + import org.apache.log4j.Logger; // ino.end +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; + // ino.class.CSubstitution.27003.description type=javadoc /** * Implementierung einer Typsubstitution. Bildet eine zu ersetzende diff --git a/src/mycompiler/mytypereconstruction/CSubstitutionGenVar.java b/src/mycompiler/mytypereconstruction/CSubstitutionGenVar.java index a4b4b9b0..c8a13829 100755 --- a/src/mycompiler/mytypereconstruction/CSubstitutionGenVar.java +++ b/src/mycompiler/mytypereconstruction/CSubstitutionGenVar.java @@ -3,9 +3,8 @@ package mycompiler.mytypereconstruction; // ino.end // ino.module.CSubstitutionGenVar.8686.import -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; -// ino.end +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; // ino.class.CSubstitutionGenVar.27057.description type=javadoc /** diff --git a/src/mycompiler/mytypereconstruction/CSupportData.java b/src/mycompiler/mytypereconstruction/CSupportData.java index 2915577e..199f033a 100755 --- a/src/mycompiler/mytypereconstruction/CSupportData.java +++ b/src/mycompiler/mytypereconstruction/CSupportData.java @@ -4,8 +4,10 @@ package mycompiler.mytypereconstruction; // ino.module.CSupportData.8687.import import java.util.Vector; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; + +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import mycompiler.mytypereconstruction.unify.FC_TTO; // ino.end diff --git a/src/mycompiler/mytypereconstruction/CTriple.java b/src/mycompiler/mytypereconstruction/CTriple.java index c5f483d5..cd525f5d 100755 --- a/src/mycompiler/mytypereconstruction/CTriple.java +++ b/src/mycompiler/mytypereconstruction/CTriple.java @@ -3,7 +3,7 @@ package mycompiler.mytypereconstruction; // ino.end // ino.module.CTriple.8688.import -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; // ino.end diff --git a/src/mycompiler/mytypereconstruction/replacementlistener/CReplaceTypeEvent.java b/src/mycompiler/mytypereconstruction/replacementlistener/CReplaceTypeEvent.java index 66c2c638..b39868a9 100755 --- a/src/mycompiler/mytypereconstruction/replacementlistener/CReplaceTypeEvent.java +++ b/src/mycompiler/mytypereconstruction/replacementlistener/CReplaceTypeEvent.java @@ -3,8 +3,7 @@ package mycompiler.mytypereconstruction.replacementlistener; // ino.end // ino.module.CReplaceTypeEvent.8691.import -import mycompiler.mytype.Type; -// ino.end +import de.dhbwstuttgart.syntaxtree.type.Type; // ino.class.CReplaceTypeEvent.27311.description type=javadoc /** diff --git a/src/mycompiler/mytypereconstruction/set/CSubstitutionSet.java b/src/mycompiler/mytypereconstruction/set/CSubstitutionSet.java index c63106db..6a98c406 100755 --- a/src/mycompiler/mytypereconstruction/set/CSubstitutionSet.java +++ b/src/mycompiler/mytypereconstruction/set/CSubstitutionSet.java @@ -5,9 +5,10 @@ package mycompiler.mytypereconstruction.set; // ino.module.CSubstitutionSet.8699.import import java.util.Iterator; import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.mytype.Pair; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.CSubstitution; // ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumption/CInstVarTypeAssumption.java b/src/mycompiler/mytypereconstruction/typeassumption/CInstVarTypeAssumption.java index 2f3b3be4..408b4049 100755 --- a/src/mycompiler/mytypereconstruction/typeassumption/CInstVarTypeAssumption.java +++ b/src/mycompiler/mytypereconstruction/typeassumption/CInstVarTypeAssumption.java @@ -4,7 +4,8 @@ package mycompiler.mytypereconstruction.typeassumption; // ino.module.CInstVarTypeAssumption.8706.import import java.util.Vector; -import mycompiler.mytype.Type; + +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.mytypereconstruction.set.IHashSetKey; import mycompiler.mytypereconstruction.typeassumptionkey.CInstVarKey; // ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumption/CLocalVarTypeAssumption.java b/src/mycompiler/mytypereconstruction/typeassumption/CLocalVarTypeAssumption.java index ffbfa2ec..a2408639 100755 --- a/src/mycompiler/mytypereconstruction/typeassumption/CLocalVarTypeAssumption.java +++ b/src/mycompiler/mytypereconstruction/typeassumption/CLocalVarTypeAssumption.java @@ -4,7 +4,8 @@ package mycompiler.mytypereconstruction.typeassumption; // ino.module.CLocalVarTypeAssumption.8707.import import java.util.Vector; -import mycompiler.mytype.Type; + +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.mytypereconstruction.set.IHashSetKey; import mycompiler.mytypereconstruction.typeassumptionkey.CLocalVarKey; // ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumption/CMethodTypeAssumption.java b/src/mycompiler/mytypereconstruction/typeassumption/CMethodTypeAssumption.java index d492502c..189c00e2 100755 --- a/src/mycompiler/mytypereconstruction/typeassumption/CMethodTypeAssumption.java +++ b/src/mycompiler/mytypereconstruction/typeassumption/CMethodTypeAssumption.java @@ -5,8 +5,9 @@ package mycompiler.mytypereconstruction.typeassumption; // ino.module.CMethodTypeAssumption.8708.import import java.util.Iterator; import java.util.Vector; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; + +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.set.IHashSetKey; import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; diff --git a/src/mycompiler/mytypereconstruction/typeassumption/CParaTypeAssumption.java b/src/mycompiler/mytypereconstruction/typeassumption/CParaTypeAssumption.java index 57bcc8fd..868ae7eb 100755 --- a/src/mycompiler/mytypereconstruction/typeassumption/CParaTypeAssumption.java +++ b/src/mycompiler/mytypereconstruction/typeassumption/CParaTypeAssumption.java @@ -4,7 +4,8 @@ package mycompiler.mytypereconstruction.typeassumption; // ino.module.CParaTypeAssumption.8709.import import java.util.Vector; -import mycompiler.mytype.Type; + +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.mytypereconstruction.set.IHashSetKey; import mycompiler.mytypereconstruction.typeassumptionkey.CMethodParaKey; // ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumption/CTypeAssumption.java b/src/mycompiler/mytypereconstruction/typeassumption/CTypeAssumption.java index eed59bf4..d9e0436b 100755 --- a/src/mycompiler/mytypereconstruction/typeassumption/CTypeAssumption.java +++ b/src/mycompiler/mytypereconstruction/typeassumption/CTypeAssumption.java @@ -5,8 +5,9 @@ package mycompiler.mytypereconstruction.typeassumption; // ino.module.CTypeAssumption.8710.import import java.util.Iterator; import java.util.Vector; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; + +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.IHashSetElement; diff --git a/src/mycompiler/mytypereconstruction/unify/FC_TTO.java b/src/mycompiler/mytypereconstruction/unify/FC_TTO.java index 79d60fff..651f02d5 100755 --- a/src/mycompiler/mytypereconstruction/unify/FC_TTO.java +++ b/src/mycompiler/mytypereconstruction/unify/FC_TTO.java @@ -4,9 +4,9 @@ package mycompiler.mytypereconstruction.unify; // ino.module.FC_TTO.8719.import import java.util.Vector; -import mycompiler.mytype.Pair; -import mycompiler.myclass.Class; -// ino.end + +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.Pair; // ino.class.FC_TTO.28013.description type=javadoc /** diff --git a/src/mycompiler/mytypereconstruction/unify/MUB.java b/src/mycompiler/mytypereconstruction/unify/MUB.java index 09a0a44f..c050b6d6 100755 --- a/src/mycompiler/mytypereconstruction/unify/MUB.java +++ b/src/mycompiler/mytypereconstruction/unify/MUB.java @@ -4,9 +4,9 @@ package mycompiler.mytypereconstruction.unify; // ino.module.MUB.8720.import import java.util.Vector; -import mycompiler.mytype.Pair; -import mycompiler.mytype.Type; -// ino.end + +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; // ino.class.MUB.28031.declaration public class MUB diff --git a/src/mycompiler/mytypereconstruction/unify/Unify.java b/src/mycompiler/mytypereconstruction/unify/Unify.java index 48cad741..2be23e21 100755 --- a/src/mycompiler/mytypereconstruction/unify/Unify.java +++ b/src/mycompiler/mytypereconstruction/unify/Unify.java @@ -7,29 +7,32 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.MyCompiler; + import mycompiler.myexception.CTypeReconstructionException; import mycompiler.myexception.MatchException; import mycompiler.myexception.SCException; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.CRefTypeSet; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.FreshExtendsWildcardType; -import mycompiler.mytype.FreshSuperWildcardType; -import mycompiler.mytype.FreshWildcardType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.IMatchable; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.WildcardType; -import mycompiler.mytype.Pair.PairOperator; -import mycompiler.myclass.Class; import mycompiler.mytypereconstruction.set.CSubstitutionSet; + import org.apache.log4j.Logger; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.CRefTypeSet; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.FreshExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.FreshSuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.FreshWildcardType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.IMatchable; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.WildcardType; +import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; + // ino.end // ino.class.Unify.28049.description type=javadoc diff --git a/src/mycompiler/unused/Import.java b/src/mycompiler/unused/Import.java index 319b3d53..65b9432b 100755 --- a/src/mycompiler/unused/Import.java +++ b/src/mycompiler/unused/Import.java @@ -1,6 +1,6 @@ package mycompiler.unused; -import mycompiler.myclass.Status; +import de.dhbwstuttgart.syntaxtree.misc.Status; public class Import extends Status { diff --git a/src/mycompiler/unused/JavaCompiler.java b/src/mycompiler/unused/JavaCompiler.java index 35a02b30..b8a1063e 100755 --- a/src/mycompiler/unused/JavaCompiler.java +++ b/src/mycompiler/unused/JavaCompiler.java @@ -1,7 +1,7 @@ package mycompiler.unused; -import mycompiler.myparser.JavaParser; -import mycompiler.myparser.Scanner; +import de.dhbwstuttgart.typeinference.parser.JavaParser; +import de.dhbwstuttgart.typeinference.parser.Scanner; public class JavaCompiler extends JavaParser { diff --git a/src/userinterface/ConsoleInterface.java b/src/userinterface/ConsoleInterface.java index b009508d..8bd5e028 100755 --- a/src/userinterface/ConsoleInterface.java +++ b/src/userinterface/ConsoleInterface.java @@ -4,16 +4,15 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; import java.util.Vector; - -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; -import typinferenz.exceptions.TypeinferenceException; - import java.util.*; import org.apache.log4j.Logger; import org.apache.log4j.varia.NullAppender; + +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; public class ConsoleInterface { private static final String directory = System.getProperty("user.dir"); diff --git a/test/bytecode/BytecodeTester.java b/test/bytecode/BytecodeTester.java index db64d3d8..47096d0a 100644 --- a/test/bytecode/BytecodeTester.java +++ b/test/bytecode/BytecodeTester.java @@ -7,9 +7,9 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.util.Vector; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; import mycompiler.mybytecode.ClassFile; import mycompiler.myexception.JVMCodeException; diff --git a/test/bytecode/EmptyClassTest.java b/test/bytecode/EmptyClassTest.java index 471640ef..601bb28c 100644 --- a/test/bytecode/EmptyClassTest.java +++ b/test/bytecode/EmptyClassTest.java @@ -3,13 +3,14 @@ package bytecode; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; import mycompiler.myexception.JVMCodeException; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; + public class EmptyClassTest extends TestCase { @Test diff --git a/test/mycompiler/test/blocks/TestForStmt.java b/test/mycompiler/test/blocks/TestForStmt.java index f4131866..587992cc 100755 --- a/test/mycompiler/test/blocks/TestForStmt.java +++ b/test/mycompiler/test/blocks/TestForStmt.java @@ -1,6 +1,6 @@ package mycompiler.test.blocks; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.BlockExpect; import mycompiler.test.expectationTypes.ClassExpect; diff --git a/test/mycompiler/test/blocks/TestIfStmt.java b/test/mycompiler/test/blocks/TestIfStmt.java index 8ca1ee79..8c61f4cd 100755 --- a/test/mycompiler/test/blocks/TestIfStmt.java +++ b/test/mycompiler/test/blocks/TestIfStmt.java @@ -2,10 +2,10 @@ package mycompiler.test.blocks; import java.util.Vector; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/blocks/TestInferenceAcrossBlocks.java b/test/mycompiler/test/blocks/TestInferenceAcrossBlocks.java index a89499ad..8bccc6f3 100755 --- a/test/mycompiler/test/blocks/TestInferenceAcrossBlocks.java +++ b/test/mycompiler/test/blocks/TestInferenceAcrossBlocks.java @@ -1,6 +1,6 @@ package mycompiler.test.blocks; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.BlockExpect; import mycompiler.test.expectationTypes.ClassExpect; diff --git a/test/mycompiler/test/blocks/TestSimpleBlocks.java b/test/mycompiler/test/blocks/TestSimpleBlocks.java index 93bac75a..11221b7d 100755 --- a/test/mycompiler/test/blocks/TestSimpleBlocks.java +++ b/test/mycompiler/test/blocks/TestSimpleBlocks.java @@ -1,6 +1,6 @@ package mycompiler.test.blocks; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.BlockExpect; import mycompiler.test.expectationTypes.ClassExpect; diff --git a/test/mycompiler/test/blocks/TestSimpleVariable.java b/test/mycompiler/test/blocks/TestSimpleVariable.java index 9cd4ff6e..26f4d2c3 100755 --- a/test/mycompiler/test/blocks/TestSimpleVariable.java +++ b/test/mycompiler/test/blocks/TestSimpleVariable.java @@ -1,6 +1,6 @@ package mycompiler.test.blocks; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/blocks/TestUndeterminedReturnNegative.java b/test/mycompiler/test/blocks/TestUndeterminedReturnNegative.java index 373d8ba3..41896285 100755 --- a/test/mycompiler/test/blocks/TestUndeterminedReturnNegative.java +++ b/test/mycompiler/test/blocks/TestUndeterminedReturnNegative.java @@ -2,10 +2,10 @@ package mycompiler.test.blocks; import java.util.Vector; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/blocks/TestUninitializedVariable.java b/test/mycompiler/test/blocks/TestUninitializedVariable.java index a0923c84..be8d1616 100755 --- a/test/mycompiler/test/blocks/TestUninitializedVariable.java +++ b/test/mycompiler/test/blocks/TestUninitializedVariable.java @@ -1,6 +1,6 @@ package mycompiler.test.blocks; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/blocks/TestWhileStmt.java b/test/mycompiler/test/blocks/TestWhileStmt.java index e6d9cabb..28f20741 100755 --- a/test/mycompiler/test/blocks/TestWhileStmt.java +++ b/test/mycompiler/test/blocks/TestWhileStmt.java @@ -1,6 +1,6 @@ package mycompiler.test.blocks; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/complexTypes/TestOwnClassMember.java b/test/mycompiler/test/complexTypes/TestOwnClassMember.java index 5f9cdaea..60fceee0 100755 --- a/test/mycompiler/test/complexTypes/TestOwnClassMember.java +++ b/test/mycompiler/test/complexTypes/TestOwnClassMember.java @@ -1,6 +1,6 @@ package mycompiler.test.complexTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/complexTypes/TestOwnClassMethod.java b/test/mycompiler/test/complexTypes/TestOwnClassMethod.java index 87405f49..19eaad00 100755 --- a/test/mycompiler/test/complexTypes/TestOwnClassMethod.java +++ b/test/mycompiler/test/complexTypes/TestOwnClassMethod.java @@ -2,7 +2,7 @@ package mycompiler.test.complexTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/complexTypes/TestStandardLibInheritanceInference.java b/test/mycompiler/test/complexTypes/TestStandardLibInheritanceInference.java index 5ac5316f..060322cb 100755 --- a/test/mycompiler/test/complexTypes/TestStandardLibInheritanceInference.java +++ b/test/mycompiler/test/complexTypes/TestStandardLibInheritanceInference.java @@ -1,6 +1,6 @@ package mycompiler.test.complexTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/complexTypes/TestStandardLibMethod.java b/test/mycompiler/test/complexTypes/TestStandardLibMethod.java index 55887770..eca0c6a3 100755 --- a/test/mycompiler/test/complexTypes/TestStandardLibMethod.java +++ b/test/mycompiler/test/complexTypes/TestStandardLibMethod.java @@ -2,7 +2,7 @@ package mycompiler.test.complexTypes; import java.util.Vector; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/expectationTypes/ClassExpect.java b/test/mycompiler/test/expectationTypes/ClassExpect.java index 998aaf3c..75f4e0e7 100755 --- a/test/mycompiler/test/expectationTypes/ClassExpect.java +++ b/test/mycompiler/test/expectationTypes/ClassExpect.java @@ -3,7 +3,7 @@ package mycompiler.test.expectationTypes; import java.util.HashMap; import java.util.Vector; -import mycompiler.mytype.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; /** * 15-04-08 diff --git a/test/mycompiler/test/expectationTypes/MethodExpect.java b/test/mycompiler/test/expectationTypes/MethodExpect.java index e344a5dd..584a0a4a 100755 --- a/test/mycompiler/test/expectationTypes/MethodExpect.java +++ b/test/mycompiler/test/expectationTypes/MethodExpect.java @@ -3,8 +3,8 @@ package mycompiler.test.expectationTypes; import java.util.HashMap; import java.util.Vector; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; /** * 15-04-08 * @author diff --git a/test/mycompiler/test/expectationTypes/VarExpect.java b/test/mycompiler/test/expectationTypes/VarExpect.java index 3fb0e81b..5d538b06 100755 --- a/test/mycompiler/test/expectationTypes/VarExpect.java +++ b/test/mycompiler/test/expectationTypes/VarExpect.java @@ -2,7 +2,7 @@ package mycompiler.test.expectationTypes; import java.util.Vector; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.Type; /** * 15-04-08 * @author diff --git a/test/mycompiler/test/generics/TestAssignmentTwoGenericTypesNegative.java b/test/mycompiler/test/generics/TestAssignmentTwoGenericTypesNegative.java index a3de8a85..73bf38dd 100755 --- a/test/mycompiler/test/generics/TestAssignmentTwoGenericTypesNegative.java +++ b/test/mycompiler/test/generics/TestAssignmentTwoGenericTypesNegative.java @@ -2,8 +2,8 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/generics/TestClassesWithBoundedGenericsOfTwoTypes.java b/test/mycompiler/test/generics/TestClassesWithBoundedGenericsOfTwoTypes.java index 62b8c29b..0f8cec05 100755 --- a/test/mycompiler/test/generics/TestClassesWithBoundedGenericsOfTwoTypes.java +++ b/test/mycompiler/test/generics/TestClassesWithBoundedGenericsOfTwoTypes.java @@ -2,10 +2,10 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/generics/TestClassesWithBoundedGenericsUsedInMethods.java b/test/mycompiler/test/generics/TestClassesWithBoundedGenericsUsedInMethods.java index 9a59cd5f..c76e427c 100755 --- a/test/mycompiler/test/generics/TestClassesWithBoundedGenericsUsedInMethods.java +++ b/test/mycompiler/test/generics/TestClassesWithBoundedGenericsUsedInMethods.java @@ -2,10 +2,10 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/generics/TestExtendedClassesWithBoundedGenerics.java b/test/mycompiler/test/generics/TestExtendedClassesWithBoundedGenerics.java index 25992b9c..0528d3e2 100755 --- a/test/mycompiler/test/generics/TestExtendedClassesWithBoundedGenerics.java +++ b/test/mycompiler/test/generics/TestExtendedClassesWithBoundedGenerics.java @@ -2,10 +2,10 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/generics/TestNestedGenerics.java b/test/mycompiler/test/generics/TestNestedGenerics.java index 9ed0a008..8ff2f845 100755 --- a/test/mycompiler/test/generics/TestNestedGenerics.java +++ b/test/mycompiler/test/generics/TestNestedGenerics.java @@ -2,17 +2,17 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; import mycompiler.test.expectationTypes.MethodExpect; import mycompiler.test.expectationTypes.VarExpect; -import mycompiler.mytype.ExtendsWildcardType; /** * 16-05-08 * @author diff --git a/test/mycompiler/test/generics/TestNestedGenericsNonExistingType.java b/test/mycompiler/test/generics/TestNestedGenericsNonExistingType.java index f1a51268..64657905 100755 --- a/test/mycompiler/test/generics/TestNestedGenericsNonExistingType.java +++ b/test/mycompiler/test/generics/TestNestedGenericsNonExistingType.java @@ -2,17 +2,17 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; import mycompiler.test.expectationTypes.MethodExpect; import mycompiler.test.expectationTypes.VarExpect; -import mycompiler.mytype.ExtendsWildcardType; /** * 16-05-08 * @author diff --git a/test/mycompiler/test/generics/TestSimpleClassesWithBoundedGenerics.java b/test/mycompiler/test/generics/TestSimpleClassesWithBoundedGenerics.java index 75a0c54e..c946a674 100755 --- a/test/mycompiler/test/generics/TestSimpleClassesWithBoundedGenerics.java +++ b/test/mycompiler/test/generics/TestSimpleClassesWithBoundedGenerics.java @@ -2,16 +2,16 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; import mycompiler.test.expectationTypes.MethodExpect; import mycompiler.test.expectationTypes.VarExpect; -import mycompiler.mytype.ExtendsWildcardType; /** * 13-05-08 * @author diff --git a/test/mycompiler/test/generics/TestSimpleClassesWithBoundedGenericsNegative.java b/test/mycompiler/test/generics/TestSimpleClassesWithBoundedGenericsNegative.java index 074b74df..4f33ead6 100755 --- a/test/mycompiler/test/generics/TestSimpleClassesWithBoundedGenericsNegative.java +++ b/test/mycompiler/test/generics/TestSimpleClassesWithBoundedGenericsNegative.java @@ -2,14 +2,14 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; import mycompiler.test.expectationTypes.MethodExpect; import mycompiler.test.expectationTypes.VarExpect; -import mycompiler.mytype.Type; /** * verifies correct identification of a bounded generic which is instanciated with a type not included in bounds diff --git a/test/mycompiler/test/generics/TestSimpleClassesWithGenerics.java b/test/mycompiler/test/generics/TestSimpleClassesWithGenerics.java index 586aa42f..c422e82b 100755 --- a/test/mycompiler/test/generics/TestSimpleClassesWithGenerics.java +++ b/test/mycompiler/test/generics/TestSimpleClassesWithGenerics.java @@ -2,14 +2,14 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; import mycompiler.test.expectationTypes.MethodExpect; import mycompiler.test.expectationTypes.VarExpect; -import mycompiler.mytype.GenericTypeVar; /** * checks simple usage of generics without bounds diff --git a/test/mycompiler/test/generics/TestSimpleClassesWithGenericsNegative.java b/test/mycompiler/test/generics/TestSimpleClassesWithGenericsNegative.java index 9ebb680f..80e5dfd5 100755 --- a/test/mycompiler/test/generics/TestSimpleClassesWithGenericsNegative.java +++ b/test/mycompiler/test/generics/TestSimpleClassesWithGenericsNegative.java @@ -2,14 +2,14 @@ package mycompiler.test.generics; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; import mycompiler.test.expectationTypes.MethodExpect; import mycompiler.test.expectationTypes.VarExpect; -import mycompiler.mytype.GenericTypeVar; /** * checks whether wrong usage of generics is detected diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMember.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMember.java index d5219e39..897943fa 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMember.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMember.java @@ -1,6 +1,6 @@ package mycompiler.test.inferenceByCharacteristic; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMemberAcrossClasses.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMemberAcrossClasses.java index 132a674b..8493685a 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMemberAcrossClasses.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMemberAcrossClasses.java @@ -1,6 +1,6 @@ package mycompiler.test.inferenceByCharacteristic; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.java index 15811438..fb2bf184 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCall.java @@ -2,7 +2,7 @@ package mycompiler.test.inferenceByCharacteristic; import org.apache.log4j.xml.DOMConfigurator; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCallAcrossClasses.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCallAcrossClasses.java index 0f5e38ba..7ece1945 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCallAcrossClasses.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodCallAcrossClasses.java @@ -1,6 +1,6 @@ package mycompiler.test.inferenceByCharacteristic; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodParameter.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodParameter.java index 183e1553..4aa74bcf 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodParameter.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodParameter.java @@ -1,6 +1,6 @@ package mycompiler.test.inferenceByCharacteristic; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodReturnTypeMixed1.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodReturnTypeMixed1.java index 1ed0cff0..a771f483 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodReturnTypeMixed1.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByMethodReturnTypeMixed1.java @@ -5,7 +5,7 @@ package mycompiler.test.inferenceByCharacteristic; * * identifying type of a variable by parameter passed to a method of another class */ -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnType.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnType.java index a4ab611a..81b10adf 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnType.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnType.java @@ -1,6 +1,6 @@ package mycompiler.test.inferenceByCharacteristic; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnTypeAcrossClasses.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnTypeAcrossClasses.java index c2df6378..bf5c07ac 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnTypeAcrossClasses.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceOwnTypeByReturnTypeAcrossClasses.java @@ -1,6 +1,6 @@ package mycompiler.test.inferenceByCharacteristic; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByOperation.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByOperation.java index 937a8b95..c098cf17 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByOperation.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByOperation.java @@ -1,6 +1,6 @@ package mycompiler.test.inferenceByCharacteristic; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByReturnType.java b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByReturnType.java index 4de16f85..5252b1f2 100755 --- a/test/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByReturnType.java +++ b/test/mycompiler/test/inferenceByCharacteristic/TestInferenceStdTypeByReturnType.java @@ -2,15 +2,15 @@ package mycompiler.test.inferenceByCharacteristic; import java.util.Vector; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; import mycompiler.test.expectationTypes.MethodExpect; import mycompiler.test.expectationTypes.VarExpect; -import mycompiler.mytype.SuperWildcardType; /** * 4-05-08 diff --git a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceAcrossLevel.java b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceAcrossLevel.java index 7123952e..7dbfefb5 100755 --- a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceAcrossLevel.java +++ b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceAcrossLevel.java @@ -1,6 +1,6 @@ package mycompiler.test.javaConcepts.inheritance; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceCircle.java b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceCircle.java index 62b51495..2184b449 100755 --- a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceCircle.java +++ b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceCircle.java @@ -1,6 +1,6 @@ package mycompiler.test.javaConcepts.inheritance; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceConstructor.java b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceConstructor.java index 17a4070b..7552296f 100755 --- a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceConstructor.java +++ b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceConstructor.java @@ -1,6 +1,6 @@ package mycompiler.test.javaConcepts.inheritance; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceMultiple.java b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceMultiple.java index 7f3cc31c..bf44556b 100755 --- a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceMultiple.java +++ b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceMultiple.java @@ -1,6 +1,6 @@ package mycompiler.test.javaConcepts.inheritance; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceOverriding.java b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceOverriding.java index 06d50161..498ebdec 100755 --- a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceOverriding.java +++ b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceOverriding.java @@ -1,6 +1,6 @@ package mycompiler.test.javaConcepts.inheritance; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceTwoHierarchies.java b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceTwoHierarchies.java index 023a5086..32d98791 100755 --- a/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceTwoHierarchies.java +++ b/test/mycompiler/test/javaConcepts/inheritance/TestInheritanceTwoHierarchies.java @@ -1,6 +1,6 @@ package mycompiler.test.javaConcepts.inheritance; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/inheritance/TestSimpleInheritance.java b/test/mycompiler/test/javaConcepts/inheritance/TestSimpleInheritance.java index 4f36fd72..1eaa2d3d 100755 --- a/test/mycompiler/test/javaConcepts/inheritance/TestSimpleInheritance.java +++ b/test/mycompiler/test/javaConcepts/inheritance/TestSimpleInheritance.java @@ -1,6 +1,6 @@ package mycompiler.test.javaConcepts.inheritance; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParameters.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParameters.java index 18622cc1..89404d4d 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParameters.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParameters.java @@ -5,7 +5,7 @@ package mycompiler.test.javaConcepts.overloading; * * */ -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParametersAndDifferentTypes.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParametersAndDifferentTypes.java index 919c600b..e7b1b28f 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParametersAndDifferentTypes.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingDifferentNumberOfParametersAndDifferentTypes.java @@ -5,7 +5,7 @@ package mycompiler.test.javaConcepts.overloading; * * */ -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericNotSameHierarchy.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericNotSameHierarchy.java index c31dec61..7ddcf6b3 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericNotSameHierarchy.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericNotSameHierarchy.java @@ -7,9 +7,9 @@ package mycompiler.test.javaConcepts.overloading; */ import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericSameHierarchy.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericSameHierarchy.java index 27bcc789..7ae0f93f 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericSameHierarchy.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericSameHierarchy.java @@ -7,9 +7,9 @@ package mycompiler.test.javaConcepts.overloading; */ import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceNotSameHierarchy.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceNotSameHierarchy.java index 71abf685..28b2fa37 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceNotSameHierarchy.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceNotSameHierarchy.java @@ -7,11 +7,11 @@ package mycompiler.test.javaConcepts.overloading; */ import java.util.Vector; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceSameHierarchy.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceSameHierarchy.java index d8b4a5e8..7748b450 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceSameHierarchy.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingGenericTypeInferenceSameHierarchy.java @@ -2,17 +2,17 @@ package mycompiler.test.javaConcepts.overloading; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; import mycompiler.test.expectationTypes.MethodExpect; import mycompiler.test.expectationTypes.VarExpect; -import mycompiler.mytype.GenericTypeVar; public class OverloadingGenericTypeInferenceSameHierarchy extends AbstractInferenceTest { private final static String TESTEDCLASSNAME="OverloadingGenericTypeInferenceSameHierarchy"; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingNotSameHierarchy.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingNotSameHierarchy.java index 0a52914f..30f86e92 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingNotSameHierarchy.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingNotSameHierarchy.java @@ -5,7 +5,7 @@ package mycompiler.test.javaConcepts.overloading; * * */ -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingSameHierarchy.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingSameHierarchy.java index f652f2f7..63813ef1 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingSameHierarchy.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingSameHierarchy.java @@ -5,7 +5,7 @@ package mycompiler.test.javaConcepts.overloading; * * */ -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceNotSameHierarchy.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceNotSameHierarchy.java index e9d69bf1..749902f9 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceNotSameHierarchy.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceNotSameHierarchy.java @@ -5,7 +5,7 @@ package mycompiler.test.javaConcepts.overloading; * * */ -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceSameHierarchy.java b/test/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceSameHierarchy.java index 1c3b0d79..031bd343 100755 --- a/test/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceSameHierarchy.java +++ b/test/mycompiler/test/javaConcepts/overloading/OverloadingTypeInferenceSameHierarchy.java @@ -5,7 +5,7 @@ package mycompiler.test.javaConcepts.overloading; * * */ -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/staticAccess/TestNonStaticAccess.java b/test/mycompiler/test/javaConcepts/staticAccess/TestNonStaticAccess.java index 55ee1f6d..14531571 100755 --- a/test/mycompiler/test/javaConcepts/staticAccess/TestNonStaticAccess.java +++ b/test/mycompiler/test/javaConcepts/staticAccess/TestNonStaticAccess.java @@ -1,8 +1,8 @@ package mycompiler.test.javaConcepts.staticAccess; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/staticAccess/TestStaticAccess.java b/test/mycompiler/test/javaConcepts/staticAccess/TestStaticAccess.java index be6183ed..b0c9fa2f 100755 --- a/test/mycompiler/test/javaConcepts/staticAccess/TestStaticAccess.java +++ b/test/mycompiler/test/javaConcepts/staticAccess/TestStaticAccess.java @@ -1,8 +1,8 @@ package mycompiler.test.javaConcepts.staticAccess; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/javaConcepts/staticAccess/TestStaticAccessError.java b/test/mycompiler/test/javaConcepts/staticAccess/TestStaticAccessError.java index 8b0e61a8..3c284eb9 100755 --- a/test/mycompiler/test/javaConcepts/staticAccess/TestStaticAccessError.java +++ b/test/mycompiler/test/javaConcepts/staticAccess/TestStaticAccessError.java @@ -1,5 +1,5 @@ package mycompiler.test.javaConcepts.staticAccess; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/lambda/ConstructorTest.java b/test/mycompiler/test/lambda/ConstructorTest.java index b1ab6b91..c26e204a 100755 --- a/test/mycompiler/test/lambda/ConstructorTest.java +++ b/test/mycompiler/test/lambda/ConstructorTest.java @@ -6,11 +6,11 @@ import static org.junit.Assert.fail; import java.util.Vector; import mycompiler.mytest.LambdaTest; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; -import typinferenz.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; public class ConstructorTest { @@ -31,7 +31,7 @@ public class ConstructorTest { Vector results = tester.runTest(); int anzahlGeparsterKlassen = 0; for(TypeinferenceResultSet res : results){ - mycompiler.myclass.Class cl = res.getInterferedClass(); + de.dhbwstuttgart.syntaxtree.Class cl = res.getInterferedClass(); TypeAssumptions ass = cl.getPublicFieldAssumptions(); if(cl.getName().equals("ConstructorTest1")){ anzahlGeparsterKlassen++; diff --git a/test/mycompiler/test/lambda/GenericParameterTest.java b/test/mycompiler/test/lambda/GenericParameterTest.java index b99317fa..f0adfa95 100644 --- a/test/mycompiler/test/lambda/GenericParameterTest.java +++ b/test/mycompiler/test/lambda/GenericParameterTest.java @@ -1,10 +1,11 @@ package mycompiler.test.lambda; import mycompiler.mytest.LambdaTest; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; + public class GenericParameterTest { @Test public void test() { diff --git a/test/mycompiler/test/lambda/GenericVarTest.java b/test/mycompiler/test/lambda/GenericVarTest.java index 729809f2..3999f8aa 100755 --- a/test/mycompiler/test/lambda/GenericVarTest.java +++ b/test/mycompiler/test/lambda/GenericVarTest.java @@ -5,10 +5,11 @@ import static org.junit.Assert.*; import java.util.Vector; import mycompiler.mytest.LambdaTest; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; + public class GenericVarTest { @Test diff --git a/test/mycompiler/test/lambda/OverloadingTest.java b/test/mycompiler/test/lambda/OverloadingTest.java index cf8388d6..43fca0ac 100755 --- a/test/mycompiler/test/lambda/OverloadingTest.java +++ b/test/mycompiler/test/lambda/OverloadingTest.java @@ -5,10 +5,11 @@ import static org.junit.Assert.*; import java.util.Vector; import mycompiler.mytest.LambdaTest; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; + public class OverloadingTest { @Test diff --git a/test/mycompiler/test/lambda/ParseMultipleFilesTest.java b/test/mycompiler/test/lambda/ParseMultipleFilesTest.java index cebc2264..d2c05437 100755 --- a/test/mycompiler/test/lambda/ParseMultipleFilesTest.java +++ b/test/mycompiler/test/lambda/ParseMultipleFilesTest.java @@ -4,11 +4,11 @@ import java.util.Vector; import static org.junit.Assert.*; import mycompiler.mytest.LambdaTest; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; -import typinferenz.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; public class ParseMultipleFilesTest { @@ -29,7 +29,7 @@ public class ParseMultipleFilesTest { Vector results = tester.runTest(); int anzahlGeparsterKlassen = 0; for(TypeinferenceResultSet res : results){ - mycompiler.myclass.Class cl = res.getInterferedClass(); + de.dhbwstuttgart.syntaxtree.Class cl = res.getInterferedClass(); TypeAssumptions ass = cl.getPublicFieldAssumptions(); if(cl.getName().equals("Klasse1")){ anzahlGeparsterKlassen++; diff --git a/test/mycompiler/test/lambda/TestAssign.java b/test/mycompiler/test/lambda/TestAssign.java index 83e101c7..149a9213 100755 --- a/test/mycompiler/test/lambda/TestAssign.java +++ b/test/mycompiler/test/lambda/TestAssign.java @@ -5,10 +5,11 @@ import java.util.Vector; import junit.framework.TestCase; import mycompiler.mytest.LambdaTest; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; + public class TestAssign extends TestCase{ private static final String exampleJavFile = "TestAssign.jav"; diff --git a/test/mycompiler/test/lambda/TestLambda.java b/test/mycompiler/test/lambda/TestLambda.java index 71abf137..4c540f48 100755 --- a/test/mycompiler/test/lambda/TestLambda.java +++ b/test/mycompiler/test/lambda/TestLambda.java @@ -5,10 +5,11 @@ import static org.junit.Assert.*; import java.util.HashMap; import mycompiler.mytest.LambdaTest; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; + public class TestLambda { private static final String exampleJavFile = "TestLambda.jav"; diff --git a/test/mycompiler/test/lambda/TestWhile.java b/test/mycompiler/test/lambda/TestWhile.java index 4d04fca9..974b14bd 100755 --- a/test/mycompiler/test/lambda/TestWhile.java +++ b/test/mycompiler/test/lambda/TestWhile.java @@ -6,14 +6,14 @@ import java.util.HashMap; import java.util.Vector; import mycompiler.mytest.LambdaTest; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import org.junit.Test; -import typinferenz.assumptions.TypeAssumptions; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; public class TestWhile { diff --git a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestExtendedOLD.java b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestExtendedOLD.java index d71deb10..6ebc1e45 100755 --- a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestExtendedOLD.java +++ b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestExtendedOLD.java @@ -3,7 +3,7 @@ package mycompiler.test.notUsedAnymore; import java.util.HashMap; import java.util.Vector; -import mycompiler.mytype.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; diff --git a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOLD_2.java b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOLD_2.java index d435f175..c5dc6b91 100755 --- a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOLD_2.java +++ b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOLD_2.java @@ -5,13 +5,13 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.mytype.GenericTypeVar; import mycompiler.mytypereconstruction.CIntersectionType; import mycompiler.mytypereconstruction.CSubstitution; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; diff --git a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOld.java b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOld.java index 0448fcb8..59ca47f7 100755 --- a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOld.java +++ b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOld.java @@ -5,16 +5,16 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; import mycompiler.mytypereconstruction.CIntersectionType; import mycompiler.mytypereconstruction.CSubstitution; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; diff --git a/test/mycompiler/test/notUsedAnymore/CTypeAssumptionWrapper.java b/test/mycompiler/test/notUsedAnymore/CTypeAssumptionWrapper.java index 7d4c42ae..4bc8c82c 100755 --- a/test/mycompiler/test/notUsedAnymore/CTypeAssumptionWrapper.java +++ b/test/mycompiler/test/notUsedAnymore/CTypeAssumptionWrapper.java @@ -1,6 +1,6 @@ package mycompiler.test.notUsedAnymore; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; public class CTypeAssumptionWrapper { diff --git a/test/mycompiler/test/notUsedAnymore/IResultValidator.java b/test/mycompiler/test/notUsedAnymore/IResultValidator.java index 7aba75bc..55f28f0c 100755 --- a/test/mycompiler/test/notUsedAnymore/IResultValidator.java +++ b/test/mycompiler/test/notUsedAnymore/IResultValidator.java @@ -2,7 +2,7 @@ package mycompiler.test.notUsedAnymore; import java.util.Vector; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; public interface IResultValidator { diff --git a/test/mycompiler/test/notUsedAnymore/TestAbstractInferenceTest2.java b/test/mycompiler/test/notUsedAnymore/TestAbstractInferenceTest2.java index 527aa810..a6486857 100755 --- a/test/mycompiler/test/notUsedAnymore/TestAbstractInferenceTest2.java +++ b/test/mycompiler/test/notUsedAnymore/TestAbstractInferenceTest2.java @@ -1,8 +1,8 @@ package mycompiler.test.notUsedAnymore; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/notUsedAnymore/TestConstantsWithoutType.java b/test/mycompiler/test/notUsedAnymore/TestConstantsWithoutType.java index 5b9a001d..971aee15 100755 --- a/test/mycompiler/test/notUsedAnymore/TestConstantsWithoutType.java +++ b/test/mycompiler/test/notUsedAnymore/TestConstantsWithoutType.java @@ -1,6 +1,6 @@ package mycompiler.test.notUsedAnymore; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/notUsedAnymore/TestGenerics.java b/test/mycompiler/test/notUsedAnymore/TestGenerics.java index 001bffae..77f37f8d 100755 --- a/test/mycompiler/test/notUsedAnymore/TestGenerics.java +++ b/test/mycompiler/test/notUsedAnymore/TestGenerics.java @@ -2,9 +2,9 @@ package mycompiler.test.notUsedAnymore; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/notUsedAnymore/TestInheritanceCheckValidImplementationFromInterface.java b/test/mycompiler/test/notUsedAnymore/TestInheritanceCheckValidImplementationFromInterface.java index 1f8c15d8..946001d8 100755 --- a/test/mycompiler/test/notUsedAnymore/TestInheritanceCheckValidImplementationFromInterface.java +++ b/test/mycompiler/test/notUsedAnymore/TestInheritanceCheckValidImplementationFromInterface.java @@ -1,7 +1,7 @@ package mycompiler.test.notUsedAnymore; -import mycompiler.mytype.RefType; -import mycompiler.mytype.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/notUsedAnymore/TestMethodReturnType.java b/test/mycompiler/test/notUsedAnymore/TestMethodReturnType.java index 00bc3cce..ff24c613 100755 --- a/test/mycompiler/test/notUsedAnymore/TestMethodReturnType.java +++ b/test/mycompiler/test/notUsedAnymore/TestMethodReturnType.java @@ -1,8 +1,8 @@ package mycompiler.test.notUsedAnymore; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative.java b/test/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative.java index 2e859074..7f333ded 100755 --- a/test/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative.java +++ b/test/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative.java @@ -1,6 +1,6 @@ package mycompiler.test.notUsedAnymore; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative2.java b/test/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative2.java index 63ec83fd..da9a797a 100755 --- a/test/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative2.java +++ b/test/mycompiler/test/notUsedAnymore/TestMethodReturnTypeNegative2.java @@ -1,6 +1,6 @@ package mycompiler.test.notUsedAnymore; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/operators/TestOperatorArithmetic.java b/test/mycompiler/test/operators/TestOperatorArithmetic.java index f250c7dc..0a2aa597 100755 --- a/test/mycompiler/test/operators/TestOperatorArithmetic.java +++ b/test/mycompiler/test/operators/TestOperatorArithmetic.java @@ -1,8 +1,8 @@ package mycompiler.test.operators; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/operators/TestOperatorBitwise.java b/test/mycompiler/test/operators/TestOperatorBitwise.java index dc13f9c0..337627d0 100755 --- a/test/mycompiler/test/operators/TestOperatorBitwise.java +++ b/test/mycompiler/test/operators/TestOperatorBitwise.java @@ -1,6 +1,6 @@ package mycompiler.test.operators; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/operators/TestOperatorBool.java b/test/mycompiler/test/operators/TestOperatorBool.java index 79422022..38e10d11 100755 --- a/test/mycompiler/test/operators/TestOperatorBool.java +++ b/test/mycompiler/test/operators/TestOperatorBool.java @@ -1,6 +1,6 @@ package mycompiler.test.operators; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/operators/TestOperatorComparison.java b/test/mycompiler/test/operators/TestOperatorComparison.java index 9038e505..e8ecd727 100755 --- a/test/mycompiler/test/operators/TestOperatorComparison.java +++ b/test/mycompiler/test/operators/TestOperatorComparison.java @@ -1,9 +1,9 @@ package mycompiler.test.operators; import java.util.Vector; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.IntegerType; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/operators/TestOperatorIncrement.java b/test/mycompiler/test/operators/TestOperatorIncrement.java index 2910afd6..0af78906 100755 --- a/test/mycompiler/test/operators/TestOperatorIncrement.java +++ b/test/mycompiler/test/operators/TestOperatorIncrement.java @@ -1,8 +1,8 @@ package mycompiler.test.operators; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/operators/TestOperatorObjects.java b/test/mycompiler/test/operators/TestOperatorObjects.java index 7d5bb1c6..f9cccff4 100755 --- a/test/mycompiler/test/operators/TestOperatorObjects.java +++ b/test/mycompiler/test/operators/TestOperatorObjects.java @@ -1,5 +1,5 @@ package mycompiler.test.operators; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/operators/TestOperatorString.java b/test/mycompiler/test/operators/TestOperatorString.java index a1aa6f7e..3b778ccc 100755 --- a/test/mycompiler/test/operators/TestOperatorString.java +++ b/test/mycompiler/test/operators/TestOperatorString.java @@ -1,5 +1,5 @@ package mycompiler.test.operators; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/primitiveTypes/BooleanTest.java b/test/mycompiler/test/primitiveTypes/BooleanTest.java index bc99f4ca..ad3f59c3 100755 --- a/test/mycompiler/test/primitiveTypes/BooleanTest.java +++ b/test/mycompiler/test/primitiveTypes/BooleanTest.java @@ -1,6 +1,6 @@ package mycompiler.test.primitiveTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/primitiveTypes/ByteTest.java b/test/mycompiler/test/primitiveTypes/ByteTest.java index 4050ae39..a283d6d1 100755 --- a/test/mycompiler/test/primitiveTypes/ByteTest.java +++ b/test/mycompiler/test/primitiveTypes/ByteTest.java @@ -1,6 +1,6 @@ package mycompiler.test.primitiveTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.BlockExpect; import mycompiler.test.expectationTypes.ClassExpect; diff --git a/test/mycompiler/test/primitiveTypes/CharTest.java b/test/mycompiler/test/primitiveTypes/CharTest.java index 53cc277d..7cd905ce 100755 --- a/test/mycompiler/test/primitiveTypes/CharTest.java +++ b/test/mycompiler/test/primitiveTypes/CharTest.java @@ -1,6 +1,6 @@ package mycompiler.test.primitiveTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/primitiveTypes/DoubleTest.java b/test/mycompiler/test/primitiveTypes/DoubleTest.java index 367cc791..597fa8d5 100755 --- a/test/mycompiler/test/primitiveTypes/DoubleTest.java +++ b/test/mycompiler/test/primitiveTypes/DoubleTest.java @@ -1,6 +1,6 @@ package mycompiler.test.primitiveTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/primitiveTypes/FloatTest.java b/test/mycompiler/test/primitiveTypes/FloatTest.java index ece240ee..a910b829 100755 --- a/test/mycompiler/test/primitiveTypes/FloatTest.java +++ b/test/mycompiler/test/primitiveTypes/FloatTest.java @@ -1,6 +1,6 @@ package mycompiler.test.primitiveTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/primitiveTypes/IntegerTest.java b/test/mycompiler/test/primitiveTypes/IntegerTest.java index fedbde4a..42a6559c 100755 --- a/test/mycompiler/test/primitiveTypes/IntegerTest.java +++ b/test/mycompiler/test/primitiveTypes/IntegerTest.java @@ -1,6 +1,6 @@ package mycompiler.test.primitiveTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/primitiveTypes/LongTest.java b/test/mycompiler/test/primitiveTypes/LongTest.java index ddb1b41d..8951408c 100755 --- a/test/mycompiler/test/primitiveTypes/LongTest.java +++ b/test/mycompiler/test/primitiveTypes/LongTest.java @@ -1,6 +1,6 @@ package mycompiler.test.primitiveTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/primitiveTypes/StringTest.java b/test/mycompiler/test/primitiveTypes/StringTest.java index 01f64cbc..4c538aee 100755 --- a/test/mycompiler/test/primitiveTypes/StringTest.java +++ b/test/mycompiler/test/primitiveTypes/StringTest.java @@ -1,6 +1,6 @@ package mycompiler.test.primitiveTypes; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/primitiveTypes/TestSimpleTypes.java b/test/mycompiler/test/primitiveTypes/TestSimpleTypes.java index 839c51e6..bbdfac28 100755 --- a/test/mycompiler/test/primitiveTypes/TestSimpleTypes.java +++ b/test/mycompiler/test/primitiveTypes/TestSimpleTypes.java @@ -1,8 +1,8 @@ package mycompiler.test.primitiveTypes; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.CharacterType; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.CharacterType; +import de.dhbwstuttgart.syntaxtree.type.IntegerType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestClassEmptyGenerics.java b/test/mycompiler/test/trivial/TestClassEmptyGenerics.java index 4c24c381..8556a7f5 100755 --- a/test/mycompiler/test/trivial/TestClassEmptyGenerics.java +++ b/test/mycompiler/test/trivial/TestClassEmptyGenerics.java @@ -1,6 +1,6 @@ package mycompiler.test.trivial; -import mycompiler.mytype.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestClassMember.java b/test/mycompiler/test/trivial/TestClassMember.java index 7d3ee1cc..6c36a636 100755 --- a/test/mycompiler/test/trivial/TestClassMember.java +++ b/test/mycompiler/test/trivial/TestClassMember.java @@ -2,8 +2,8 @@ package mycompiler.test.trivial; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestClassMemberAssignment.java b/test/mycompiler/test/trivial/TestClassMemberAssignment.java index ea3da679..9d244ea9 100755 --- a/test/mycompiler/test/trivial/TestClassMemberAssignment.java +++ b/test/mycompiler/test/trivial/TestClassMemberAssignment.java @@ -2,8 +2,8 @@ package mycompiler.test.trivial; import java.util.Vector; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestConstants.java b/test/mycompiler/test/trivial/TestConstants.java index 9170c3b7..cc6f9852 100755 --- a/test/mycompiler/test/trivial/TestConstants.java +++ b/test/mycompiler/test/trivial/TestConstants.java @@ -1,6 +1,6 @@ package mycompiler.test.trivial; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestConstructor.java b/test/mycompiler/test/trivial/TestConstructor.java index 7e25ddf1..8fee9776 100755 --- a/test/mycompiler/test/trivial/TestConstructor.java +++ b/test/mycompiler/test/trivial/TestConstructor.java @@ -1,6 +1,6 @@ package mycompiler.test.trivial; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestConstructorNegative.java b/test/mycompiler/test/trivial/TestConstructorNegative.java index 8a842de2..56e6e299 100755 --- a/test/mycompiler/test/trivial/TestConstructorNegative.java +++ b/test/mycompiler/test/trivial/TestConstructorNegative.java @@ -1,6 +1,6 @@ package mycompiler.test.trivial; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestInterfaceMember.java b/test/mycompiler/test/trivial/TestInterfaceMember.java index 9ee65c2b..b1a42a20 100755 --- a/test/mycompiler/test/trivial/TestInterfaceMember.java +++ b/test/mycompiler/test/trivial/TestInterfaceMember.java @@ -1,6 +1,6 @@ package mycompiler.test.trivial; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestInterfaceMethod.java b/test/mycompiler/test/trivial/TestInterfaceMethod.java index 77dcbd7a..af58cf8a 100755 --- a/test/mycompiler/test/trivial/TestInterfaceMethod.java +++ b/test/mycompiler/test/trivial/TestInterfaceMethod.java @@ -1,6 +1,6 @@ package mycompiler.test.trivial; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestInterfaceNotInferenced.java b/test/mycompiler/test/trivial/TestInterfaceNotInferenced.java index c3193ed0..cce9d877 100755 --- a/test/mycompiler/test/trivial/TestInterfaceNotInferenced.java +++ b/test/mycompiler/test/trivial/TestInterfaceNotInferenced.java @@ -1,6 +1,6 @@ package mycompiler.test.trivial; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestMethodEmpty.java b/test/mycompiler/test/trivial/TestMethodEmpty.java index 73f26ac4..05b1f535 100755 --- a/test/mycompiler/test/trivial/TestMethodEmpty.java +++ b/test/mycompiler/test/trivial/TestMethodEmpty.java @@ -1,6 +1,6 @@ package mycompiler.test.trivial; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestMethodEmptyGeneric.java b/test/mycompiler/test/trivial/TestMethodEmptyGeneric.java index 63b2d81d..26325c4e 100755 --- a/test/mycompiler/test/trivial/TestMethodEmptyGeneric.java +++ b/test/mycompiler/test/trivial/TestMethodEmptyGeneric.java @@ -1,7 +1,7 @@ package mycompiler.test.trivial; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestMethodEmptyParameter.java b/test/mycompiler/test/trivial/TestMethodEmptyParameter.java index 275ce90f..e0503619 100755 --- a/test/mycompiler/test/trivial/TestMethodEmptyParameter.java +++ b/test/mycompiler/test/trivial/TestMethodEmptyParameter.java @@ -1,6 +1,6 @@ package mycompiler.test.trivial; -import mycompiler.mytype.RefType; +import de.dhbwstuttgart.syntaxtree.type.RefType; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/trivial/TestMethodEmptyParameterGenericExtends.java b/test/mycompiler/test/trivial/TestMethodEmptyParameterGenericExtends.java index a1b672dd..18d8c7a1 100755 --- a/test/mycompiler/test/trivial/TestMethodEmptyParameterGenericExtends.java +++ b/test/mycompiler/test/trivial/TestMethodEmptyParameterGenericExtends.java @@ -2,10 +2,10 @@ package mycompiler.test.trivial; import java.util.Vector; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; +import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import mycompiler.test.AbstractInferenceTest; import mycompiler.test.expectationTypes.ClassExpect; import mycompiler.test.expectationTypes.Expectation; diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java index 51aea795..3b7a9b5e 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java @@ -3,21 +3,22 @@ package mycompiler.test.unittest.typeReconstructionTest; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.SourceFile; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassBody; -import mycompiler.myclass.UsedId; import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; import mycompiler.mytypereconstruction.unify.FC_TTO; import org.apache.log4j.Logger; import org.apache.log4j.xml.DOMConfigurator; +import de.dhbwstuttgart.core.SourceFile; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ClassBody; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; + public class TrMakeFCTest extends TestCase{ /* makeFC() is not being tested according to unit test specs -> used objects cannot be mocked*/ diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java index ef386620..13f151ba 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java @@ -4,20 +4,8 @@ package mycompiler.test.unittest.typeReconstructionTest; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.SourceFile; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassBody; -import mycompiler.myclass.UsedId; import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Pair.PairOperator; import mycompiler.mytypereconstruction.unify.FC_TTO; import mycompiler.mytypereconstruction.unify.Unify; @@ -27,6 +15,19 @@ import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; +import de.dhbwstuttgart.core.SourceFile; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ClassBody; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; + /*TODO: - mock makeFC and needs to be relocated (now called for every test) * - erase2 -> FreshWildcardType?? * - reduce2 wird niemals verwendet!!! <-> erase3 diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java index 88490fec..de3afa94 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java @@ -3,19 +3,8 @@ package mycompiler.test.unittest.typeReconstructionTest; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.SourceFile; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassBody; -import mycompiler.myclass.UsedId; import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.Pair; -import mycompiler.mytype.RefType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Pair.PairOperator; import mycompiler.mytypereconstruction.unify.FC_TTO; import mycompiler.mytypereconstruction.unify.Unify; @@ -24,6 +13,18 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; +import de.dhbwstuttgart.core.SourceFile; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ClassBody; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; + public class TrUnifyTest extends TestCase { FC_TTO fc=null; diff --git a/test/parser/GeneralParserTest.java b/test/parser/GeneralParserTest.java index 3349d324..7edd2fb8 100644 --- a/test/parser/GeneralParserTest.java +++ b/test/parser/GeneralParserTest.java @@ -11,11 +11,12 @@ import java.nio.file.Paths; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; import org.junit.Test; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; + /** * Dieser Test prüft nur, ob .java-Dateien fehlerfrei geparst werden. * Der dabei erstellte Syntaxbaum wird nicht kontrolliert. diff --git a/test/plugindevelopment/InsertSingleTypeTest.java b/test/plugindevelopment/InsertSingleTypeTest.java index 0a524771..ce73fefc 100644 --- a/test/plugindevelopment/InsertSingleTypeTest.java +++ b/test/plugindevelopment/InsertSingleTypeTest.java @@ -10,13 +10,13 @@ import java.util.Vector; import org.junit.Test; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.myparser.JavaParser.yyException; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; -import typinferenz.typedeployment.TypeInsertPoint; -import typinferenz.typedeployment.TypeInsertSet; public class InsertSingleTypeTest { private static final String testFile = "SingleTypeInsertTest.jav"; diff --git a/test/plugindevelopment/MartinTestCases/Tester.java b/test/plugindevelopment/MartinTestCases/Tester.java index ddea7b3b..cd5cbebb 100644 --- a/test/plugindevelopment/MartinTestCases/Tester.java +++ b/test/plugindevelopment/MartinTestCases/Tester.java @@ -6,14 +6,14 @@ import java.util.Vector; import org.junit.Test; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import plugindevelopment.TypeInsertTester; import plugindevelopment.TypeInsertTests.MultipleTypesInsertTester; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.myparser.JavaParser.yyException; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; -import typinferenz.typedeployment.TypeInsertSet; public class Tester extends TypeInsertTester{ diff --git a/test/plugindevelopment/TRMEqualTest.java b/test/plugindevelopment/TRMEqualTest.java index 888daf42..01fa8698 100644 --- a/test/plugindevelopment/TRMEqualTest.java +++ b/test/plugindevelopment/TRMEqualTest.java @@ -9,22 +9,22 @@ import java.util.Vector; import org.junit.Test; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; +import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.SyntaxTreeNode; -import mycompiler.myparser.JavaParser.yyException; -import mycompiler.mytype.Pair; -import mycompiler.mytype.Pair.PairOperator; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import typinferenz.ResultSet; -import typinferenz.TypeInsertable; -import typinferenz.typedeployment.TypeInsertPoint; -import typinferenz.typedeployment.TypeInsertSet; public class TRMEqualTest { Vector replaceSet = new Vector(); diff --git a/test/plugindevelopment/TypeInsertSetEqualTest.java b/test/plugindevelopment/TypeInsertSetEqualTest.java index 592a9f1e..ade51473 100644 --- a/test/plugindevelopment/TypeInsertSetEqualTest.java +++ b/test/plugindevelopment/TypeInsertSetEqualTest.java @@ -5,14 +5,14 @@ import java.io.IOException; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.myparser.JavaParser.yyException; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; -import typinferenz.typedeployment.TypeInsertSet; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; public class TypeInsertSetEqualTest { diff --git a/test/plugindevelopment/TypeInsertTester.java b/test/plugindevelopment/TypeInsertTester.java index f1129eac..a0e79f99 100644 --- a/test/plugindevelopment/TypeInsertTester.java +++ b/test/plugindevelopment/TypeInsertTester.java @@ -17,14 +17,14 @@ import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.apache.log4j.SimpleLayout; -import typinferenz.typedeployment.TypeInsertPoint; -import typinferenz.typedeployment.TypeInsertSet; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.myparser.JavaParser.yyException; import mycompiler.mytest.LambdaTest; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; public class TypeInsertTester{ diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest22.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest22.jav index 001e3d5b..0cdc36b1 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest22.jav +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest22.jav @@ -3,7 +3,7 @@ import java.util.Vector; class Matrix extends Vector> { Matrix mul(m){ - Vector> ret; + ret; ret = new Matrix(); i; i = 0; diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest22.java b/test/plugindevelopment/TypeInsertTests/LambdaTest22.java index 569bfb2f..bf97eeeb 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest22.java +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest22.java @@ -10,7 +10,7 @@ public class LambdaTest22 { @Test public void run(){ Vector mustContain = new Vector(); - mustContain.add("TestIfStmt var"); + mustContain.add("Matrix ret"); MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); } } diff --git a/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java b/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java index ca337c4b..64233edd 100644 --- a/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java +++ b/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java @@ -4,14 +4,14 @@ import java.io.File; import java.io.IOException; import java.util.Vector; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import plugindevelopment.TypeInsertTester; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.myparser.JavaParser.yyException; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; -import typinferenz.typedeployment.TypeInsertPoint; -import typinferenz.typedeployment.TypeInsertSet; public class MultipleTypesInsertTester extends TypeInsertTester{ diff --git a/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.java b/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.java index 77e3ea9d..18cb01a7 100644 --- a/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.java +++ b/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.java @@ -5,14 +5,14 @@ import java.io.IOException; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.myparser.JavaParser.yyException; -import mycompiler.mytypereconstruction.TypeinferenceResultSet; import org.junit.Test; -import typinferenz.typedeployment.TypeInsertSet; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; +import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; public class OverloadingInsertTest { private static final String TEST_FILE = "OverloadingInsertTest.jav"; diff --git a/test/syntaxTree/NodeEqualTest.java b/test/syntaxTree/NodeEqualTest.java index 312d4a36..daaaf534 100644 --- a/test/syntaxTree/NodeEqualTest.java +++ b/test/syntaxTree/NodeEqualTest.java @@ -4,14 +4,13 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; -import mycompiler.MyCompiler; -import mycompiler.MyCompilerAPI; -import mycompiler.SourceFile; -import mycompiler.SyntaxTreeNode; -import mycompiler.myparser.JavaParser.yyException; - import org.junit.Test; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.core.SourceFile; +import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import junit.framework.TestCase; public class NodeEqualTest extends TestCase{ From 585ca78de82ebaeea571d01fadd392a76dafee4d Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 2 Sep 2014 10:34:06 +0200 Subject: [PATCH 19/31] =?UTF-8?q?Tests=20angef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TypeInsertTests/LambdaTest23.jav | 14 ++++++++++++++ .../TypeInsertTests/LambdaTest23.java | 16 ++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest23.jav create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest23.java diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav new file mode 100644 index 00000000..1d4b28d8 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav @@ -0,0 +1,14 @@ +import java.util.Vector; + +class Matrix extends Vector> { + + Matrix mul(m){ + ret; + ret = new Matrix(); + i; + i = this.size(); + + return ret; + } + +} \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest23.java b/test/plugindevelopment/TypeInsertTests/LambdaTest23.java new file mode 100644 index 00000000..e406551f --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest23.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class LambdaTest23 { + private static final String TEST_FILE = "LambdaTest23.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + mustContain.add("Matrix ret"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} From 01c6a934edb79dbf03ff7df7ad4d17bc2ded1e0a Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 2 Sep 2014 11:07:16 +0200 Subject: [PATCH 20/31] Projekt umstrukturierung --- src/de/dhbwstuttgart/core/SourceFile.java | 4 ++-- src/de/dhbwstuttgart/syntaxtree/Class.java | 5 +++-- src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java | 3 +-- src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java | 3 +-- src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java | 3 +-- src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java | 3 +-- src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java | 3 +-- src/de/dhbwstuttgart/syntaxtree/operator/Operator.java | 3 +-- src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java | 3 +-- src/de/dhbwstuttgart/syntaxtree/statement/Assign.java | 3 ++- src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java | 3 ++- src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java | 2 +- src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java | 5 +++-- src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java | 3 ++- src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java | 5 +++-- src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java | 3 ++- src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java | 3 ++- src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java | 3 ++- src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java | 3 ++- src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java | 3 ++- src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java | 3 ++- src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java | 3 ++- .../dhbwstuttgart/typeinference}/unify/FC_TTO.java | 2 +- .../dhbwstuttgart/typeinference}/unify/MUB.java | 2 +- .../dhbwstuttgart/typeinference}/unify/Unify.java | 2 +- src/mycompiler/mytypereconstruction/CSupportData.java | 3 +-- .../test/unittest/typeReconstructionTest/TrMakeFCTest.java | 2 +- .../test/unittest/typeReconstructionTest/TrSubUnifyTest.java | 4 ++-- .../test/unittest/typeReconstructionTest/TrUnifyTest.java | 4 ++-- 29 files changed, 48 insertions(+), 43 deletions(-) rename src/{mycompiler/mytypereconstruction => de/dhbwstuttgart/typeinference}/unify/FC_TTO.java (96%) rename src/{mycompiler/mytypereconstruction => de/dhbwstuttgart/typeinference}/unify/MUB.java (95%) rename src/{mycompiler/mytypereconstruction => de/dhbwstuttgart/typeinference}/unify/Unify.java (99%) diff --git a/src/de/dhbwstuttgart/core/SourceFile.java b/src/de/dhbwstuttgart/core/SourceFile.java index 4ebc3d9c..ed48e266 100755 --- a/src/de/dhbwstuttgart/core/SourceFile.java +++ b/src/de/dhbwstuttgart/core/SourceFile.java @@ -24,8 +24,6 @@ import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.FC_TTO; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; @@ -60,6 +58,8 @@ import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.unify.FC_TTO; +import de.dhbwstuttgart.typeinference.unify.Unify; import mycompiler.myclass.*; import mycompiler.*; import sun.reflect.generics.reflectiveObjects.NotImplementedException; diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 82298463..fa85019e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -33,8 +33,6 @@ import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; -import mycompiler.mytypereconstruction.unify.FC_TTO; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -67,6 +65,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.AClassOrInterface; @@ -90,6 +89,8 @@ import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.unify.FC_TTO; +import de.dhbwstuttgart.typeinference.unify.Unify; import sun.reflect.generics.reflectiveObjects.NotImplementedException; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java index fcd93bc9..85d3b9b2 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java @@ -17,6 +17,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.unify.Unify; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.myexception.CTypeReconstructionException; @@ -26,8 +27,6 @@ import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.unify.Unify; -// ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java index 059b9435..f901f242 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java @@ -10,6 +10,7 @@ import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Null; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.typeinference.unify.Unify; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -20,8 +21,6 @@ import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.unify.Unify; -// ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java index 98f29871..5b019a08 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java @@ -20,6 +20,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.unify.Unify; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -30,8 +31,6 @@ import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.unify.Unify; -// ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java index 23fb3c3e..10a57ee7 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java @@ -14,14 +14,13 @@ import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.unify.Unify; import mycompiler.myexception.CTypeReconstructionException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.unify.Unify; -// ino.end // ino.class.MulOp.24231.declaration public abstract class MulOp extends Operator diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java index 9d566ba5..044e6fb1 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java @@ -10,6 +10,7 @@ import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Null; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.typeinference.unify.Unify; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -20,8 +21,6 @@ import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.unify.Unify; -// ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java index dde6d288..dc6a52a4 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java @@ -20,6 +20,7 @@ import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.unify.Unify; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.mybytecode.JVMCode; @@ -30,8 +31,6 @@ import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.unify.Unify; -// ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java index 7ea19033..9e984c2a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java @@ -14,6 +14,7 @@ import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.unify.Unify; import mycompiler.mybytecode.ClassFile; import mycompiler.mybytecode.CodeAttribute; import mycompiler.myexception.CTypeReconstructionException; @@ -23,8 +24,6 @@ import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.unify.Unify; -// ino.end // ino.class.RelOp.24299.declaration public abstract class RelOp extends Operator diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java index 2d8e125e..04c75d2a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java @@ -22,7 +22,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; @@ -35,6 +34,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -48,6 +48,7 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java index 89458d43..76a38c5d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java @@ -12,16 +12,17 @@ import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end + import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.unify.Unify; // ino.class.ExprStmt.25265.declaration public abstract class ExprStmt extends Statement implements ITypeReplacementListener diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java index 16c7de49..e8a752b2 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java @@ -19,7 +19,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; @@ -36,6 +35,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; import sun.reflect.generics.reflectiveObjects.NotImplementedException; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java index 8660dba0..f46f531e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java @@ -22,8 +22,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.MUB; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -38,6 +36,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.operator.LogOp; @@ -56,6 +55,8 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.MUB; +import de.dhbwstuttgart.typeinference.unify.Unify; import sun.reflect.generics.reflectiveObjects.NotImplementedException; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java index 86f93b4e..1082d3d9 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java @@ -20,7 +20,6 @@ import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import mycompiler.mytypereconstruction.typeassumptionkey.CInstVarKey; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -39,6 +38,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.misc.UsedId; @@ -56,6 +56,7 @@ import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.FieldAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java index 2e61c530..49b0d48b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java @@ -28,8 +28,6 @@ import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; -import mycompiler.mytypereconstruction.unify.FC_TTO; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -46,6 +44,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; @@ -68,6 +67,8 @@ import de.dhbwstuttgart.typeinference.Overloading; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.FC_TTO; +import de.dhbwstuttgart.typeinference.unify.Unify; import sun.reflect.generics.reflectiveObjects.NotImplementedException; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java index 0c43064a..a702fef3 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java @@ -18,7 +18,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -32,6 +31,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -43,6 +43,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java index b86208ce..ba45d57d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java @@ -17,7 +17,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -33,6 +32,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.BooleanType; @@ -46,6 +46,7 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.OderConstraint; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java index e8d7293e..352f1154 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java @@ -19,7 +19,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -33,6 +32,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -44,6 +44,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java index 2aed476d..30ba7ee9 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java @@ -19,7 +19,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -36,6 +35,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -50,6 +50,7 @@ import de.dhbwstuttgart.typeinference.OderConstraint; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java index bba29488..a95f6481 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java @@ -19,7 +19,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -33,6 +32,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -44,6 +44,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java index fdef9377..191216e9 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java @@ -19,7 +19,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -33,6 +32,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -44,6 +44,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java index 600e3fb2..2f5458b9 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java @@ -21,7 +21,6 @@ import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; // ino.end @@ -36,6 +35,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.operator.LogOp; @@ -51,6 +51,7 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.Unify; import sun.reflect.generics.reflectiveObjects.NotImplementedException; diff --git a/src/mycompiler/mytypereconstruction/unify/FC_TTO.java b/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java similarity index 96% rename from src/mycompiler/mytypereconstruction/unify/FC_TTO.java rename to src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java index 651f02d5..9bfd99b3 100755 --- a/src/mycompiler/mytypereconstruction/unify/FC_TTO.java +++ b/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java @@ -1,5 +1,5 @@ // ino.module.FC_TTO.8719.package -package mycompiler.mytypereconstruction.unify; +package de.dhbwstuttgart.typeinference.unify; // ino.end // ino.module.FC_TTO.8719.import diff --git a/src/mycompiler/mytypereconstruction/unify/MUB.java b/src/de/dhbwstuttgart/typeinference/unify/MUB.java similarity index 95% rename from src/mycompiler/mytypereconstruction/unify/MUB.java rename to src/de/dhbwstuttgart/typeinference/unify/MUB.java index c050b6d6..7fd2213f 100755 --- a/src/mycompiler/mytypereconstruction/unify/MUB.java +++ b/src/de/dhbwstuttgart/typeinference/unify/MUB.java @@ -1,5 +1,5 @@ // ino.module.MUB.8720.package -package mycompiler.mytypereconstruction.unify; +package de.dhbwstuttgart.typeinference.unify; // ino.end // ino.module.MUB.8720.import diff --git a/src/mycompiler/mytypereconstruction/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java similarity index 99% rename from src/mycompiler/mytypereconstruction/unify/Unify.java rename to src/de/dhbwstuttgart/typeinference/unify/Unify.java index 2be23e21..33bf9553 100755 --- a/src/mycompiler/mytypereconstruction/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -1,6 +1,6 @@ //otth/pluemicke2.1.jav funktioniert nicht xxx anschauen // ino.module.Unify.8721.package -package mycompiler.mytypereconstruction.unify; +package de.dhbwstuttgart.typeinference.unify; // ino.end // ino.module.Unify.8721.import import java.util.Enumeration; diff --git a/src/mycompiler/mytypereconstruction/CSupportData.java b/src/mycompiler/mytypereconstruction/CSupportData.java index 199f033a..7ddb28cc 100755 --- a/src/mycompiler/mytypereconstruction/CSupportData.java +++ b/src/mycompiler/mytypereconstruction/CSupportData.java @@ -8,8 +8,7 @@ import java.util.Vector; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import mycompiler.mytypereconstruction.unify.FC_TTO; -// ino.end +import de.dhbwstuttgart.typeinference.unify.FC_TTO; // ino.class.CSupportData.27076.description type=javadoc /** diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java index 3b7a9b5e..54f6a05b 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java @@ -5,7 +5,6 @@ import java.util.Vector; import junit.framework.TestCase; import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; -import mycompiler.mytypereconstruction.unify.FC_TTO; import org.apache.log4j.Logger; import org.apache.log4j.xml.DOMConfigurator; @@ -18,6 +17,7 @@ import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.unify.FC_TTO; public class TrMakeFCTest extends TestCase{ diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java index 13f151ba..c24539c1 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java @@ -6,8 +6,6 @@ import java.util.Vector; import junit.framework.TestCase; import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; -import mycompiler.mytypereconstruction.unify.FC_TTO; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.Logger; import org.apache.log4j.xml.DOMConfigurator; @@ -27,6 +25,8 @@ import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; +import de.dhbwstuttgart.typeinference.unify.FC_TTO; +import de.dhbwstuttgart.typeinference.unify.Unify; /*TODO: - mock makeFC and needs to be relocated (now called for every test) * - erase2 -> FreshWildcardType?? diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java index de3afa94..fc76f76d 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java @@ -5,8 +5,6 @@ import java.util.Vector; import junit.framework.TestCase; import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; -import mycompiler.mytypereconstruction.unify.FC_TTO; -import mycompiler.mytypereconstruction.unify.Unify; import org.apache.log4j.xml.DOMConfigurator; import org.junit.After; @@ -24,6 +22,8 @@ import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; +import de.dhbwstuttgart.typeinference.unify.FC_TTO; +import de.dhbwstuttgart.typeinference.unify.Unify; public class TrUnifyTest extends TestCase { From 37d33b7a31c0f40dbdc9c4e046fc40476edfcf5f Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 2 Sep 2014 18:49:19 +0200 Subject: [PATCH 21/31] JavaClassName implementiert --- bin/.gitignore | 5 +- .../dhbwstuttgart/core/AClassOrInterface.java | 4 +- src/de/dhbwstuttgart/core/MyCompiler.java | 18 +++++-- src/de/dhbwstuttgart/core/SourceFile.java | 43 ++++++++--------- src/de/dhbwstuttgart/syntaxtree/Class.java | 26 ++++++---- .../dhbwstuttgart/syntaxtree/ClassBody.java | 2 +- src/de/dhbwstuttgart/syntaxtree/Constant.java | 7 +-- .../dhbwstuttgart/syntaxtree/Constructor.java | 3 +- .../syntaxtree/FormalParameter.java | 2 +- src/de/dhbwstuttgart/syntaxtree/Method.java | 3 +- .../dhbwstuttgart/syntaxtree/misc/DeclId.java | 4 +- .../dhbwstuttgart/syntaxtree/misc/UsedId.java | 9 ++-- .../syntaxtree/statement/Assign.java | 12 +++-- .../syntaxtree/statement/CastExpr.java | 4 +- .../syntaxtree/statement/ExprStmt.java | 2 +- .../syntaxtree/statement/InstanceOf.java | 2 +- .../syntaxtree/statement/LocalOrFieldVar.java | 6 +-- .../syntaxtree/statement/LocalVarDecl.java | 10 ++-- .../syntaxtree/statement/MethodCall.java | 14 +++--- .../syntaxtree/statement/NewArray.java | 4 +- .../syntaxtree/statement/NewClass.java | 2 +- .../syntaxtree/statement/PostDecExpr.java | 4 +- .../syntaxtree/statement/PostIncExpr.java | 4 +- .../syntaxtree/statement/PreDecExpr.java | 4 +- .../syntaxtree/statement/PreIncExpr.java | 4 +- .../type/BoundedGenericTypeVar.java | 2 +- .../type/FreshExtendsWildcardType.java | 2 +- .../type/FreshSuperWildcardType.java | 2 +- .../syntaxtree/type/FreshWildcardType.java | 11 +++-- .../syntaxtree/type/GenericTypeVar.java | 16 ++++--- .../dhbwstuttgart/syntaxtree/type/Pair.java | 4 +- .../syntaxtree/type/RefType.java | 40 +++++++++------- .../syntaxtree/type/SuperWildcardType.java | 4 +- .../dhbwstuttgart/syntaxtree/type/Type.java | 19 ++++---- .../syntaxtree/type/TypePlaceholder.java | 17 +++---- src/de/dhbwstuttgart/typeinference/FunN.java | 5 +- .../assumptions/ClassAssumption.java | 2 +- .../assumptions/GenericVarAssumption.java | 2 +- .../assumptions/TypeAssumptions.java | 23 ++++----- .../parser/BoundedClassIdentifierList.java | 2 +- .../typeinference/parser/JavaClassName.java | 17 ++++--- .../typeinference/parser/JavaParser.java | 6 +-- .../typeinference/parser/JavaParser.jay | 2 +- .../typeinference/unify/Unify.java | 47 ++++++++++--------- .../mytypereconstruction/CSubstitution.java | 2 +- 45 files changed, 227 insertions(+), 196 deletions(-) diff --git a/bin/.gitignore b/bin/.gitignore index 8fbf1745..79da6df7 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,8 +1,7 @@ -/mycompiler -/userinterface +/bytecode /de /myJvmDisassembler -/bytecode +/mycompiler /parser /plugindevelopment /syntaxTree diff --git a/src/de/dhbwstuttgart/core/AClassOrInterface.java b/src/de/dhbwstuttgart/core/AClassOrInterface.java index 12a44d43..39249e67 100755 --- a/src/de/dhbwstuttgart/core/AClassOrInterface.java +++ b/src/de/dhbwstuttgart/core/AClassOrInterface.java @@ -13,7 +13,9 @@ import org.apache.log4j.Logger; // ino.end + import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; // ino.class.AClassOrInterface.21186.description type=javadoc /** @@ -30,7 +32,7 @@ public interface AClassOrInterface // ino.class.AClassOrInterface.21186.body { - public String getName(); + public JavaClassName getName(); public Vector getSuperInterfaces(); public void setSuperInterfaces(Vector vector); diff --git a/src/de/dhbwstuttgart/core/MyCompiler.java b/src/de/dhbwstuttgart/core/MyCompiler.java index 50002f16..20e88501 100755 --- a/src/de/dhbwstuttgart/core/MyCompiler.java +++ b/src/de/dhbwstuttgart/core/MyCompiler.java @@ -174,7 +174,7 @@ public class MyCompiler implements MyCompilerAPI // Klasse existiert, darf aber keine Parameterliste in der Definition haben if( KlassenVektor.elementAt(k).get_ParaList().size() == 0 ) { - RefType RNeu = new RefType( TempParameter.getName(), null,TempParameter.getOffset()); + RefType RNeu = new RefType( TempParameter.getName().toString(), null,TempParameter.getOffset()); inferencelog.debug( "Vorher: " + Parameter ); // i-te Stelle ersetzen Parameter.set( i, RNeu ); @@ -561,7 +561,7 @@ public class MyCompiler implements MyCompilerAPI * Generiert den Bytecode und das Class-File f�r den Syntaxbaum. * @throws NullPointerException Wenn noch kein abstrakter Syntaxbaum vorhanden * ist. - */ + @Override public Vector codeGeneration(ResultSet result) throws NullPointerException, JVMCodeException @@ -579,7 +579,8 @@ public class MyCompiler implements MyCompilerAPI codegenlog.info("Codegenerierung beendet!"); return ret; - } + }*/ + // ino.method.main.21313.defdescription type=javadoc /** @@ -668,7 +669,7 @@ public class MyCompiler implements MyCompilerAPI for(int j=0;j codeGeneration(ResultSet result) + throws NullPointerException, JVMCodeException { + // TODO Auto-generated method stub + return null; + } } // ino.end diff --git a/src/de/dhbwstuttgart/core/SourceFile.java b/src/de/dhbwstuttgart/core/SourceFile.java index ed48e266..61170af1 100755 --- a/src/de/dhbwstuttgart/core/SourceFile.java +++ b/src/de/dhbwstuttgart/core/SourceFile.java @@ -58,6 +58,7 @@ import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.unify.FC_TTO; import de.dhbwstuttgart.typeinference.unify.Unify; import mycompiler.myclass.*; @@ -231,7 +232,7 @@ public class SourceFile * Startet die Bytecodegenerierung fuer alle in der Datei * enthaltenen Klassen und Interfaces. * - */ + // ino.end // ino.method.codegen.21397.definition public Vector codegen(ResultSet result) @@ -254,7 +255,7 @@ public class SourceFile return ret; } // ino.end - + */ // ino.method.createPairFromClassAndSuperclass.21400.defdescription type=javadoc /** * Erstellt ein Typ-Paar, welches im 1. Durchlauf in die Menge der Finite Closure @@ -264,7 +265,7 @@ public class SourceFile */ // ino.end // ino.method.createPairFromClassAndSuperclass.21400.definition - private Pair createPairFromClassAndSuperclass(String className, String superclassName, Vector classParaOrg, Vector superclassParaOrg) + private Pair createPairFromClassAndSuperclass(JavaClassName className, JavaClassName superclassName, Vector classParaOrg, Vector superclassParaOrg) // ino.end // ino.method.createPairFromClassAndSuperclass.21400.body { @@ -276,15 +277,15 @@ public class SourceFile superclassParaOrg=null; } Pair P = new Pair( - new RefType( className, classParaOrg,-1), - new RefType( superclassName, superclassParaOrg,-1) + new RefType( className.toString(), classParaOrg,-1), + new RefType( superclassName.toString(), superclassParaOrg,-1) ); //PL 04-12-29 freshe Variablen ANFANG RefType r1 = (RefType)P.getTA1Copy(); RefType r2 = (RefType)P.getTA2Copy(); // #JB# 05.04.2005 // ########################################################### - Hashtable substHash = new Hashtable(); //fuer jedes Paar komplett neue Variablen + Hashtable substHash = new Hashtable(); //fuer jedes Paar komplett neue Variablen Unify.varSubst(r1, substHash); Unify.varSubst(r2, substHash); // ########################################################### @@ -330,7 +331,7 @@ public class SourceFile Iterator interfaceIterator=tempKlasse.getSuperInterfaces().iterator(); while(interfaceIterator.hasNext()){ UsedId intf=interfaceIterator.next(); - String interfaceName=intf.getQualifiedName(); + JavaClassName interfaceName=intf.getQualifiedName(); Pair P=createPairFromClassAndSuperclass(tempKlasse.getName(),interfaceName,tempKlasse.get_ParaList(),intf.get_ParaList()); vFC.add( P ); @@ -343,7 +344,7 @@ public class SourceFile Iterator interfaceIterator=intf.getSuperInterfaces().iterator(); while(interfaceIterator.hasNext()){ UsedId superintf=interfaceIterator.next(); - String superinterfaceName=superintf.getQualifiedName(); + JavaClassName superinterfaceName=superintf.getQualifiedName(); Pair P=createPairFromClassAndSuperclass(intf.getName(),superinterfaceName,intf.getParaList(), superintf.get_ParaList()); vFC.add( P ); @@ -456,7 +457,7 @@ public class SourceFile //es werden alle Parameter in einem Typeterm, der //der Argumente hat ersetzt PL 04-12-28 - Hashtable hts = new Hashtable(); + Hashtable hts = new Hashtable(); //for(int u = nSubstStelle; u < vPara.size(); u++) { for(int u = 0; u < vPara.size(); u++) { try { @@ -467,7 +468,7 @@ public class SourceFile // ########################################################### inferencelog.debug("Typterm_Name: " + vPara.elementAt(u)); inferencelog.debug("Typterm_Name: " + ((Type)vPara.elementAt(u)).Type2String()); - hts.put(((RefType)PSuchen.TA1).getParaN(u), vPara.elementAt(u)); + hts.put(new JavaClassName(((RefType)PSuchen.TA1).getParaN(u)), vPara.elementAt(u)); } catch( Exception E ) { inferencelog.error(E.getMessage()); @@ -532,7 +533,7 @@ public class SourceFile RefType RSuch = (RefType)PSuch.TA1; //if( R.getName().equals(RSuch.getName()) ) - if (R.is_Equiv(RSuch, new Hashtable())) //eingefuegt PL 05-01-07 + if (R.is_Equiv(RSuch, new Hashtable())) //eingefuegt PL 05-01-07 { // Paar einfuegen, falls noch nicht vorhanden RefType L1 = (RefType)PTemp.getTA1Copy(); @@ -543,10 +544,10 @@ public class SourceFile //zunaechst Variablen disjunkt machen ANFANG // #JB# 05.04.2005 // ########################################################### - Hashtable substHash1 = new Hashtable(); + Hashtable substHash1 = new Hashtable(); Unify.varSubst(L1, substHash1); Unify.varSubst(L2, substHash1); - Hashtable substHash2 = new Hashtable(); + Hashtable substHash2 = new Hashtable(); Unify.varSubst(R1, substHash2); Unify.varSubst(R2, substHash2); // ########################################################### @@ -557,9 +558,9 @@ public class SourceFile // #JB# 05.04.2005 // ########################################################### - Hashtable h = new Hashtable(); + Hashtable h = new Hashtable(); L2.Equiv2Equal(R1, h); - Hashtable substHash3 = h; + Hashtable substHash3 = h; Unify.varSubst(L1, substHash3); Unify.varSubst(R2, substHash3); // ########################################################### @@ -689,7 +690,7 @@ public class SourceFile } xConstraints.add(cons); } - //typinferenzLog.debug("Karthesisches Produkt der Constraints: "+xConstraints); + typinferenzLog.debug("Karthesisches Produkt der Constraints: "+xConstraints); ////////////////////////////// // Unifizierung der Constraints: @@ -958,7 +959,7 @@ public class SourceFile // Properties laden java.lang.Class x; try { - x = java.lang.Class.forName(importDecl.getQualifiedName()); + x = java.lang.Class.forName(importDecl.getQualifiedName().toString()); } catch (ClassNotFoundException e) { throw new CTypeReconstructionException("Fehlerhafte Import-Declaration: "+e.getMessage(),importDecl); } @@ -1050,7 +1051,7 @@ public class SourceFile for(int k=0;k())); + method.addParaAssumption(new CParaTypeAssumption(className, methodName, pt.length,0,type.getName().toString(), type, MyCompiler.NO_LINENUMBER,MyCompiler.NO_LINENUMBER,new Vector())); } //basicAssumptions.addMethodIntersectionType(new CIntersectionType(method)); //ret.add(method); //auskommentiert von Andreas Stadelmeier @@ -1107,7 +1108,7 @@ public class SourceFile // Properties laden java.lang.Class x; try { - x = java.lang.Class.forName(importDecl.getQualifiedName()); + x = java.lang.Class.forName(importDecl.getQualifiedName().toString()); } catch (ClassNotFoundException e) { throw new CTypeReconstructionException("Fehlerhafte Import-Declaration: "+e.getMessage(),importDecl); } @@ -1269,7 +1270,7 @@ public class SourceFile boolean found = false; for(UsedId id : searchVector) { - String s = id.getQualifiedName(); + String s = id.getQualifiedName().toString(); found |= s.equals(searchString); } return found; @@ -1283,7 +1284,7 @@ public class SourceFile { if(type instanceof TypeVariableImpl){ TypeVariableImpl tvi=((TypeVariableImpl)type); - return(new GenericTypeVar(jreSpiderRegistry.get(tvi.getName()).getName(),-1)); + return(new GenericTypeVar(jreSpiderRegistry.get(tvi.getName()).getName().toString(),-1)); }else{ //String jccNameForClass=baseTypeTranslationTable.get(cl.getSimpleName()); String jccNameForClass=baseTypeTranslationTable.get(cl.getName()); diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index fa85019e..2dba6720 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -65,6 +65,8 @@ import org.apache.log4j.Logger; + + @@ -88,6 +90,7 @@ import de.dhbwstuttgart.typeinference.assumptions.ClassAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.unify.FC_TTO; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -119,9 +122,9 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit { this.pkgName = pkgName; } - public String getName() + public JavaClassName getName() { - return name; + return new JavaClassName((this.pkgName!=null ? this.pkgName.toString() +"." : "") +this.name); } public void setName(String strName) { @@ -333,7 +336,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit * @param typeinferenceResult - Das ResultSet einer Typinferierung oder null, falls alle Typen eindeutig feststehen. * @return * @throws JVMCodeException - */ + // ino.method.codegen.23071.definition public ClassFile codegen(ResultSet typeinferenceResult) throws JVMCodeException @@ -359,7 +362,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit //geändert von Andreas Stadelmeier: pkgName wird nicht mehr aus dem SourceFile ausgelesen: String packageName = ""; if(pkgName != null) packageName = pkgName.get_Name_1Element(); - classfile.add_class(getName(), packageName, superClass, getAccessFlags()); + classfile.add_class(getName(), superClass, getAccessFlags()); // Handling fuer Superinterfaces classfile.addSuperInterfaces(getSuperInterfaces()); @@ -383,7 +386,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit codegenlog.info("Compilierung erfolgreich abgeschlossen, "+ getName() + ".class erstellt."); return classfile; } - + */ public void codegen(ClassFile classfile, Vector paralist) throws JVMCodeException { @@ -459,7 +462,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit // ino.method.get_Superclass_Name.23086.definition - public String get_Superclass_Name() + public JavaClassName get_Superclass_Name() // ino.end // ino.method.get_Superclass_Name.23086.body { @@ -663,6 +666,8 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit // Und los geht's: ////////////////////////////// inferencelog.info("Rufe TRStart()..."); + + typinferenzLog.debug("Erstellte FiniteClosure: "+supportData); ////////////////////////////// // Ab hier ... // @author A10023 - Andreas Stadelmeier: @@ -939,7 +944,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit * @param me * @param V * @return - */ + // ino.end // ino.method.RetType.23119.definition private Type RetType(Method me, CTypeAssumptionSet V) @@ -954,6 +959,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } // ino.end + */ // ino.method.toString.23125.defdescription type=javadoc /** *
Author: Martin Pl�micke @@ -1167,7 +1173,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit // ino.end // ino.method.getSimpleName.23140.body { - return UsedId.createFromQualifiedName(getName(),-1).getSimpleName(); + return UsedId.createFromQualifiedName(getName().toString(),-1).getSimpleName(); } // ino.end @@ -1289,7 +1295,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit parameter.add(((GenericTypeVar)param).getTypePlaceHolder());//(TypePlaceholder.fresh()); //Hier ist kein ReplacementListener notwendig. Der Typ soll nie eingesetzt werden. Der TPH wird nur gebraucht, damit das Unifizieren funktioniert. } */ - return new RefType(this.getName(), this.get_ParaList(), 0); + return new RefType(this.getName().toString(), this.get_ParaList(), 0); } @@ -1342,7 +1348,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } } if(!constructorVorhanden){//Falls kein Konstruktor vorhanden ist, muss noch der Standardkonstruktor angefügt werden: - Constructor standardKonstruktor = new Constructor(Method.createEmptyMethod(this.getName(), this)); + Constructor standardKonstruktor = new Constructor(Method.createEmptyMethod(this.getName().toString(), this)); this.addField(standardKonstruktor); } diff --git a/src/de/dhbwstuttgart/syntaxtree/ClassBody.java b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java index 230b0c35..b987bae4 100755 --- a/src/de/dhbwstuttgart/syntaxtree/ClassBody.java +++ b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java @@ -162,7 +162,7 @@ throws SCClassBodyException SCExcept e = new SCExcept(); e.set_error("unbekannte Klasse "+t.getName()+"."); e.set_function("complete_parahashtable() --> is_declared()"); - e.set_statement(t.getName()); + e.set_statement(t.getName().toString()); ex.addException(e); throw ex; } diff --git a/src/de/dhbwstuttgart/syntaxtree/Constant.java b/src/de/dhbwstuttgart/syntaxtree/Constant.java index e58511975..e07c75b3 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Constant.java +++ b/src/de/dhbwstuttgart/syntaxtree/Constant.java @@ -12,6 +12,7 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import sun.reflect.generics.reflectiveObjects.NotImplementedException; import mycompiler.mybytecode.AttributeInfo; import mycompiler.mybytecode.ClassFile; @@ -118,11 +119,11 @@ public class Constant extends Method // ino.end // ino.method.getTypeName.23243.definition - public String getTypeName() + public JavaClassName getTypeName() // ino.end // ino.method.getTypeName.23243.body { - return name; + return new JavaClassName(name); } // ino.end @@ -169,7 +170,7 @@ public class Constant extends Method { // Zugehoerigen Typ (I, Z, C, Ljava/lang/String;) fuer den Typ ermitteln - String bcgType = JVMCode.get_codegen_Type(typ.getName(), paralist); + String bcgType = JVMCode.get_codegen_Type(typ.getName().toString(), paralist); if (getValue() == null || !(getValue() instanceof Literal) ) { throw new JVMCodeException("Die Generierung der Konstante wird nicht unterstuetzt!"); diff --git a/src/de/dhbwstuttgart/syntaxtree/Constructor.java b/src/de/dhbwstuttgart/syntaxtree/Constructor.java index ac50a5a3..2c27a254 100644 --- a/src/de/dhbwstuttgart/syntaxtree/Constructor.java +++ b/src/de/dhbwstuttgart/syntaxtree/Constructor.java @@ -16,6 +16,7 @@ import de.dhbwstuttgart.typeinference.assumptions.ConstructorAssumption; import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import mycompiler.mybytecode.ClassFile; import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; @@ -57,7 +58,7 @@ public class Constructor extends Method { } @Override - public String getTypeName() { + public JavaClassName getTypeName() { return this.getType().getName(); } diff --git a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java index 856aa3b4..72b31651 100755 --- a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java +++ b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java @@ -142,7 +142,7 @@ public class FormalParameter extends SyntaxTreeNode implements ITypeReplacementL // ino.end // ino.method.getTypeName.23416.body { if(this.getType() == null)return ""; - return this.getType().getName(); + return this.getType().getName().toString(); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/Method.java b/src/de/dhbwstuttgart/syntaxtree/Method.java index 2001a1fa..dc45aef2 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Method.java +++ b/src/de/dhbwstuttgart/syntaxtree/Method.java @@ -42,6 +42,7 @@ import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; @@ -173,7 +174,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable // ino.end // ino.method.getTypeName.23533.definition - public String getTypeName() + public JavaClassName getTypeName() // ino.end // ino.method.getTypeName.23533.body { diff --git a/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java index c597d297..b11e6ddc 100755 --- a/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java @@ -212,7 +212,7 @@ public class DeclId if (type instanceof RefType) codegen_type = ((RefType)type).get_codegen_Type(null); else - codegen_type = JVMCode.get_codegen_Type(type.getName(), paralist); + codegen_type = JVMCode.get_codegen_Type(type.getName().toString(), paralist); // Instanzvariable genenerieren @@ -223,7 +223,7 @@ public class DeclId if(wert instanceof Expr) { classfile.add_field_ref(name, null, codegen_type); Assign assign = new Assign(getOffset(),name.length()); - assign.set_Expr(new InstVar(name, type.getName(),getOffset()), (Expr)wert); + assign.set_Expr(new InstVar(name, type.getName().toString(),getOffset()), (Expr)wert); classfile.add_classblock_Element(assign); } else throw new JVMCodeException("Wertzuweisung der Instanzvariable kann nicht uebersetzt werden!"); diff --git a/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java index c8322674..2ad399ea 100755 --- a/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java @@ -10,6 +10,7 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import mycompiler.mybytecode.JVMCode; @@ -182,7 +183,7 @@ public class UsedId implements IItemWithOffset // ino.end // ino.method.getSignatureUsedId.23717.body { - String basis = JVMCode.get_codegen_Type(getQualifiedName(),null); + String basis = JVMCode.get_codegen_Type(getQualifiedName().toString(),null); if (paralist == null || paralist.size() ==0) return basis; @@ -241,7 +242,7 @@ public class UsedId implements IItemWithOffset // ino.end // ino.method.getQualifiedName.23726.definition - public String getQualifiedName() + public JavaClassName getQualifiedName() // ino.end // ino.method.getQualifiedName.23726.body { @@ -253,7 +254,7 @@ public class UsedId implements IItemWithOffset sb.append("."); } } - return(sb.toString()); + return new JavaClassName(sb.toString()); } // ino.end @@ -312,7 +313,7 @@ public class UsedId implements IItemWithOffset public JavaCodeResult printJavaCode(ResultSet resultSet) { if(this.name.size()>1)throw new TypeinferenceException("Es kann maximal nur eine Superklasse pro Klasse geben", this); - JavaCodeResult ret = new JavaCodeResult(this.getQualifiedName()); + JavaCodeResult ret = new JavaCodeResult(this.getQualifiedName().toString()); if(this.paralist != null){ ret.attach( "<" ); Iterator it = this.paralist.iterator(); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java index 04c75d2a..4907a623 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java @@ -35,6 +35,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -48,6 +49,7 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -138,13 +140,13 @@ public class Assign extends Expr // LocalVar try { - String local_type = code.get_TypeOf_Var(local_name).getName(); - code.add_code(JVMCode.nload_n(local_type, index)); + JavaClassName local_type = code.get_TypeOf_Var(local_name).getName(); + code.add_code(JVMCode.nload_n(local_type.toString(), index)); } catch(JVMCodeException e) { // out of nload_n - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload(local_type)); code.add_code_byte((byte)index); } @@ -166,13 +168,13 @@ public class Assign extends Expr // LocalVar try { - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nstore_n(local_type, index)); } catch(JVMCodeException e) { // out of nstore_n - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nstore(local_type)); code.add_code_byte((byte)index); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java index 75c25007..25b18c21 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java @@ -111,7 +111,7 @@ public class CastExpr extends UnaryExpr // ino.end // ino.method.codegen.25154.body { - int itype = JVMCode.get_nType(type.getName()); + int itype = JVMCode.get_nType(type.getName().toString()); int iexpr = JVMCode.get_nType(expr.getTypeName()); if(itype != iexpr) { @@ -122,7 +122,7 @@ public class CastExpr extends UnaryExpr else { expr.set_Type(type); - code.add_code(JVMCode.n2n(expr.getTypeName(), type.getName())); + code.add_code(JVMCode.n2n(expr.getTypeName(), type.getName().toString())); } } else if(itype == 4) expr.set_Type(type); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java index 76a38c5d..3788e586 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java @@ -52,7 +52,7 @@ public abstract class ExprStmt extends Statement implements ITypeReplacementList // ino.method.getTypeName.25279.body { if (getType()!=null) - return getType().getName(); + return getType().getName().toString(); else return null; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java index a3a29ef3..4e7bc907 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java @@ -113,7 +113,7 @@ public class InstanceOf extends BinaryExpr { expr.codegen(classfile, code, paralist); code.add_code(JVMCode.instanceof_); - code.add_code_short(classfile.add_CONSTANT_Class_info(reftype.getName())); + code.add_code_short(classfile.add_CONSTANT_Class_info(reftype.getName().toString())); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java index ece05e0a..c117d65e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java @@ -133,13 +133,13 @@ public class LocalOrFieldVar extends Expr // LocalVar try { - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload_n(local_type, index)); } catch(JVMCodeException e) { // out of nstore_n - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload(local_type)); code.add_code_byte((byte)index); } @@ -162,7 +162,7 @@ public class LocalOrFieldVar extends Expr RefType rt = (RefType) this.getType(); if (! rt.getPrimitiveFlag()) return; - if (rt.getName().equalsIgnoreCase("java.lang.Integer")) { // Int Unboxen + if (rt.getName().toString().equalsIgnoreCase("java.lang.Integer")) { // Int Unboxen code.add_code(JVMCode.invokevirtual); code.add_code_short(classfile.add_method_ref("java/lang/Integer", "intValue", "()I")); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java index d69fa85e..76b0df25 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java @@ -174,7 +174,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable SCExcept e = new SCExcept(); e.set_error("unbekannte Klasse "+t.getName()+"."); e.set_function("complete_parahashtable() --> is_declared()"); - e.set_statement(t.getName()); + e.set_statement(t.getName().toString()); ex.addException(e); throw ex; } @@ -224,7 +224,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable SCExcept e = new SCExcept(); e.set_error("Klasse "+c.getName()+" ist falsch parametrisiert!"); e.set_function("complete_parahashtable() --> check_anz()"); - e.set_statement(type.getName()); + e.set_statement(type.getName().toString()); ex.addException(e); throw ex; } @@ -234,7 +234,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable SCExcept e = new SCExcept(); e.set_error("Klasse "+c.getName()+" ist nicht parametrisierbar!"); e.set_function("complete_parahashtable() --> check_anz()"); - e.set_statement(type.getName()); + e.set_statement(type.getName().toString()); ex.addException(e); throw ex; } @@ -245,7 +245,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable SCExcept e = new SCExcept(); e.set_error("Klasse "+c.getName()+" �berhaupt garnicht parametrisiert!"); e.set_function("complete_parahashtable() --> check_anz()"); - e.set_statement(type.getName()); + e.set_statement(type.getName().toString()); ex.addException(e); throw ex; @@ -266,7 +266,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable e.set_error("Type " + type.getName()+ " falsche Parameter-Anzahl " + ((RefType)type).get_ParaList().size()); } e.set_function("complete_parahashtable() --> check_anz()"); - e.set_statement(type.getName()); + e.set_statement(type.getName().toString()); ex.addException(e); throw ex; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java index 49b0d48b..45753b42 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java @@ -45,6 +45,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; @@ -67,6 +68,7 @@ import de.dhbwstuttgart.typeinference.Overloading; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.unify.FC_TTO; import de.dhbwstuttgart.typeinference.unify.Unify; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -290,13 +292,13 @@ public class MethodCall extends Expr if (index != -1 ) { // Lokale Variable try { - String local_type = code.get_TypeOf_Var(local_name) + JavaClassName local_type = code.get_TypeOf_Var(local_name) .getName(); - code.add_code(JVMCode.nload_n(local_type, index)); + code.add_code(JVMCode.nload_n(local_type.toString(), index)); } catch (JVMCodeException e) { // out of nload_n - String local_type = code.get_TypeOf_Var(local_name) + JavaClassName local_type = code.get_TypeOf_Var(local_name) .getName(); - code.add_code(JVMCode.nload(local_type)); + code.add_code(JVMCode.nload(local_type.toString())); code.add_code_byte((byte) index); } } else { // FieldVariable @@ -417,11 +419,11 @@ public class MethodCall extends Expr // Typannahme f�r Methode heraussuchen: // -------------------------- - String className; + String className; if(classType instanceof RefType){ className=((RefType)classType).getTypeName(); }else{ - className=classType.getName(); + className=classType.getName().toString(); } CMethodKey key = new CMethodKey( diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java index eb25c781..9bd35ec0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java @@ -137,10 +137,10 @@ public class NewArray extends Expr // ino.end // ino.method.codegen.25818.body { - if(JVMCode.get_nType(this.getType().getName()) == 4) { + if(JVMCode.get_nType(this.getType().getName().toString()) == 4) { for(int i = 0; i < expr.size(); i++) ((Expr)expr.elementAt(i)).codegen(classfile, code, paralist); code.add_code(JVMCode.anewarray); - code.add_code_short(classfile.add_CONSTANT_Class_info(this.getType().getName())); + code.add_code_short(classfile.add_CONSTANT_Class_info(this.getType().getName().toString())); } else { for(int i = 0; i < expr.size(); i++) ((Expr)expr.elementAt(i)).codegen(classfile, code, paralist); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java index c5bbc717..722392ff 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java @@ -128,7 +128,7 @@ public class NewClass extends Expr for(Enumeration el = classname.elements(); el.hasMoreElements();) { cl = el.nextElement(); - next = (String)cl.getName(); + next = (String)cl.getName().toString(); if(ext) parserlog.debug("Vergleiche "+usedid+" mit "+next); if(usedid.equals(next)) diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java index 352f1154..91b1cd27 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java @@ -115,11 +115,11 @@ public class PostDecExpr extends UnaryExpr index = code.get_indexOf_Var(local_name); if(index != -1) { // LocalVar try{ - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload_n(local_type, index)); } catch(JVMCodeException e) { // out of nload_n - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload(local_type)); code.add_code_byte((byte)index); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java index 30ba7ee9..d373a178 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java @@ -122,11 +122,11 @@ public class PostIncExpr extends UnaryExpr index = code.get_indexOf_Var(local_name); if(index != -1) { // LocalVar try{ - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload_n(local_type, index)); } catch(JVMCodeException e) { // out of nload_n - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload(local_type)); code.add_code_byte((byte)index); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java index a95f6481..91575ae0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java @@ -115,11 +115,11 @@ public class PreDecExpr extends UnaryExpr index = code.get_indexOf_Var(local_name); if(index != -1) { // LocalVar try{ - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload_n(local_type, index)); } catch(JVMCodeException e) { // out of nload_n - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload(local_type)); code.add_code_byte((byte)index); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java index 191216e9..7e0bd640 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java @@ -116,11 +116,11 @@ public class PreIncExpr extends UnaryExpr index = code.get_indexOf_Var(local_name); if(index != -1) { // LocalVar try{ - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload_n(local_type, index)); } catch(JVMCodeException e) { // out of nload_n - String local_type = code.get_TypeOf_Var(local_name).getName(); + String local_type = code.get_TypeOf_Var(local_name).getName().toString(); code.add_code(JVMCode.nload(local_type)); code.add_code_byte((byte)index); } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java index 7d0f3308..d3674efe 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java @@ -111,7 +111,7 @@ public class BoundedGenericTypeVar extends GenericTypeVar // ino.end // ino.method.clone.26483.body { - return new BoundedGenericTypeVar(this.getName(), this.getBounds(), getOffset(), this.getEndOffset()); + return new BoundedGenericTypeVar(this.getName().toString(), this.getBounds(), getOffset(), this.getEndOffset()); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/FreshExtendsWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/FreshExtendsWildcardType.java index b79d6c72..2dec8d7b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/FreshExtendsWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FreshExtendsWildcardType.java @@ -44,7 +44,7 @@ public class FreshExtendsWildcardType extends FreshWildcardType implements IMatc */ public FreshExtendsWildcardType clone() { - return new FreshExtendsWildcardType(this.extendsBoundType.clone(),getOffset(),this.name); + return new FreshExtendsWildcardType(this.extendsBoundType.clone(),getOffset(),this.name.toString()); } /** diff --git a/src/de/dhbwstuttgart/syntaxtree/type/FreshSuperWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/FreshSuperWildcardType.java index a48cd03e..f8086c29 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/FreshSuperWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FreshSuperWildcardType.java @@ -44,7 +44,7 @@ public class FreshSuperWildcardType extends FreshWildcardType implements IMatcha */ public FreshSuperWildcardType clone() { - return new FreshSuperWildcardType(this.superBoundType.clone(),getOffset(),this.name); + return new FreshSuperWildcardType(this.superBoundType.clone(),getOffset(),this.name.toString()); } /** diff --git a/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java index cdbba367..fd24670e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java @@ -4,6 +4,7 @@ import java.util.Vector; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import sun.reflect.generics.reflectiveObjects.NotImplementedException; public class FreshWildcardType extends Type { @@ -29,7 +30,7 @@ public class FreshWildcardType extends Type { protected FreshWildcardType(int offset, String name) { super(offset); - this.name = name; + this.name = new JavaClassName(name); } /** @@ -60,7 +61,7 @@ public class FreshWildcardType extends Type { */ public FreshWildcardType clone() { - return new FreshWildcardType(getOffset(),this.name); + return new FreshWildcardType(getOffset(),this.name.toString()); } /** @@ -79,7 +80,7 @@ public class FreshWildcardType extends Type { * Erzeugt einen neuen Namen, und gibt diesen zurück * Methode aus TypePlaceholder kopiert */ - private static String makeNewName() + private static JavaClassName makeNewName() { // luar: Methode aus TypePlaceholder kopiert. String strReturn = strNextName; @@ -87,7 +88,7 @@ public class FreshWildcardType extends Type { // n�chster Name berechnen und in strNextName speichern inc( strNextName.length() - 1 ); - return strReturn; + return new JavaClassName(strReturn); } /** @@ -165,7 +166,7 @@ public class FreshWildcardType extends Type { } @Override -public JavaCodeResult printJavaCode(ResultSet resultSet) { + public JavaCodeResult printJavaCode(ResultSet resultSet) { throw new NotImplementedException(); } } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java index 7c6e47ab..6d2765e0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java @@ -23,12 +23,14 @@ import java.util.Vector; + import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; @@ -80,7 +82,7 @@ public class GenericTypeVar extends Type // ino.method.GenericTypeVar.26509.body { super(offset); - this.name = s; + this.name = new JavaClassName(s); } // ino.end @@ -100,7 +102,7 @@ public class GenericTypeVar extends Type // ino.end // ino.method.clone.26512.body { - return new GenericTypeVar(this.getName(),getOffset()); + return new GenericTypeVar(this.getName().toString(),getOffset()); } // ino.end @@ -182,12 +184,12 @@ public class GenericTypeVar extends Type return ret; } */ - return new JavaCodeResult(this.name); + return new JavaCodeResult(this.name.toString()); } public TypePlaceholder getTypePlaceHolder() { if(!GenericTypeVar.tph.containsKey(this)){ - GenericTypeVar.tph.put(this, TypePlaceholder.fresh(this.getName())); + GenericTypeVar.tph.put(this, TypePlaceholder.fresh(this.getName().toString())); } return GenericTypeVar.tph.get(this); //if(this.tph == null)this.tph = TypePlaceholder.fresh(); @@ -196,11 +198,11 @@ public class GenericTypeVar extends Type @Override public String get_Name() { - return this.getName(); + return this.getName().toString(); } @Override - public String getName() { + public JavaClassName getName() { return this.name; } @@ -221,7 +223,7 @@ public class GenericTypeVar extends Type } public int getEndOffset() { - return this.getOffset() + this.name.length(); + return this.getOffset() + this.name.toString().length(); } } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Pair.java b/src/de/dhbwstuttgart/syntaxtree/type/Pair.java index 5e14f3d5..7ba5056c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Pair.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Pair.java @@ -6,6 +6,8 @@ import java.util.Hashtable; import java.util.Vector; // ino.end +import de.dhbwstuttgart.typeinference.parser.JavaClassName; + @@ -249,7 +251,7 @@ public class Pair // ino.method.Pair_isEquiv.26582.body { //vergleicht Paare mit Reftype's, bis auf Variablenumbennung - Hashtable ht = new Hashtable(); + Hashtable ht = new Hashtable(); //System.out.println((((RefType)TA1).is_Equiv((RefType)p.TA1, ht))); //System.out.println(((RefType)TA2).is_Equiv((RefType)p.TA2, ht)); diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index 5c70c5fe..66ae481c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -29,6 +29,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.typeinference.JavaCodeResult; @@ -36,6 +37,7 @@ import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -134,7 +136,7 @@ public class RefType extends Type implements IMatchable */ public RefType( Type baseType ){ super(baseType.getOffset()); - this.setName(baseType.name); + this.setName(baseType.name.toString()); //this.parameter = null; } @@ -145,7 +147,7 @@ public class RefType extends Type implements IMatchable { if(parameter==null) { - return name; + return name.toString(); } else { @@ -169,7 +171,7 @@ public class RefType extends Type implements IMatchable { if(parameter==null) { - return name; + return name.toString(); } else { @@ -276,20 +278,24 @@ public class RefType extends Type implements IMatchable // ino.end // ino.method.setName.26655.body { - this.name = name; + this.name = new JavaClassName(name); } // ino.end + public void setName( JavaClassName name ){ + this.name = name; + } + @Override public String get_Name() { - return getName(); + return getName().toString(); } // ino.method.getName.26658.definition - public String getName() + public JavaClassName getName() // ino.end // ino.method.getName.26658.body { @@ -335,8 +341,8 @@ public class RefType extends Type implements IMatchable else paralist.add(t); }*/ this.parameter = v;//paralist; - parserlog.debug("T->Type.java->set_ParaList->parameter: " + parameter); - parserlog.debug("T->Type.java->get_Type: " + getName()); + //parserlog.debug("T->Type.java->set_ParaList->parameter: " + parameter); + //parserlog.debug("T->Type.java->get_Type: " + getName()); } // ino.end @@ -364,7 +370,7 @@ public class RefType extends Type implements IMatchable // ino.method.getTypeName.26670.body { // otth: Liefert den Namen des Typs, ohne Parameter, z.B. Stapel bei Stapel - return name; + return name.toString(); } // ino.end @@ -383,7 +389,7 @@ public class RefType extends Type implements IMatchable if( n >= parameter.size() ) return ""; - return ((Type)parameter.elementAt(n)).getName(); + return ((Type)parameter.elementAt(n)).getName().toString(); } // ino.end @@ -402,7 +408,7 @@ public class RefType extends Type implements IMatchable // GenericTypeVar ergaenzt PL 06-03-16 // ino.end // ino.method.is_Equiv.26679.definition - public boolean is_Equiv(RefType ty2, Hashtable ht) + public boolean is_Equiv(RefType ty2, Hashtable ht) // ino.end // ino.method.is_Equiv.26679.body { @@ -469,7 +475,7 @@ public class RefType extends Type implements IMatchable // ino.end // ino.method.Equiv2Equal.26682.definition - public boolean Equiv2Equal(RefType ty2, Hashtable ht) + public boolean Equiv2Equal(RefType ty2, Hashtable ht) // ino.end // ino.method.Equiv2Equal.26682.body { @@ -499,7 +505,7 @@ public class RefType extends Type implements IMatchable else { //Typvariablen gleich machen // #JB# 11.04.2005 // ########################################################### - ((TypePlaceholder)pty2).backdoorSetName(((TypePlaceholder)ht.get((((TypePlaceholder)pty1).getName()))).getName()); + ((TypePlaceholder)pty2).backdoorSetName(((TypePlaceholder)ht.get((((TypePlaceholder)pty1).getName()))).getName().toString()); //pty2.setName(((TypePlaceholder)ht.get((((TypePlaceholder)pty1).getName()))).getName()); // ########################################################### } @@ -511,7 +517,7 @@ public class RefType extends Type implements IMatchable ht.put(pty1.getName(), pty2); // #JB# 11.04.2005 // ########################################################### - ((TypePlaceholder)pty2).backdoorSetName(pty1.getName()); + ((TypePlaceholder)pty2).backdoorSetName(pty1.getName().toString()); //pty2.setName(pty1.getName()); // ########################################################### } @@ -631,7 +637,7 @@ public class RefType extends Type implements IMatchable para = para +", "+ t; else para = " " + t; } - String ret = name; + String ret = name.toString(); if(parameter.size()>0)ret += "<"+para + " >"; return ret + primitiveFlagMarker;//name + "<"+para + " >" +primitiveFlagMarker; } @@ -643,7 +649,7 @@ public class RefType extends Type implements IMatchable // ino.end // ino.method.modifyToGenericTypeVar.26694.body { - return new GenericTypeVar(this.name,getOffset()); + return new GenericTypeVar(this.name.toString(),getOffset()); } // ino.end @@ -742,7 +748,7 @@ public class RefType extends Type implements IMatchable @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { - JavaCodeResult ret = new JavaCodeResult(this.name); + JavaCodeResult ret = new JavaCodeResult(this.name.toString()); if(this.get_ParaList()!=null && this.get_ParaList().size()>0){ ret .attach( "<" ); Iterator it = this.get_ParaList().iterator(); diff --git a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java index 3c7d6bcc..6a4e9d90 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java @@ -42,6 +42,7 @@ public class SuperWildcardType extends WildcardType implements ITypeContainer, I */ public String toString() { + System.out.println("!"); return "? super " + superType.toString(); } @@ -52,7 +53,6 @@ public class SuperWildcardType extends WildcardType implements ITypeContainer, I */ public SuperWildcardType clone() { - //Hier ist unklar, ob der Supertyp auch geklont werden muss. return new SuperWildcardType(getOffset(), superType.clone()); } @@ -126,7 +126,7 @@ public class SuperWildcardType extends WildcardType implements ITypeContainer, I @Override public JavaCodeResult printJavaCode(ResultSet result){ - return new JavaCodeResult(this.toString()); + return new JavaCodeResult("? super " + this.superType.printJavaCode(resultSet)); } } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Type.java b/src/de/dhbwstuttgart/syntaxtree/type/Type.java index 6d0d73c5..7b2ec3ea 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Type.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Type.java @@ -12,6 +12,7 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import mycompiler.mybytecode.JVMCode; @@ -23,7 +24,7 @@ public class Type implements IItemWithOffset // ino.class.Type.26716.body { // ino.attribute.name.26720.declaration - protected String name; + protected JavaClassName name; // ino.end // ino.attribute.used.26723.declaration protected UsedId used; @@ -38,7 +39,7 @@ public class Type implements IItemWithOffset // ino.method.Type.26729.body { this(offset); - this.name = s; + this.name = new JavaClassName(s); } // ino.end @@ -69,7 +70,7 @@ public class Type implements IItemWithOffset // ino.end // ino.method.getVariableLength.26738.body { - if(this.name!=null){return this.name.length();} + if(this.name!=null){return this.name.toString().length();} else{return 1;} } // ino.end @@ -116,7 +117,7 @@ public class Type implements IItemWithOffset // ino.end // ino.method.get_codegen_Type.26750.body { - return JVMCode.get_codegen_Type(name, paralist); + return JVMCode.get_codegen_Type(name.toString(), paralist); } // ino.end @@ -154,7 +155,7 @@ public class Type implements IItemWithOffset // ino.end // ino.method.getName.26762.definition - public String getName() + public JavaClassName getName() // ino.end // ino.method.getName.26762.body { @@ -195,7 +196,7 @@ public class Type implements IItemWithOffset // ino.end // ino.method.clone.26768.body { - return new Type(this.getName(),getOffset()); + return new Type(this.getName().toString(),getOffset()); } // ino.end @@ -210,7 +211,7 @@ public class Type implements IItemWithOffset // ino.end // ino.method.toString.26771.body { - return getName(); + return getName().toString(); } // ino.end @@ -243,12 +244,12 @@ public class Type implements IItemWithOffset // ino.end // ino.method.getSimpleName.26777.body { - return UsedId.createFromQualifiedName(getName(),getOffset()).getSimpleName(); + return UsedId.createFromQualifiedName(getName().toString(),getOffset()).getSimpleName(); } // ino.end public JavaCodeResult printJavaCode(ResultSet resultSet){ - return new JavaCodeResult(this.name); + return new JavaCodeResult(this.name.toString()); } /** diff --git a/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java b/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java index e4d79441..d861b5ba 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java @@ -12,6 +12,7 @@ import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -38,7 +39,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider private static String strNextName = "A"; // ino.end // ino.attribute.m_TypePlaceholdersRegistry.26788.declaration - private static Hashtable m_TypePlaceholdersRegistry = new Hashtable(); + private static Hashtable m_TypePlaceholdersRegistry = new Hashtable(); // ino.end // ino.attribute.m_ReplacementListeners.26791.declaration @@ -59,7 +60,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider // ino.method.TypePlaceholder.26794.body { super(-1); - this.name = typeName; + this.name = new JavaClassName(typeName); m_ReplacementListeners = new Vector(); } // ino.end @@ -114,7 +115,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider TypePlaceholder typeVar = new TypePlaceholder(name); TypePlaceholder oldTPH = m_TypePlaceholdersRegistry.put(typeVar.getName(), typeVar); if(oldTPH != null){ - oldTPH.name = makeNewName(); + oldTPH.name = new JavaClassName(makeNewName()); m_TypePlaceholdersRegistry.put(oldTPH.getName(), oldTPH); } return typeVar; @@ -398,7 +399,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider // ino.method.deleteRegistry.26839.body { m_TypePlaceholdersRegistry.clear(); - m_TypePlaceholdersRegistry = new Hashtable(); + m_TypePlaceholdersRegistry = new Hashtable(); } // ino.end @@ -419,7 +420,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider // ino.end // ino.method.clone.26842.body { - TypePlaceholder dolly = new TypePlaceholder(name); + TypePlaceholder dolly = new TypePlaceholder(name.toString()); dolly.m_ReplacementListeners = (Vector)m_ReplacementListeners.clone(); return dolly; } @@ -431,7 +432,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider */ @Override public String get_Name(){ - return getName(); + return getName().toString(); } // ino.method.toString.26845.definition @@ -492,7 +493,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider // ino.end // ino.method.backdoorSetName.26851.body { - name = varName; + name = new JavaClassName(varName); } // ino.end @@ -532,7 +533,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider Type equalType = resultSet.getTypeEqualTo(this); if(equalType == null || equalType.equals(this)){ //Für den Fall das der TPH nicht aufgelöst werden konnte. - JavaCodeResult ret = new JavaCodeResult(this.getName()); + JavaCodeResult ret = new JavaCodeResult(this.getName().toString()); //Jetzt muss eine nicht aufgelöste generische Variable dem JavaCodeResult-Set angefügt werden ret.addUnresolvedTPH(this); return ret; diff --git a/src/de/dhbwstuttgart/typeinference/FunN.java b/src/de/dhbwstuttgart/typeinference/FunN.java index ea1616b6..bf1ae84b 100755 --- a/src/de/dhbwstuttgart/typeinference/FunN.java +++ b/src/de/dhbwstuttgart/typeinference/FunN.java @@ -12,6 +12,7 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; @@ -43,7 +44,7 @@ public class FunN extends RefType implements ITypeReplacementListener{ if(T==null || R == null)throw new NullPointerException(); setT(T); setR(R); - this.name = "Fun"+T.size();//getName(); + this.name = new JavaClassName("Fun"+T.size());//getName(); } /** @@ -62,7 +63,7 @@ public class FunN extends RefType implements ITypeReplacementListener{ setR(TypePlaceholder.fresh(this)); setT(t); - this.name = "Fun"+parameterCount; + this.name = new JavaClassName("Fun"+parameterCount); /* Vector t = new Vector(); for(int i=0;i methodAssumptions = new Vector(); @@ -62,7 +63,7 @@ public class TypeAssumptions { //this.thisClassName = klassenname; } - public TypeAssumptions(String thisClassName){ + public TypeAssumptions(JavaClassName thisClassName){ this(); this.thisClassName = thisClassName; } @@ -188,7 +189,7 @@ public class TypeAssumptions { * @param parameterCount * @return */ - public Vector getMethodAssumptions(String className, String methodName){ + public Vector getMethodAssumptions(JavaClassName className, String methodName){ Vector ret = new Vector(); for(FieldAssumption ass : this.getAssumptionsFor(className)){ //System.out.println(ass.getIdentifier()); @@ -203,7 +204,7 @@ public class TypeAssumptions { * @param className * @return */ - private Vector getAssumptionsFor(String className) { + private Vector getAssumptionsFor(JavaClassName className) { Vector ret = new Vector(); for(Assumption a : this.getAllAssumptions()){ if(a instanceof FieldAssumption){ @@ -299,19 +300,11 @@ public class TypeAssumptions { return t; //Handelt es sich um einen TypePlaceholder kann dieser nicht in den Assumptions vorkommen. //Alle bekannten Klassen nach diesem Typ durchsuchen: - String typName = t.getName(); - String[] names = typName.split("[.]"); + JavaClassName typName = t.getName(); for(ClassAssumption ass : this.classAssumptions){ - String name = ass.getAssumedClass().getName(); //Das kann auch java.util.Vector sein - String[] assNames = name.split("[.]"); + JavaClassName name = ass.getAssumedClass().getName(); //Das kann auch java.util.Vector sein boolean match = true; - if(names.length == 1){ - match = names[0].equals(assNames[assNames.length-1]); - }else if(names.length == 0 || names.length != assNames.length){ - match = false; - }else for(int i = names.length-1; i>-1;i--){ - if(!names[i].equals(assNames[i]))match = false; - } + match = name.equals(typName); if(match && t instanceof RefType){ RefType tr = (RefType)t; RefType ret = ass.getAssumedClass().getType(); //Dadurch erhält der RefType den vollen Namen (bsp. java.lang.Integer) diff --git a/src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java b/src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java index 1dcdb4d0..f3713403 100644 --- a/src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java +++ b/src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java @@ -20,6 +20,6 @@ public class BoundedClassIdentifierList extends Vector{ } public void addOffsetOff(RefType refType) { - this.endOffset = refType.getOffset() + refType.getName().length(); + this.endOffset = refType.getOffset() + refType.getName().toString().length(); } } diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java b/src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java index 12c41520..0cfd41ab 100644 --- a/src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java +++ b/src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java @@ -20,7 +20,7 @@ public class JavaClassName { String[] names = name.split("[.]"); boolean match = true; if(names.length == 1){ - packageName = new PackageName(); + //packageName = new PackageName(); this.name = name; }else { name = names[names.length-1]; @@ -39,8 +39,8 @@ public class JavaClassName { final int prime = 31; int result = 1; result = prime * result + ((name == null) ? 0 : name.hashCode()); - result = prime * result - + ((packageName == null) ? 0 : packageName.hashCode()); + //result = prime * result + // + ((packageName == null) ? 0 : packageName.hashCode()); //PackageName does not infect hashCode return result; } @@ -63,17 +63,16 @@ public class JavaClassName { return false; } else if (!name.equals(other.name)) return false; - if (packageName == null) { - if (other.packageName != null) - return false; - } else if (!packageName.equals(other.packageName)) - return false; + if (packageName != null && other.packageName != null) { + if (!packageName.equals(other.packageName)) + return false;//Spezialfall, nicht beide Typen müssen eindeutig mit Packagenamen angegeben werden + } return true; } @Override public String toString() { - return packageName.toString() + name; + return (packageName!=null ? packageName.toString() : "") + name; } } diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java index 8b944a83..3ca8b8a6 100644 --- a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java +++ b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java @@ -1643,7 +1643,7 @@ case 111: Vector vec=new Vector(); vec.addElement(((RefType)yyVals[0+yyTop])); containedTypes.addElement(((RefType)yyVals[0+yyTop])); - yyVal=new BoundedClassIdentifierList(vec, ((RefType)yyVals[0+yyTop]).getOffset()+((RefType)yyVals[0+yyTop]).getName().length()); + yyVal=new BoundedClassIdentifierList(vec, ((RefType)yyVals[0+yyTop]).getOffset()+((RefType)yyVals[0+yyTop]).getName().toString().length()); } break; case 112: @@ -2023,7 +2023,7 @@ case 155: RefType RT = new RefType(uid.getOffset()); RT.set_ParaList(uid.get_RealParaList()); - RT.setName(uid.getQualifiedName()); + RT.setName(uid.getQualifiedName().toString()); /*PL 05-07-30 eingefuegt containedTypes ANFANG*/ @@ -2043,7 +2043,7 @@ case 156: /*RT.set_UsedId($1); */ /*RT.setName(RT.get_UsedId().get_Name_1Element());*/ RT.set_ParaList(((UsedId)yyVals[0+yyTop]).get_RealParaList()); - RT.setName(((UsedId)yyVals[0+yyTop]).getQualifiedName()); + RT.setName(((UsedId)yyVals[0+yyTop]).getQualifiedName().toString()); /*PL 05-07-30 eingefuegt containedTypes ANFANG*/ diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay index 851e8e65..764a4dd0 100755 --- a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay +++ b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay @@ -1071,7 +1071,7 @@ boundedclassidentifierlist : referencetype Vector vec=new Vector(); vec.addElement($1); containedTypes.addElement($1); - $$=new BoundedClassIdentifierList(vec, $1.getOffset()+$1.getName().length()); + $$=new BoundedClassIdentifierList(vec, $1.getOffset()+$1.getName().toString().length()); } | boundedclassidentifierlist '&' referencetype { diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index 33bf9553..c2319b00 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -32,6 +32,7 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.WildcardType; import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; +import de.dhbwstuttgart.typeinference.parser.JavaClassName; // ino.end @@ -370,7 +371,7 @@ public class Unify for(Vector pVec : unifyErgs) { // Das Ergebnis in die linke Seite von p_fc einsetzen, und dort Smaller anwenden. - Hashtable ht = VectorPair2SubstHashtableVectorPair(pVec); + Hashtable ht = VectorPair2SubstHashtableVectorPair(pVec); //PL 07-07-04 smallerArg wird auf die linke Seite von p_FC nach subst angewandt RefType p_fc_TA1_new = (RefType)p_fc.TA1.clone(); gtv2tv.applyThisSubstitutionSet(p_fc_TA1_new); //auf der linken Seite @@ -488,7 +489,7 @@ public class Unify for(Vector pVec : unifyErgs) //unifyErgs enthaelt nur einen Unifier STIMMT NIRHT MEHR!!! { //Das Ergebnis in die linke Seite von p_fc einsetzen, und dort Smaller anwenden. - Hashtable ht = VectorPair2SubstHashtableVectorPair(pVec); + Hashtable ht = VectorPair2SubstHashtableVectorPair(pVec); //PL 07-07-04 smallerArg wird auf die linke Seite von p_FC nach subst angewandt RefType p_fc_TA1_new = (RefType)p_fc.TA1.clone(); gtv2tv.applyThisSubstitutionSet(p_fc_TA1_new); //auf der linken Seite @@ -642,7 +643,7 @@ public class Unify for(Vector pVec : unifyErgs) { // Das Ergebnis in die linke Seite von p_fc einsetzen, und dort Smaller anwenden. - Hashtable ht = VectorPair2SubstHashtableVectorPair(pVec); + Hashtable ht = VectorPair2SubstHashtableVectorPair(pVec); //PL 07-07-04 smallerArg wird auf die linke Seite von p_FC nach subst angewandt RefType p_fc_TA1_new = (RefType)p_fc.TA1.clone(); gtv2tv.applyThisSubstitutionSet(p_fc_TA1_new); //auf der linken Seite @@ -996,7 +997,7 @@ public class Unify for (int i = 0; i < gr1.size(); i++) { //gemeinsame obere Schranken suchen for (int j = 0; j < gr2.size(); j++){ - if (gr1.elementAt(i).is_Equiv(gr2.elementAt(j), new Hashtable())) { + if (gr1.elementAt(i).is_Equiv(gr2.elementAt(j), new Hashtable())) { ub.addElement(gr1.elementAt(i)); break; } @@ -1056,7 +1057,7 @@ public class Unify // ino.end // ino.method.match.28064.definition -public static Hashtable match(RefType FCtype, RefType tomatch, Hashtable ht) +public static Hashtable match(RefType FCtype, RefType tomatch, Hashtable ht) throws MatchException // ino.end // ino.method.match.28064.body @@ -1650,7 +1651,7 @@ throws MatchException */ private static void adapt(Vector H, Pair PFC, RefType TA1, RefType TA2,FC_TTO fc_tto) { - Hashtable ht = new Hashtable(); + Hashtable ht = new Hashtable(); RefType TA1neu = (RefType)Pair.copyType((RefType)PFC.TA2); inferencelog.debug("TA1neu " + TA1neu.Type2String()); try @@ -1677,7 +1678,7 @@ throws MatchException */ private static void adaptExt(Vector H, Pair PFC, RefType TA1, RefType TA2, FC_TTO fc_tto) { - Hashtable ht = new Hashtable(); + Hashtable ht = new Hashtable(); RefType TA1neu = (RefType)Pair.copyType((RefType)PFC.TA2); inferencelog.debug("TA1neu " + TA1neu.Type2String()); try @@ -1704,7 +1705,7 @@ throws MatchException */ private static void adaptSup(Vector H, Pair PFC, RefType TA1, RefType TA2, FC_TTO fc_tto) { - Hashtable ht = new Hashtable(); + Hashtable ht = new Hashtable(); RefType TA1neu = (RefType)Pair.copyType((RefType)PFC.TA2); inferencelog.debug("TA1neu " + TA1neu.Type2String()); try @@ -1729,10 +1730,10 @@ throws MatchException /* luar 03-05-2007 * Diese Methode ersetzt alle Typen in der Hashtable durch deren CaptureConversion */ - private static Hashtable CaptureConversionHashtable(Hashtable ht, FC_TTO fc_tto) + private static Hashtable CaptureConversionHashtable(Hashtable ht, FC_TTO fc_tto) { - Hashtable retHT = new Hashtable(); - for(String s : ht.keySet()) + Hashtable retHT = new Hashtable(); + for(JavaClassName s : ht.keySet()) { Type t = ht.get(s); Type ccT = CaptureConversion(t,fc_tto); @@ -1854,14 +1855,14 @@ throws MatchException // ino.end // ino.method.VectorPair2SubstHashtableVectorPair.28079.definition - public static Hashtable VectorPair2SubstHashtableVectorPair (Vector v) + public static Hashtable VectorPair2SubstHashtableVectorPair (Vector v) // ino.end // ino.method.VectorPair2SubstHashtableVectorPair.28079.body { //PL 05-01-23 wandelt einen Vector von Paaren (a, ty) von Substitutionen //in eine Hashtable um. - Hashtable ret = new Hashtable(); + Hashtable ret = new Hashtable(); for(Enumeration e=v.elements();e.hasMoreElements();) { Pair p = e.nextElement(); ret.put(p.TA1.getName(), p.TA2); @@ -1921,7 +1922,7 @@ throws MatchException Hashtable testht = new Hashtable(); for (int i=0; i < FC.size(); i++) { // try { - Hashtable ht = new Hashtable(); + Hashtable ht = new Hashtable(); //HIER MOEGLICHERWEISE sub_unify MIT true IN DEN PAAREN AUFRUFEN //BEI INSTANZIERTEN TYPEN WEREDN KEINE SUBTYPEN GEBILDET //VERGLEICHE pl1.1.1.3.jav @@ -2004,7 +2005,7 @@ throws MatchException inferencelog.debug("New allSmaller " + ty.Type2String()); //doppelte untere Typen von Paaren eleminieren - Hashtable hht = new Hashtable(); + Hashtable hht = new Hashtable(); for (int i=0; i < FC.size(); i++) { if (hht.put(((RefType)(FC.elementAt(i).TA1)).getName(), (RefType)(FC.elementAt(i).TA1)) != null) { } @@ -2036,7 +2037,7 @@ throws MatchException if (P != null) { //System.out.println("ISIN"); RefType smaller = (RefType)Pair.copyType(P.TA1); - Hashtable ht = new Hashtable(); + Hashtable ht = new Hashtable(); try { match((RefType)P.TA2, ty, ht); //Problem koennte sein, dass ein TypePlaceholder mehrere Typterme @@ -2090,7 +2091,7 @@ throws MatchException if (testreftype == null) { inferencelog.debug("ISIN" + ty.Type2String() + P.toString()+" "+(FC.elementAt(i)).toString()); RefType greater = (RefType)Pair.copyType(P.TA2); - Hashtable ht = new Hashtable(); + Hashtable ht = new Hashtable(); try { //Hier muessen GTV durch TLV ersetzt werden. //vgl. searchAndHandleMethod in MethodCall.java @@ -2232,7 +2233,7 @@ throws MatchException // otth: Prueft ob TV in RefType vorkommt, falls ja --> true // Name der Typvariablen - String strTV = TV.getName(); + JavaClassName strTV = TV.getName(); // Parameterliste extrahieren if( RT.get_ParaList() == null ) @@ -2362,7 +2363,7 @@ throws MatchException // ht enthaelt Elemente der (String, Type) // ino.end // ino.method.SubstHashtableGeneric.28109.definition - public static void SubstHashtableGeneric(RefType typterm, Hashtable ht) + public static void SubstHashtableGeneric(RefType typterm, Hashtable ht) // ino.end // ino.method.SubstHashtableGeneric.28109.body { @@ -2389,7 +2390,7 @@ throws MatchException // ht enthaelt Elemente der (String, Type) // ino.end // ino.method.SubstHashtable.28112.definition - public static void SubstHashtable(RefType typterm, Hashtable ht) + public static void SubstHashtable(RefType typterm, Hashtable ht) // ino.end // ino.method.SubstHashtable.28112.body { @@ -2702,7 +2703,7 @@ tempKlasse.get_Superclass_Name() ); System.out.println( "P. S.: // sie durch die selbe Variable ersetzt. // ino.end // ino.method.varSubst.28130.definition - public static void varSubst(RefType typterm, Hashtable ht) + public static void varSubst(RefType typterm, Hashtable ht) // ino.end // ino.method.varSubst.28130.body { @@ -3090,7 +3091,7 @@ tempKlasse.get_Superclass_Name() ); System.out.println( "P. S.: * Für Jeden Typ aus greater1 durch die FC laufen, und auf der Linken seite einen Match versuchen. * Wenn das Funktioniert, dann ist der Typ auf der rechten Seite auch greater. * */ - Hashtable ht = new Hashtable(); + Hashtable ht = new Hashtable(); for(Type t : greater1Erg) { for(Pair p : fc_tto.getFC()) @@ -3294,7 +3295,7 @@ tempKlasse.get_Superclass_Name() ); System.out.println( "P. S.: * Für Jeden Typ aus Smaller12 durch die FC laufen, und auf der Rechten seite einen Match versuchen. * Wenn das Funktioniert, dann ist der Typ auf der linken Seite auch smaller. * */ - Hashtable ht = new Hashtable(); + Hashtable ht = new Hashtable(); for(Type t : smaller12Erg) { for(Pair p : fc_tto.getFC()) diff --git a/src/mycompiler/mytypereconstruction/CSubstitution.java b/src/mycompiler/mytypereconstruction/CSubstitution.java index 13586222..c5a749e8 100755 --- a/src/mycompiler/mytypereconstruction/CSubstitution.java +++ b/src/mycompiler/mytypereconstruction/CSubstitution.java @@ -191,7 +191,7 @@ public class CSubstitution // ino.end // ino.method.execute.27045.body { - TypePlaceholder uniqueVar = TypePlaceholder.getInstance(m_TypeVar.getName()); + TypePlaceholder uniqueVar = TypePlaceholder.getInstance(m_TypeVar.getName().toString()); if(uniqueVar==null){ throw new CTypeReconstructionException("CSubstitution.execute(): TypePlaceholder \""+m_TypeVar.getName()+"\" wurde nicht in der Registry gefunden!",null); } From 3232201843a8de1332490032f4c55c4a47af1894 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 2 Sep 2014 18:55:54 +0200 Subject: [PATCH 22/31] Fehler in WildcardType.printJavaCode behoben --- .../syntaxtree/type/ExtendsWildcardType.java | 9 +++++++++ .../dhbwstuttgart/syntaxtree/type/SuperWildcardType.java | 2 +- src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java | 6 +----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java index 9ef46ec7..b409a8d6 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java @@ -1,5 +1,8 @@ package de.dhbwstuttgart.syntaxtree.type; +import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.ResultSet; + /** * Stellt eine Wildcard mit oberer Grenze dar. @@ -121,4 +124,10 @@ public class ExtendsWildcardType extends WildcardType implements ITypeContainer, { return this.get_ExtendsType(); } + + @Override + public JavaCodeResult printJavaCode(ResultSet resultSet) { + return new JavaCodeResult("? extends "+this.extendsType.printJavaCode(resultSet)); + } + } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java index 6a4e9d90..9e7eacf9 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java @@ -126,7 +126,7 @@ public class SuperWildcardType extends WildcardType implements ITypeContainer, I @Override public JavaCodeResult printJavaCode(ResultSet result){ - return new JavaCodeResult("? super " + this.superType.printJavaCode(resultSet)); + return new JavaCodeResult("? super " + this.superType.printJavaCode(result)); } } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java index b3dd66d6..6d653a33 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java @@ -89,10 +89,6 @@ public class WildcardType extends Type{ @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { - //String ret = "? extends "; - //ret+=this.extendsType; - //TODO hier wird statt "? extends class" nur "class" ausgegeben - return new JavaCodeResult(this.toString()); - + throw new NotImplementedException(); } } From 3d88fb479b3fcfee0f0fb12f69e8786396f76c85 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Wed, 3 Sep 2014 10:42:12 +0200 Subject: [PATCH 23/31] Testfile angepasst --- src/de/dhbwstuttgart/core/SourceFile.java | 2 +- src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java | 1 - test/plugindevelopment/TypeInsertTests/LambdaTest23.jav | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/de/dhbwstuttgart/core/SourceFile.java b/src/de/dhbwstuttgart/core/SourceFile.java index 61170af1..84116c4a 100755 --- a/src/de/dhbwstuttgart/core/SourceFile.java +++ b/src/de/dhbwstuttgart/core/SourceFile.java @@ -1194,7 +1194,7 @@ public class SourceFile java.lang.reflect.Type genericReturnType=methods[j].getGenericReturnType(); Type returnType=createTypeFromJavaGenericType(genericReturnType,methods[j].getReturnType(),jreSpiderRegistry); - + java.lang.reflect.Type[] gpt=methods[j].getGenericParameterTypes(); java.lang.Class[] pt=methods[j].getParameterTypes(); diff --git a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java index 9e7eacf9..cae2538d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java @@ -42,7 +42,6 @@ public class SuperWildcardType extends WildcardType implements ITypeContainer, I */ public String toString() { - System.out.println("!"); return "? super " + superType.toString(); } diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav index 1d4b28d8..30ae2689 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav @@ -1,6 +1,6 @@ import java.util.Vector; -class Matrix extends Vector> { +class Matrix extends Vector> { Matrix mul(m){ ret; @@ -10,5 +10,4 @@ class Matrix extends Vector> { return ret; } - } \ No newline at end of file From 93a6070bd4801a959331f0e582ec6ed7817eeb98 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Wed, 3 Sep 2014 16:15:04 +0200 Subject: [PATCH 24/31] =?UTF-8?q?=C3=84nderungen=20an=20Testfiles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/de/dhbwstuttgart/core/MyCompiler.java | 8 ++++---- src/de/dhbwstuttgart/core/SourceFile.java | 6 +++++- src/de/dhbwstuttgart/syntaxtree/Class.java | 3 --- src/de/dhbwstuttgart/syntaxtree/type/Type.java | 5 +++-- .../typeinference/unify/FC_TTO.java | 8 ++++++++ .../typeinference/unify/Unify.java | 2 +- .../TypeInsertTests/LambdaTest23.jav | 15 +++++++-------- .../TypeInsertTests/Matrix.java | 2 +- .../TypeInsertTests/OperatorTest.jav | 5 +++++ .../TypeInsertTests/OperatorTest.java | 18 ++++++++++++++++++ 10 files changed, 52 insertions(+), 20 deletions(-) create mode 100644 test/plugindevelopment/TypeInsertTests/OperatorTest.jav create mode 100644 test/plugindevelopment/TypeInsertTests/OperatorTest.java diff --git a/src/de/dhbwstuttgart/core/MyCompiler.java b/src/de/dhbwstuttgart/core/MyCompiler.java index 20e88501..1095a4b0 100755 --- a/src/de/dhbwstuttgart/core/MyCompiler.java +++ b/src/de/dhbwstuttgart/core/MyCompiler.java @@ -658,7 +658,7 @@ public class MyCompiler implements MyCompilerAPI return OutputDir; } // ino.end - +/* // ino.method.getFullyQualifiedNameFromClassname.21322.definition public static String getFullyQualifiedNameFromClassname(String typ, ImportDeclarations declarations) // ino.end @@ -677,7 +677,7 @@ public class MyCompiler implements MyCompilerAPI return ret; } // ino.end - + */ // ino.method.makeRefTypesFullyQualified.21325.defdescription type=javadoc /** * @author HOTI @@ -686,7 +686,7 @@ public class MyCompiler implements MyCompilerAPI * @param containedTypes Alle Typen, die die Klasse beinhaltet * @param name Alle Klassen, die es in den BasicAssumptions und im * AbstractSyntaxTree gibt @param declarations Alle Import-Declarations - */ + // ino.end // ino.method.makeRefTypesFullyQualified.21325.definition public static void makeRefTypesFullyQualified(Vector containedTypes, ImportDeclarations declarations) @@ -716,7 +716,7 @@ public class MyCompiler implements MyCompilerAPI } } // ino.end - + */ /** * @author Arne Lüdtke * Ersetzt alle GTVs durch TPHs mit gleichem Namen. Arbeitet Rekursiv. diff --git a/src/de/dhbwstuttgart/core/SourceFile.java b/src/de/dhbwstuttgart/core/SourceFile.java index 84116c4a..201e7ef1 100755 --- a/src/de/dhbwstuttgart/core/SourceFile.java +++ b/src/de/dhbwstuttgart/core/SourceFile.java @@ -690,7 +690,9 @@ public class SourceFile } xConstraints.add(cons); } - typinferenzLog.debug("Karthesisches Produkt der Constraints: "+xConstraints); + //typinferenzLog.debug("Karthesisches Produkt der Constraints: "+xConstraints); + + finiteClosure.generateFullyNamedTypes(globalAssumptions); ////////////////////////////// // Unifizierung der Constraints: @@ -735,6 +737,7 @@ public class SourceFile //Erst die Unifizierung erstellen: Vector constraintsClone = (Vector)constraints.clone(); + /* //Typen kontrollieren: for(Pair p : constraintsClone){ Type t = p.TA1; @@ -754,6 +757,7 @@ public class SourceFile if(!(replaceType == null))p.TA2 = replaceType; } } + */ Vector> unifyResult = Unify.unify(constraintsClone, finiteClosure); //Dann den Ergebnissen anfügen diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 2dba6720..2bc0e7ad 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -659,9 +659,6 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit // ino.end // ino.method.TRProg.23110.body { - /* - - */ ////////////////////////////// // Und los geht's: ////////////////////////////// diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Type.java b/src/de/dhbwstuttgart/syntaxtree/type/Type.java index 7b2ec3ea..6dc59014 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Type.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Type.java @@ -176,8 +176,9 @@ public class Type implements IItemWithOffset // ino.method.equals.26765.body { if(obj instanceof Type){ - String name2 = ((Type)obj).printJavaCode(new ResultSet()).toString(); - return printJavaCode(new ResultSet()).toString().equals(name2); + // String name2 = ((Type)obj).printJavaCode(new ResultSet()).toString(); + //return printJavaCode(new ResultSet()).toString().equals(name2); + return ((Type)obj).name.equals(name); } else{ return false; diff --git a/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java b/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java index 9bfd99b3..4adfb430 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java +++ b/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java @@ -7,6 +7,7 @@ import java.util.Vector; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; // ino.class.FC_TTO.28013.description type=javadoc /** @@ -70,5 +71,12 @@ public class FC_TTO public String toString(){ return "FC: "+getFC()+"\nTTO: "+getTTO()+"\nCLASSVEC: "+getClasses(); } + + public void generateFullyNamedTypes(TypeAssumptions ass) { + for(Pair p : this.FC){ + p.TA1 = ass.getTypeFor(p.TA1, null); + p.TA2 = ass.getTypeFor(p.TA2, null); + } + } } // ino.end diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index c2319b00..0e87ee83 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -1833,7 +1833,7 @@ throws MatchException // ino.end // ino.method.SubstHashtable2VectorPair.28076.definition - public static Vector SubstHashtable2VectorPair (Hashtable ht) + public static Vector SubstHashtable2VectorPair (Hashtable ht) // ino.end // ino.method.SubstHashtable2VectorPair.28076.body { diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav index 30ae2689..4bc270c4 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest23.jav @@ -1,13 +1,12 @@ import java.util.Vector; -class Matrix extends Vector> { +class Matrix extends Vector> { - Matrix mul(m){ - ret; - ret = new Matrix(); - i; - i = this.size(); - - return ret; + void mul(m){ + v1; + v1 = this.elementAt(1); + erg; + erg = v1.elementAt(1); } + } \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/Matrix.java b/test/plugindevelopment/TypeInsertTests/Matrix.java index 500f58d3..dbc9ed1c 100644 --- a/test/plugindevelopment/TypeInsertTests/Matrix.java +++ b/test/plugindevelopment/TypeInsertTests/Matrix.java @@ -11,6 +11,6 @@ public class Matrix { public void run(){ Vector mustContain = new Vector(); //mustContain.add("TestIfStmt var"); - MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + //MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); } } diff --git a/test/plugindevelopment/TypeInsertTests/OperatorTest.jav b/test/plugindevelopment/TypeInsertTests/OperatorTest.jav new file mode 100644 index 00000000..1f97f6da --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/OperatorTest.jav @@ -0,0 +1,5 @@ +class RelOpTest{ + i = 1 + 1; + j = 1 * 1; + k = 1 / 0; +} \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/OperatorTest.java b/test/plugindevelopment/TypeInsertTests/OperatorTest.java new file mode 100644 index 00000000..48d5c671 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/OperatorTest.java @@ -0,0 +1,18 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class OperatorTest { + private static final String TEST_FILE = "OperatorTest.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + mustContain.add("Integer i"); + mustContain.add("Integer j"); + mustContain.add("Integer k"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} From c90f1404ab8ab6b3800909efc85b366fe10857ed Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 4 Sep 2014 16:35:44 +0200 Subject: [PATCH 25/31] =?UTF-8?q?Gro=C3=9Fe=20Umstrukturierung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dhbwstuttgart/bytecode}/Attribute.java | 6 +- .../bytecode}/AttributeInfo.java | 5 +- .../bytecode}/CONSTANT_Class_info.java | 2 +- .../bytecode}/CONSTANT_Double_info.java | 2 +- .../bytecode}/CONSTANT_Fieldref_info.java | 2 +- .../bytecode}/CONSTANT_Float_info.java | 2 +- .../bytecode}/CONSTANT_Integer_info.java | 2 +- .../CONSTANT_InterfaceMethodref_info.java | 2 +- .../bytecode}/CONSTANT_Long_info.java | 2 +- .../bytecode}/CONSTANT_Methodref_info.java | 2 +- .../bytecode}/CONSTANT_NameAndType_info.java | 2 +- .../bytecode}/CONSTANT_String_info.java | 2 +- .../bytecode}/CONSTANT_Utf8_info.java | 2 +- .../dhbwstuttgart/bytecode}/CPInfo.java | 2 +- .../dhbwstuttgart/bytecode}/ClassFile.java | 12 +- .../bytecode}/ClassFileMember.java | 4 +- .../bytecode}/CodeAttribute.java | 4 +- .../bytecode}/ExceptionTable.java | 2 +- .../dhbwstuttgart/bytecode}/FieldInfo.java | 6 +- .../dhbwstuttgart/bytecode}/JVMCode.java | 6 +- .../dhbwstuttgart/bytecode}/Key.java | 2 +- .../dhbwstuttgart/bytecode}/MethodInfo.java | 6 +- .../bytecode}/SignatureInfo.java | 6 +- .../dhbwstuttgart/core/AClassOrInterface.java | 3 +- src/de/dhbwstuttgart/core/MyCompiler.java | 8 +- src/de/dhbwstuttgart/core/MyCompilerAPI.java | 7 +- .../CTypeReconstructionException.java | 2 +- .../myexception/JVMCodeException.java | 2 +- .../myexception/MatchException.java | 2 +- .../myexception/SCClassBodyException.java | 2 +- .../myexception/SCClassException.java | 2 +- .../dhbwstuttgart}/myexception/SCExcept.java | 2 +- .../myexception/SCException.java | 2 +- .../myexception/SCMethodException.java | 2 +- .../myexception/SCStatementException.java | 2 +- src/de/dhbwstuttgart/syntaxtree/Class.java | 3 + .../dhbwstuttgart/syntaxtree/ClassBody.java | 13 +- src/de/dhbwstuttgart/syntaxtree/Constant.java | 8 +- .../dhbwstuttgart/syntaxtree/Constructor.java | 5 +- src/de/dhbwstuttgart/syntaxtree/Field.java | 5 +- .../syntaxtree/FieldDeclaration.java | 5 +- .../syntaxtree/FormalParameter.java | 7 +- .../dhbwstuttgart/syntaxtree}/Interface.java | 18 +- .../syntaxtree}/InterfaceBody.java | 9 +- src/de/dhbwstuttgart/syntaxtree/Method.java | 9 +- .../syntaxtree/ParameterList.java | 4 +- .../{core => syntaxtree}/SourceFile.java | 46 +-- .../{core => syntaxtree}/SyntaxTreeNode.java | 4 +- .../dhbwstuttgart/syntaxtree/misc/DeclId.java | 14 +- .../dhbwstuttgart/syntaxtree/misc/UsedId.java | 2 +- .../syntaxtree/operator/AddOp.java | 8 +- .../syntaxtree/operator/DivideOp.java | 8 +- .../syntaxtree/operator/EqualOp.java | 10 +- .../syntaxtree/operator/GreaterEquOp.java | 8 +- .../syntaxtree/operator/GreaterOp.java | 8 +- .../syntaxtree/operator/LessEquOp.java | 8 +- .../syntaxtree/operator/LessOp.java | 8 +- .../syntaxtree/operator/LogOp.java | 10 +- .../syntaxtree/operator/MinusOp.java | 8 +- .../syntaxtree/operator/ModuloOp.java | 8 +- .../syntaxtree/operator/MulOp.java | 2 +- .../syntaxtree/operator/NotEqualOp.java | 10 +- .../syntaxtree/operator/Operator.java | 10 +- .../syntaxtree/operator/PlusOp.java | 8 +- .../syntaxtree/operator/RelOp.java | 8 +- .../syntaxtree/operator/TimesOp.java | 8 +- .../syntaxtree/statement/ArgumentList.java | 9 +- .../syntaxtree/statement/Assign.java | 19 +- .../syntaxtree/statement/Binary.java | 19 +- .../syntaxtree/statement/Block.java | 17 +- .../syntaxtree/statement/BoolLiteral.java | 15 +- .../syntaxtree/statement/CastExpr.java | 19 +- .../syntaxtree/statement/CharLiteral.java | 15 +- .../syntaxtree/statement/DoubleLiteral.java | 12 +- .../syntaxtree/statement/EmptyStmt.java | 13 +- .../syntaxtree/statement/Expr.java | 4 +- .../syntaxtree/statement/FloatLiteral.java | 10 +- .../syntaxtree/statement/ForStmt.java | 16 +- .../syntaxtree/statement/IfStmt.java | 19 +- .../syntaxtree/statement/InstVar.java | 15 +- .../syntaxtree/statement/InstanceOf.java | 17 +- .../syntaxtree/statement/IntLiteral.java | 15 +- .../statement/LambdaExpression.java | 12 +- .../syntaxtree/statement/Literal.java | 4 +- .../syntaxtree/statement/LocalOrFieldVar.java | 19 +- .../syntaxtree/statement/LocalVarDecl.java | 15 +- .../syntaxtree/statement/LongLiteral.java | 12 +- .../syntaxtree/statement/MethodCall.java | 19 +- .../syntaxtree/statement/NegativeExpr.java | 17 +- .../syntaxtree/statement/NewArray.java | 15 +- .../syntaxtree/statement/NewClass.java | 19 +- .../syntaxtree/statement/NotExpr.java | 15 +- .../syntaxtree/statement/Null.java | 15 +- .../syntaxtree/statement/PositivExpr.java | 13 +- .../syntaxtree/statement/PostDecExpr.java | 19 +- .../syntaxtree/statement/PostIncExpr.java | 19 +- .../syntaxtree/statement/PreDecExpr.java | 19 +- .../syntaxtree/statement/PreIncExpr.java | 19 +- .../syntaxtree/statement/Receiver.java | 4 +- .../syntaxtree/statement/Return.java | 19 +- .../syntaxtree/statement/Statement.java | 12 +- .../syntaxtree/statement/StringLiteral.java | 15 +- .../syntaxtree/statement/This.java | 17 +- .../syntaxtree/statement/UnaryExpr.java | 7 +- .../syntaxtree/statement/UnaryMinus.java | 9 +- .../syntaxtree/statement/UnaryNot.java | 9 +- .../syntaxtree/statement/WhileStmt.java | 19 +- .../type/BoundedGenericTypeVar.java | 7 +- .../syntaxtree/type/GenericTypeVar.java | 13 +- .../syntaxtree/type/RefType.java | 8 +- .../dhbwstuttgart/syntaxtree/type/Type.java | 4 +- .../typeinference/ConstraintsSet.java | 4 - .../typeinference/FunNInterface.java | 4 +- .../typeinference/SingleConstraint.java | 11 +- .../assumptions/GenericVarAssumption.java | 2 +- .../assumptions/TypeAssumptions.java | 14 +- .../typeinference/parser/JavaParser.java | 6 +- .../typeinference/parser/JavaParser.jay | 8 +- .../GenericTypeInsertPoint.java | 2 +- .../typedeployment/TypeInsertPoint.java | 2 +- .../typedeployment/TypeInsertSet.java | 2 +- .../typeinference/unify/Unify.java | 6 +- src/mycompiler/mytest/APITest.java | 18 - src/mycompiler/mytest/LambdaTest.java | 206 ----------- .../mytypereconstruction/CHelper.java | 62 ---- .../CIntersectionType.java | 127 ------- .../mytypereconstruction/CMultiplyTuple.java | 218 ----------- .../CReconstructionTuple.java | 133 ------- .../mytypereconstruction/CSubstitution.java | 272 -------------- .../CSubstitutionGenVar.java | 71 ---- .../mytypereconstruction/CSupportData.java | 346 ------------------ .../mytypereconstruction/CTriple.java | 263 ------------- .../CReplaceTypeEvent.java | 55 --- .../IReplaceTypeEventProvider.java | 41 --- .../ITypeReplacementListener.java | 42 --- .../set/CHashtableSet.java | 262 ------------- .../set/CMultiplyTupleSet.java | 52 --- .../set/CReconstructionTupleSet.java | 58 --- .../mytypereconstruction/set/CSet.java | 72 ---- .../set/CSubstitutionSet.java | 134 ------- .../mytypereconstruction/set/CTripleSet.java | 60 --- .../set/CTypeAssumptionSet.java | 67 ---- .../mytypereconstruction/set/CVectorSet.java | 165 --------- .../set/IHashSetElement.java | 24 -- .../mytypereconstruction/set/IHashSetKey.java | 19 - .../CInstVarTypeAssumption.java | 99 ----- .../CLocalVarTypeAssumption.java | 179 --------- .../typeassumption/CMethodTypeAssumption.java | 251 ------------- .../typeassumption/CParaTypeAssumption.java | 153 -------- .../typeassumption/CTypeAssumption.java | 254 ------------- .../typeassumptionkey/CInstVarKey.java | 37 -- .../typeassumptionkey/CLocalVarKey.java | 131 ------- .../typeassumptionkey/CMethodKey.java | 112 ------ .../typeassumptionkey/CMethodParaKey.java | 118 ------ .../typeassumptionkey/CTypeAssumptionKey.java | 94 ----- .../typeassumptionkey/IMethodBoundKey.java | 68 ---- .../unused/ConstantValueAttribute.java | 7 - src/mycompiler/unused/Import.java | 8 - src/mycompiler/unused/JavaCompiler.java | 30 -- src/mycompiler/unused/TestClass.java | 19 - test/bytecode/BytecodeTester.java | 4 +- test/bytecode/EmptyClassTest.java | 2 +- test/bytecode/GeneralTest.java | 2 +- .../typeReconstructionTest/TrMakeFCTest.java | 4 +- .../TrSubUnifyTest.java | 4 +- .../typeReconstructionTest/TrUnifyTest.java | 4 +- test/plugindevelopment/TRMEqualTest.java | 2 +- test/syntaxTree/NodeEqualTest.java | 4 +- 168 files changed, 595 insertions(+), 4848 deletions(-) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/Attribute.java (94%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/AttributeInfo.java (96%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_Class_info.java (97%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_Double_info.java (98%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_Fieldref_info.java (98%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_Float_info.java (97%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_Integer_info.java (97%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_InterfaceMethodref_info.java (98%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_Long_info.java (98%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_Methodref_info.java (98%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_NameAndType_info.java (98%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_String_info.java (97%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CONSTANT_Utf8_info.java (97%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CPInfo.java (97%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/ClassFile.java (99%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/ClassFileMember.java (67%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/CodeAttribute.java (99%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/ExceptionTable.java (97%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/FieldInfo.java (98%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/JVMCode.java (99%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/Key.java (98%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/MethodInfo.java (97%) rename src/{mycompiler/mybytecode => de/dhbwstuttgart/bytecode}/SignatureInfo.java (99%) rename src/{mycompiler => de/dhbwstuttgart}/myexception/CTypeReconstructionException.java (99%) rename src/{mycompiler => de/dhbwstuttgart}/myexception/JVMCodeException.java (93%) rename src/{mycompiler => de/dhbwstuttgart}/myexception/MatchException.java (93%) rename src/{mycompiler => de/dhbwstuttgart}/myexception/SCClassBodyException.java (96%) rename src/{mycompiler => de/dhbwstuttgart}/myexception/SCClassException.java (97%) rename src/{mycompiler => de/dhbwstuttgart}/myexception/SCExcept.java (98%) rename src/{mycompiler => de/dhbwstuttgart}/myexception/SCException.java (97%) rename src/{mycompiler => de/dhbwstuttgart}/myexception/SCMethodException.java (96%) rename src/{mycompiler => de/dhbwstuttgart}/myexception/SCStatementException.java (96%) rename src/{mycompiler/myinterface => de/dhbwstuttgart/syntaxtree}/Interface.java (89%) rename src/{mycompiler/myinterface => de/dhbwstuttgart/syntaxtree}/InterfaceBody.java (93%) rename src/de/dhbwstuttgart/{core => syntaxtree}/SourceFile.java (98%) rename src/de/dhbwstuttgart/{core => syntaxtree}/SyntaxTreeNode.java (96%) delete mode 100755 src/mycompiler/mytest/APITest.java delete mode 100755 src/mycompiler/mytest/LambdaTest.java delete mode 100755 src/mycompiler/mytypereconstruction/CHelper.java delete mode 100755 src/mycompiler/mytypereconstruction/CIntersectionType.java delete mode 100755 src/mycompiler/mytypereconstruction/CMultiplyTuple.java delete mode 100755 src/mycompiler/mytypereconstruction/CReconstructionTuple.java delete mode 100755 src/mycompiler/mytypereconstruction/CSubstitution.java delete mode 100755 src/mycompiler/mytypereconstruction/CSubstitutionGenVar.java delete mode 100755 src/mycompiler/mytypereconstruction/CSupportData.java delete mode 100755 src/mycompiler/mytypereconstruction/CTriple.java delete mode 100755 src/mycompiler/mytypereconstruction/replacementlistener/CReplaceTypeEvent.java delete mode 100755 src/mycompiler/mytypereconstruction/replacementlistener/IReplaceTypeEventProvider.java delete mode 100755 src/mycompiler/mytypereconstruction/replacementlistener/ITypeReplacementListener.java delete mode 100755 src/mycompiler/mytypereconstruction/set/CHashtableSet.java delete mode 100755 src/mycompiler/mytypereconstruction/set/CMultiplyTupleSet.java delete mode 100755 src/mycompiler/mytypereconstruction/set/CReconstructionTupleSet.java delete mode 100755 src/mycompiler/mytypereconstruction/set/CSet.java delete mode 100755 src/mycompiler/mytypereconstruction/set/CSubstitutionSet.java delete mode 100755 src/mycompiler/mytypereconstruction/set/CTripleSet.java delete mode 100755 src/mycompiler/mytypereconstruction/set/CTypeAssumptionSet.java delete mode 100755 src/mycompiler/mytypereconstruction/set/CVectorSet.java delete mode 100755 src/mycompiler/mytypereconstruction/set/IHashSetElement.java delete mode 100755 src/mycompiler/mytypereconstruction/set/IHashSetKey.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumption/CInstVarTypeAssumption.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumption/CLocalVarTypeAssumption.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumption/CMethodTypeAssumption.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumption/CParaTypeAssumption.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumption/CTypeAssumption.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumptionkey/CInstVarKey.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumptionkey/CLocalVarKey.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumptionkey/CMethodKey.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumptionkey/CMethodParaKey.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumptionkey/CTypeAssumptionKey.java delete mode 100755 src/mycompiler/mytypereconstruction/typeassumptionkey/IMethodBoundKey.java delete mode 100755 src/mycompiler/unused/ConstantValueAttribute.java delete mode 100755 src/mycompiler/unused/Import.java delete mode 100755 src/mycompiler/unused/JavaCompiler.java delete mode 100755 src/mycompiler/unused/TestClass.java diff --git a/src/mycompiler/mybytecode/Attribute.java b/src/de/dhbwstuttgart/bytecode/Attribute.java similarity index 94% rename from src/mycompiler/mybytecode/Attribute.java rename to src/de/dhbwstuttgart/bytecode/Attribute.java index 19a21e56..57998779 100755 --- a/src/mycompiler/mybytecode/Attribute.java +++ b/src/de/dhbwstuttgart/bytecode/Attribute.java @@ -1,5 +1,5 @@ // ino.module.Attribute.8529.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.Attribute.8529.import @@ -7,11 +7,11 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; -import mycompiler.myexception.JVMCodeException; - import org.apache.log4j.Logger; // ino.end +import de.dhbwstuttgart.myexception.JVMCodeException; + // ino.class.Attribute.21446.declaration public abstract class Attribute implements ClassFileMember // ino.end diff --git a/src/mycompiler/mybytecode/AttributeInfo.java b/src/de/dhbwstuttgart/bytecode/AttributeInfo.java similarity index 96% rename from src/mycompiler/mybytecode/AttributeInfo.java rename to src/de/dhbwstuttgart/bytecode/AttributeInfo.java index 0c6eb249..d43d5de6 100755 --- a/src/mycompiler/mybytecode/AttributeInfo.java +++ b/src/de/dhbwstuttgart/bytecode/AttributeInfo.java @@ -1,5 +1,5 @@ // ino.module.AttributeInfo.8530.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.AttributeInfo.8530.import @@ -8,8 +8,7 @@ import java.io.OutputStream; import java.lang.reflect.Array; import java.util.Vector; -import mycompiler.myexception.JVMCodeException; -// ino.end +import de.dhbwstuttgart.myexception.JVMCodeException; // ino.class.AttributeInfo.21467.declaration public class AttributeInfo extends Attribute diff --git a/src/mycompiler/mybytecode/CONSTANT_Class_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_Class_info.java similarity index 97% rename from src/mycompiler/mybytecode/CONSTANT_Class_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_Class_info.java index 76f61b2c..046fbe93 100755 --- a/src/mycompiler/mybytecode/CONSTANT_Class_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_Class_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_Class_info.8533.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_Class_info.8533.import diff --git a/src/mycompiler/mybytecode/CONSTANT_Double_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_Double_info.java similarity index 98% rename from src/mycompiler/mybytecode/CONSTANT_Double_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_Double_info.java index 18c3523c..af632c3a 100755 --- a/src/mycompiler/mybytecode/CONSTANT_Double_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_Double_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_Double_info.8534.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_Double_info.8534.import diff --git a/src/mycompiler/mybytecode/CONSTANT_Fieldref_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_Fieldref_info.java similarity index 98% rename from src/mycompiler/mybytecode/CONSTANT_Fieldref_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_Fieldref_info.java index 05dbd5f9..0f82f3a3 100755 --- a/src/mycompiler/mybytecode/CONSTANT_Fieldref_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_Fieldref_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_Fieldref_info.8535.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_Fieldref_info.8535.import diff --git a/src/mycompiler/mybytecode/CONSTANT_Float_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_Float_info.java similarity index 97% rename from src/mycompiler/mybytecode/CONSTANT_Float_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_Float_info.java index 7a442fdd..4a7e8582 100755 --- a/src/mycompiler/mybytecode/CONSTANT_Float_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_Float_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_Float_info.8536.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_Float_info.8536.import import java.io.IOException; diff --git a/src/mycompiler/mybytecode/CONSTANT_Integer_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_Integer_info.java similarity index 97% rename from src/mycompiler/mybytecode/CONSTANT_Integer_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_Integer_info.java index c317bfb4..1747ab73 100755 --- a/src/mycompiler/mybytecode/CONSTANT_Integer_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_Integer_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_Integer_info.8537.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_Integer_info.8537.import import java.io.FileOutputStream; diff --git a/src/mycompiler/mybytecode/CONSTANT_InterfaceMethodref_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_InterfaceMethodref_info.java similarity index 98% rename from src/mycompiler/mybytecode/CONSTANT_InterfaceMethodref_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_InterfaceMethodref_info.java index 6701db8a..70555a58 100755 --- a/src/mycompiler/mybytecode/CONSTANT_InterfaceMethodref_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_InterfaceMethodref_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_InterfaceMethodref_info.8538.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_InterfaceMethodref_info.8538.import diff --git a/src/mycompiler/mybytecode/CONSTANT_Long_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_Long_info.java similarity index 98% rename from src/mycompiler/mybytecode/CONSTANT_Long_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_Long_info.java index 6aacc747..49352928 100755 --- a/src/mycompiler/mybytecode/CONSTANT_Long_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_Long_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_Long_info.8539.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_Long_info.8539.import diff --git a/src/mycompiler/mybytecode/CONSTANT_Methodref_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_Methodref_info.java similarity index 98% rename from src/mycompiler/mybytecode/CONSTANT_Methodref_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_Methodref_info.java index 2f979053..b1b26164 100755 --- a/src/mycompiler/mybytecode/CONSTANT_Methodref_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_Methodref_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_Methodref_info.8540.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_Methodref_info.8540.import diff --git a/src/mycompiler/mybytecode/CONSTANT_NameAndType_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_NameAndType_info.java similarity index 98% rename from src/mycompiler/mybytecode/CONSTANT_NameAndType_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_NameAndType_info.java index d13049be..d9115167 100755 --- a/src/mycompiler/mybytecode/CONSTANT_NameAndType_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_NameAndType_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_NameAndType_info.8541.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_NameAndType_info.8541.import diff --git a/src/mycompiler/mybytecode/CONSTANT_String_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_String_info.java similarity index 97% rename from src/mycompiler/mybytecode/CONSTANT_String_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_String_info.java index b8ffb598..4d1c7046 100755 --- a/src/mycompiler/mybytecode/CONSTANT_String_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_String_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_String_info.8542.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_String_info.8542.import diff --git a/src/mycompiler/mybytecode/CONSTANT_Utf8_info.java b/src/de/dhbwstuttgart/bytecode/CONSTANT_Utf8_info.java similarity index 97% rename from src/mycompiler/mybytecode/CONSTANT_Utf8_info.java rename to src/de/dhbwstuttgart/bytecode/CONSTANT_Utf8_info.java index 58a44c2d..df9d2ef2 100755 --- a/src/mycompiler/mybytecode/CONSTANT_Utf8_info.java +++ b/src/de/dhbwstuttgart/bytecode/CONSTANT_Utf8_info.java @@ -1,5 +1,5 @@ // ino.module.CONSTANT_Utf8_info.8543.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CONSTANT_Utf8_info.8543.import diff --git a/src/mycompiler/mybytecode/CPInfo.java b/src/de/dhbwstuttgart/bytecode/CPInfo.java similarity index 97% rename from src/mycompiler/mybytecode/CPInfo.java rename to src/de/dhbwstuttgart/bytecode/CPInfo.java index 9ee33ba6..a3591b64 100755 --- a/src/mycompiler/mybytecode/CPInfo.java +++ b/src/de/dhbwstuttgart/bytecode/CPInfo.java @@ -1,5 +1,5 @@ // ino.module.CPInfo.8544.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CPInfo.8544.import diff --git a/src/mycompiler/mybytecode/ClassFile.java b/src/de/dhbwstuttgart/bytecode/ClassFile.java similarity index 99% rename from src/mycompiler/mybytecode/ClassFile.java rename to src/de/dhbwstuttgart/bytecode/ClassFile.java index 2306a10f..ba7de8e5 100755 --- a/src/mycompiler/mybytecode/ClassFile.java +++ b/src/de/dhbwstuttgart/bytecode/ClassFile.java @@ -3,7 +3,7 @@ // ino.module.ClassFile.8531.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.ClassFile.8531.import import java.io.File; @@ -13,9 +13,6 @@ import java.io.OutputStream; import java.lang.reflect.Array; import java.util.Vector; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myinterface.Interface; - import org.apache.log4j.Logger; // ino.end @@ -23,9 +20,14 @@ import org.apache.log4j.Logger; + + + import de.dhbwstuttgart.core.MyCompiler; -import de.dhbwstuttgart.core.SourceFile; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.syntaxtree.Interface; import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.statement.Assign; import de.dhbwstuttgart.syntaxtree.statement.Block; diff --git a/src/mycompiler/mybytecode/ClassFileMember.java b/src/de/dhbwstuttgart/bytecode/ClassFileMember.java similarity index 67% rename from src/mycompiler/mybytecode/ClassFileMember.java rename to src/de/dhbwstuttgart/bytecode/ClassFileMember.java index 8c54cfb9..85d628b7 100644 --- a/src/mycompiler/mybytecode/ClassFileMember.java +++ b/src/de/dhbwstuttgart/bytecode/ClassFileMember.java @@ -1,9 +1,9 @@ -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; import java.io.IOException; import java.io.OutputStream; -import mycompiler.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.JVMCodeException; public interface ClassFileMember { public void codegen(ClassFile cf, OutputStream out) throws JVMCodeException, IOException; diff --git a/src/mycompiler/mybytecode/CodeAttribute.java b/src/de/dhbwstuttgart/bytecode/CodeAttribute.java similarity index 99% rename from src/mycompiler/mybytecode/CodeAttribute.java rename to src/de/dhbwstuttgart/bytecode/CodeAttribute.java index d8844f20..d8a6dfdf 100755 --- a/src/mycompiler/mybytecode/CodeAttribute.java +++ b/src/de/dhbwstuttgart/bytecode/CodeAttribute.java @@ -4,7 +4,7 @@ //muss wieder einkommentiert werden // ino.module.CodeAttribute.8532.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.CodeAttribute.8532.import @@ -14,9 +14,9 @@ import java.io.OutputStream; import java.lang.reflect.Array; import java.util.Vector; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.type.Type; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.myexception.JVMCodeException; // ino.class.CodeAttribute.21681.declaration public class CodeAttribute extends Attribute diff --git a/src/mycompiler/mybytecode/ExceptionTable.java b/src/de/dhbwstuttgart/bytecode/ExceptionTable.java similarity index 97% rename from src/mycompiler/mybytecode/ExceptionTable.java rename to src/de/dhbwstuttgart/bytecode/ExceptionTable.java index c968ed1a..8c5dbe48 100755 --- a/src/mycompiler/mybytecode/ExceptionTable.java +++ b/src/de/dhbwstuttgart/bytecode/ExceptionTable.java @@ -1,5 +1,5 @@ // ino.module.ExceptionTable.8545.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.ExceptionTable.8545.import diff --git a/src/mycompiler/mybytecode/FieldInfo.java b/src/de/dhbwstuttgart/bytecode/FieldInfo.java similarity index 98% rename from src/mycompiler/mybytecode/FieldInfo.java rename to src/de/dhbwstuttgart/bytecode/FieldInfo.java index 8f2febd0..9347bb60 100755 --- a/src/mycompiler/mybytecode/FieldInfo.java +++ b/src/de/dhbwstuttgart/bytecode/FieldInfo.java @@ -1,5 +1,5 @@ // ino.module.FieldInfo.8546.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.FieldInfo.8546.import @@ -8,11 +8,11 @@ import java.io.IOException; import java.io.OutputStream; import java.util.Vector; -import mycompiler.myexception.JVMCodeException; - import org.apache.log4j.Logger; // ino.end +import de.dhbwstuttgart.myexception.JVMCodeException; + // ino.class.FieldInfo.22068.declaration public class FieldInfo implements ClassFileMember // ino.end diff --git a/src/mycompiler/mybytecode/JVMCode.java b/src/de/dhbwstuttgart/bytecode/JVMCode.java similarity index 99% rename from src/mycompiler/mybytecode/JVMCode.java rename to src/de/dhbwstuttgart/bytecode/JVMCode.java index 7e3e5c90..1966ae88 100755 --- a/src/mycompiler/mybytecode/JVMCode.java +++ b/src/de/dhbwstuttgart/bytecode/JVMCode.java @@ -1,14 +1,14 @@ // ino.module.JVMCode.8547.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.JVMCode.8547.import import java.util.Vector; -import mycompiler.myexception.JVMCodeException; - import org.apache.log4j.Logger; // ino.end + +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; // ino.class.JVMCode.22140.description type=javadoc diff --git a/src/mycompiler/mybytecode/Key.java b/src/de/dhbwstuttgart/bytecode/Key.java similarity index 98% rename from src/mycompiler/mybytecode/Key.java rename to src/de/dhbwstuttgart/bytecode/Key.java index 859bb871..77df160e 100755 --- a/src/mycompiler/mybytecode/Key.java +++ b/src/de/dhbwstuttgart/bytecode/Key.java @@ -1,5 +1,5 @@ // ino.module.Key.8548.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.Key.8548.import diff --git a/src/mycompiler/mybytecode/MethodInfo.java b/src/de/dhbwstuttgart/bytecode/MethodInfo.java similarity index 97% rename from src/mycompiler/mybytecode/MethodInfo.java rename to src/de/dhbwstuttgart/bytecode/MethodInfo.java index 56eee9b2..a083b106 100755 --- a/src/mycompiler/mybytecode/MethodInfo.java +++ b/src/de/dhbwstuttgart/bytecode/MethodInfo.java @@ -1,5 +1,5 @@ // ino.module.MethodInfo.8549.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.MethodInfo.8549.import @@ -8,11 +8,11 @@ import java.io.IOException; import java.io.OutputStream; import java.util.Vector; -import mycompiler.myexception.JVMCodeException; - import org.apache.log4j.Logger; // ino.end +import de.dhbwstuttgart.myexception.JVMCodeException; + // ino.class.MethodInfo.22923.declaration public class MethodInfo implements ClassFileMember // ino.end diff --git a/src/mycompiler/mybytecode/SignatureInfo.java b/src/de/dhbwstuttgart/bytecode/SignatureInfo.java similarity index 99% rename from src/mycompiler/mybytecode/SignatureInfo.java rename to src/de/dhbwstuttgart/bytecode/SignatureInfo.java index 8bb42166..cb434597 100755 --- a/src/mycompiler/mybytecode/SignatureInfo.java +++ b/src/de/dhbwstuttgart/bytecode/SignatureInfo.java @@ -1,5 +1,5 @@ // ino.module.SignatureInfo.8550.package -package mycompiler.mybytecode; +package de.dhbwstuttgart.bytecode; // ino.end // ino.module.SignatureInfo.8550.import @@ -8,14 +8,14 @@ import java.io.IOException; import java.io.OutputStream; import java.util.Vector; -import mycompiler.myexception.JVMCodeException; - import org.apache.log4j.Logger; // ino.end + +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.ParameterList; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; diff --git a/src/de/dhbwstuttgart/core/AClassOrInterface.java b/src/de/dhbwstuttgart/core/AClassOrInterface.java index 39249e67..7b9d3091 100755 --- a/src/de/dhbwstuttgart/core/AClassOrInterface.java +++ b/src/de/dhbwstuttgart/core/AClassOrInterface.java @@ -6,7 +6,6 @@ package de.dhbwstuttgart.core; // ino.module.AClassOrInterface.8526.import import java.util.Vector; -import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; import org.apache.log4j.Logger; @@ -14,6 +13,8 @@ import org.apache.log4j.Logger; + +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.typeinference.parser.JavaClassName; diff --git a/src/de/dhbwstuttgart/core/MyCompiler.java b/src/de/dhbwstuttgart/core/MyCompiler.java index 1095a4b0..c8f2d43b 100755 --- a/src/de/dhbwstuttgart/core/MyCompiler.java +++ b/src/de/dhbwstuttgart/core/MyCompiler.java @@ -13,22 +13,22 @@ import java.io.Reader; import java.io.StringReader; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; - import org.apache.log4j.Logger; import org.apache.log4j.xml.DOMConfigurator; import com.sun.corba.se.spi.orbutil.fsm.Guard.Result; import com.sun.org.apache.xerces.internal.impl.xs.identity.Field; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; import de.dhbwstuttgart.syntaxtree.FormalParameter; import de.dhbwstuttgart.syntaxtree.ImportDeclarations; import de.dhbwstuttgart.syntaxtree.Method; import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; diff --git a/src/de/dhbwstuttgart/core/MyCompilerAPI.java b/src/de/dhbwstuttgart/core/MyCompilerAPI.java index b6a72b36..fcfb8450 100755 --- a/src/de/dhbwstuttgart/core/MyCompilerAPI.java +++ b/src/de/dhbwstuttgart/core/MyCompilerAPI.java @@ -8,14 +8,15 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.exceptions.ParserError; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.parser.JavaParser; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; // ino.class.MyCompilerAPI.21328.description type=javadoc /** diff --git a/src/mycompiler/myexception/CTypeReconstructionException.java b/src/de/dhbwstuttgart/myexception/CTypeReconstructionException.java similarity index 99% rename from src/mycompiler/myexception/CTypeReconstructionException.java rename to src/de/dhbwstuttgart/myexception/CTypeReconstructionException.java index 132daf7b..babbc691 100755 --- a/src/mycompiler/myexception/CTypeReconstructionException.java +++ b/src/de/dhbwstuttgart/myexception/CTypeReconstructionException.java @@ -1,5 +1,5 @@ // ino.module.CTypeReconstructionException.8572.package -package mycompiler.myexception; +package de.dhbwstuttgart.myexception; // ino.end // ino.module.CTypeReconstructionException.8572.import diff --git a/src/mycompiler/myexception/JVMCodeException.java b/src/de/dhbwstuttgart/myexception/JVMCodeException.java similarity index 93% rename from src/mycompiler/myexception/JVMCodeException.java rename to src/de/dhbwstuttgart/myexception/JVMCodeException.java index 7eecf3fb..e767b933 100755 --- a/src/mycompiler/myexception/JVMCodeException.java +++ b/src/de/dhbwstuttgart/myexception/JVMCodeException.java @@ -1,5 +1,5 @@ // ino.module.JVMCodeException.8573.package -package mycompiler.myexception; +package de.dhbwstuttgart.myexception; // ino.end // ino.class.JVMCodeException.23780.declaration public class JVMCodeException extends Exception diff --git a/src/mycompiler/myexception/MatchException.java b/src/de/dhbwstuttgart/myexception/MatchException.java similarity index 93% rename from src/mycompiler/myexception/MatchException.java rename to src/de/dhbwstuttgart/myexception/MatchException.java index 1235f039..12008da6 100755 --- a/src/mycompiler/myexception/MatchException.java +++ b/src/de/dhbwstuttgart/myexception/MatchException.java @@ -1,5 +1,5 @@ // ino.module.MatchException.8574.package -package mycompiler.myexception; +package de.dhbwstuttgart.myexception; // ino.end // ino.class.MatchException.23790.declaration diff --git a/src/mycompiler/myexception/SCClassBodyException.java b/src/de/dhbwstuttgart/myexception/SCClassBodyException.java similarity index 96% rename from src/mycompiler/myexception/SCClassBodyException.java rename to src/de/dhbwstuttgart/myexception/SCClassBodyException.java index 49081198..4f493e66 100755 --- a/src/mycompiler/myexception/SCClassBodyException.java +++ b/src/de/dhbwstuttgart/myexception/SCClassBodyException.java @@ -1,5 +1,5 @@ // ino.module.SCClassBodyException.8575.package -package mycompiler.myexception; +package de.dhbwstuttgart.myexception; // ino.end // ino.module.SCClassBodyException.8575.import import java.util.Vector; diff --git a/src/mycompiler/myexception/SCClassException.java b/src/de/dhbwstuttgart/myexception/SCClassException.java similarity index 97% rename from src/mycompiler/myexception/SCClassException.java rename to src/de/dhbwstuttgart/myexception/SCClassException.java index ace83fdc..03ed35ee 100755 --- a/src/mycompiler/myexception/SCClassException.java +++ b/src/de/dhbwstuttgart/myexception/SCClassException.java @@ -1,5 +1,5 @@ // ino.module.SCClassException.8576.package -package mycompiler.myexception; +package de.dhbwstuttgart.myexception; // ino.end // ino.module.SCClassException.8576.import import java.util.Enumeration; diff --git a/src/mycompiler/myexception/SCExcept.java b/src/de/dhbwstuttgart/myexception/SCExcept.java similarity index 98% rename from src/mycompiler/myexception/SCExcept.java rename to src/de/dhbwstuttgart/myexception/SCExcept.java index 1b39c58a..fd5d6ba8 100755 --- a/src/mycompiler/myexception/SCExcept.java +++ b/src/de/dhbwstuttgart/myexception/SCExcept.java @@ -1,5 +1,5 @@ // ino.module.SCExcept.8577.package -package mycompiler.myexception; +package de.dhbwstuttgart.myexception; // ino.end // ino.module.SCExcept.8577.import diff --git a/src/mycompiler/myexception/SCException.java b/src/de/dhbwstuttgart/myexception/SCException.java similarity index 97% rename from src/mycompiler/myexception/SCException.java rename to src/de/dhbwstuttgart/myexception/SCException.java index dc9cb5c5..d996cc66 100755 --- a/src/mycompiler/myexception/SCException.java +++ b/src/de/dhbwstuttgart/myexception/SCException.java @@ -1,5 +1,5 @@ // ino.module.SCException.8578.package -package mycompiler.myexception; +package de.dhbwstuttgart.myexception; // ino.end // ino.module.SCException.8578.import import java.util.Enumeration; diff --git a/src/mycompiler/myexception/SCMethodException.java b/src/de/dhbwstuttgart/myexception/SCMethodException.java similarity index 96% rename from src/mycompiler/myexception/SCMethodException.java rename to src/de/dhbwstuttgart/myexception/SCMethodException.java index 045d7955..e336528f 100755 --- a/src/mycompiler/myexception/SCMethodException.java +++ b/src/de/dhbwstuttgart/myexception/SCMethodException.java @@ -1,5 +1,5 @@ // ino.module.SCMethodException.8579.package -package mycompiler.myexception; +package de.dhbwstuttgart.myexception; // ino.end // ino.module.SCMethodException.8579.import import java.util.Vector; diff --git a/src/mycompiler/myexception/SCStatementException.java b/src/de/dhbwstuttgart/myexception/SCStatementException.java similarity index 96% rename from src/mycompiler/myexception/SCStatementException.java rename to src/de/dhbwstuttgart/myexception/SCStatementException.java index 8e7f0da3..f477527b 100755 --- a/src/mycompiler/myexception/SCStatementException.java +++ b/src/de/dhbwstuttgart/myexception/SCStatementException.java @@ -1,5 +1,5 @@ // ino.module.SCStatementException.8580.package -package mycompiler.myexception; +package de.dhbwstuttgart.myexception; // ino.end // ino.module.SCStatementException.8580.import import java.util.Vector; diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 2bc0e7ad..2dba6720 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -659,6 +659,9 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit // ino.end // ino.method.TRProg.23110.body { + /* + + */ ////////////////////////////// // Und los geht's: ////////////////////////////// diff --git a/src/de/dhbwstuttgart/syntaxtree/ClassBody.java b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java index b987bae4..3dd79b67 100755 --- a/src/de/dhbwstuttgart/syntaxtree/ClassBody.java +++ b/src/de/dhbwstuttgart/syntaxtree/ClassBody.java @@ -6,18 +6,19 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCClassBodyException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCMethodException; - import org.apache.log4j.Logger; // ino.end + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCClassBodyException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCMethodException; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.JavaCodeResult; diff --git a/src/de/dhbwstuttgart/syntaxtree/Constant.java b/src/de/dhbwstuttgart/syntaxtree/Constant.java index e07c75b3..5790a442 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Constant.java +++ b/src/de/dhbwstuttgart/syntaxtree/Constant.java @@ -5,7 +5,11 @@ package de.dhbwstuttgart.syntaxtree; // ino.module.Constant.8556.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.AttributeInfo; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Literal; import de.dhbwstuttgart.syntaxtree.type.Type; @@ -14,10 +18,6 @@ import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.parser.JavaClassName; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.mybytecode.AttributeInfo; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; // ino.end import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; diff --git a/src/de/dhbwstuttgart/syntaxtree/Constructor.java b/src/de/dhbwstuttgart/syntaxtree/Constructor.java index 2c27a254..e35a46de 100644 --- a/src/de/dhbwstuttgart/syntaxtree/Constructor.java +++ b/src/de/dhbwstuttgart/syntaxtree/Constructor.java @@ -2,7 +2,8 @@ package de.dhbwstuttgart.syntaxtree; import java.util.Vector; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.statement.Block; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -17,8 +18,6 @@ import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.parser.JavaClassName; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; diff --git a/src/de/dhbwstuttgart/syntaxtree/Field.java b/src/de/dhbwstuttgart/syntaxtree/Field.java index 04714d3b..74a1b08e 100644 --- a/src/de/dhbwstuttgart/syntaxtree/Field.java +++ b/src/de/dhbwstuttgart/syntaxtree/Field.java @@ -2,7 +2,8 @@ package de.dhbwstuttgart.syntaxtree; import java.util.Vector; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; @@ -16,8 +17,6 @@ import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.Typeable; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; public abstract class Field extends SyntaxTreeNode implements TypeInsertable, Typeable, Generic, GenericTypeInsertable{ diff --git a/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java index fc44782f..02f4d8e8 100644 --- a/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java +++ b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java @@ -2,7 +2,8 @@ package de.dhbwstuttgart.syntaxtree; import java.util.Vector; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -17,8 +18,6 @@ import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.FieldAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; /** diff --git a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java index 72b31651..4b631265 100755 --- a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java +++ b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java @@ -5,8 +5,6 @@ package de.dhbwstuttgart.syntaxtree; // ino.module.FormalParameter.8561.import import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; @@ -33,7 +31,10 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; diff --git a/src/mycompiler/myinterface/Interface.java b/src/de/dhbwstuttgart/syntaxtree/Interface.java similarity index 89% rename from src/mycompiler/myinterface/Interface.java rename to src/de/dhbwstuttgart/syntaxtree/Interface.java index d19a49b1..1502b881 100755 --- a/src/mycompiler/myinterface/Interface.java +++ b/src/de/dhbwstuttgart/syntaxtree/Interface.java @@ -1,31 +1,19 @@ // ino.module.Interface.8582.package -package mycompiler.myinterface; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.Interface.8582.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.core.AClassOrInterface; -import de.dhbwstuttgart.core.SourceFile; -import de.dhbwstuttgart.syntaxtree.Class; -import de.dhbwstuttgart.syntaxtree.ClassHelper; -import de.dhbwstuttgart.syntaxtree.Constant; -import de.dhbwstuttgart.syntaxtree.FormalParameter; -import de.dhbwstuttgart.syntaxtree.Method; -import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; -import mycompiler.mytypereconstruction.CIntersectionType; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; /** * Ein Interface ist eine abstrakte Klasse, erbt daher von Class diff --git a/src/mycompiler/myinterface/InterfaceBody.java b/src/de/dhbwstuttgart/syntaxtree/InterfaceBody.java similarity index 93% rename from src/mycompiler/myinterface/InterfaceBody.java rename to src/de/dhbwstuttgart/syntaxtree/InterfaceBody.java index 56135a0a..12bc5df1 100755 --- a/src/mycompiler/myinterface/InterfaceBody.java +++ b/src/de/dhbwstuttgart/syntaxtree/InterfaceBody.java @@ -1,15 +1,12 @@ // ino.module.InterfaceBody.8583.package -package mycompiler.myinterface; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.InterfaceBody.8583.import import java.util.Vector; -import de.dhbwstuttgart.syntaxtree.Constant; -import de.dhbwstuttgart.syntaxtree.Field; -import de.dhbwstuttgart.syntaxtree.Method; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.JVMCodeException; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.myexception.JVMCodeException; import mycompiler.mymodifier.Modifiers; // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/Method.java b/src/de/dhbwstuttgart/syntaxtree/Method.java index dc45aef2..47979102 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Method.java +++ b/src/de/dhbwstuttgart/syntaxtree/Method.java @@ -7,10 +7,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCMethodException; -import mycompiler.myexception.SCStatementException; import mycompiler.mymodifier.Modifiers; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; @@ -23,9 +19,12 @@ import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; +import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.core.MyCompiler; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCMethodException; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.statement.Block; import de.dhbwstuttgart.syntaxtree.statement.Return; diff --git a/src/de/dhbwstuttgart/syntaxtree/ParameterList.java b/src/de/dhbwstuttgart/syntaxtree/ParameterList.java index a99333f3..78febc12 100755 --- a/src/de/dhbwstuttgart/syntaxtree/ParameterList.java +++ b/src/de/dhbwstuttgart/syntaxtree/ParameterList.java @@ -4,12 +4,12 @@ package de.dhbwstuttgart.syntaxtree; // ino.module.ParameterList.8565.import import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; import mycompiler.mytype.*; import java.util.Iterator; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.syntaxtree.type.BaseType; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.typeinference.JavaCodeResult; diff --git a/src/de/dhbwstuttgart/core/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java similarity index 98% rename from src/de/dhbwstuttgart/core/SourceFile.java rename to src/de/dhbwstuttgart/syntaxtree/SourceFile.java index 201e7ef1..6ed62634 100755 --- a/src/de/dhbwstuttgart/core/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -1,5 +1,5 @@ // ino.module.SourceFile.8722.package -package de.dhbwstuttgart.core; +package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.SourceFile.8722.import @@ -10,12 +10,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCClassException; -import mycompiler.myexception.SCException; -import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; import mycompiler.mymodifier.Public; import mycompiler.mytypereconstruction.CIntersectionType; @@ -27,15 +21,13 @@ import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -import de.dhbwstuttgart.syntaxtree.BasicAssumptionClass; -import de.dhbwstuttgart.syntaxtree.Class; -import de.dhbwstuttgart.syntaxtree.Constructor; -import de.dhbwstuttgart.syntaxtree.Field; -import de.dhbwstuttgart.syntaxtree.FieldDeclaration; -import de.dhbwstuttgart.syntaxtree.FormalParameter; -import de.dhbwstuttgart.syntaxtree.ImportDeclarations; -import de.dhbwstuttgart.syntaxtree.Method; -import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.core.AClassOrInterface; +import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCClassException; +import de.dhbwstuttgart.myexception.SCException; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.BooleanType; @@ -942,7 +934,7 @@ public class SourceFile /** * Erstellt die Basic Assumptions (siehe MakeBasicAssumptions) als AssumptionSet * @return - */ + @Deprecated //angefügt von Andreas Stadelmeier. Grund: Die Funktion wurde neu als makeBasicAssumptionsFromJRE angelegt private TypeAssumptions getBasicAssumptions() { TypeAssumptions ret = new TypeAssumptions(null); @@ -1085,7 +1077,7 @@ public class SourceFile imports.addAll(doneImports); return ret; - } + }*/ // ino.method.makeBasicAssumptionsFromJRE.21409.definition private TypeAssumptions makeBasicAssumptionsFromJRE(Vector imports) @@ -1124,19 +1116,19 @@ public class SourceFile //String className=x.getSimpleName(); String className=x.getName(); - // Generische Typen erzeugen - + + Class parentClass = new Class(className, mod, 0); + // Generische Typen erzeugen Hashtable jreSpiderRegistry=new Hashtable(); Vector typeGenPara = new Vector(); for(int j=0;j0){ //auskommentiert von Andreas Stadelmeier: @@ -1166,7 +1158,7 @@ public class SourceFile java.lang.reflect.TypeVariable[] superclassTVS=superClass.getTypeParameters(); Vector supertypeGenPara = new Vector(); for(int tvi=0;tvi())); FormalParameter parameter = new FormalParameter(new DeclId(type.get_Name())); @@ -1282,13 +1274,13 @@ public class SourceFile // ino.method.createTypeFromJavaGenericType.21415.definition - private Type createTypeFromJavaGenericType(java.lang.reflect.Type type, java.lang.Class cl, HashtablejreSpiderRegistry) + private Type createTypeFromJavaGenericType(java.lang.reflect.Type type, java.lang.Class cl, HashtablejreSpiderRegistry, Class parentClass) // ino.end // ino.method.createTypeFromJavaGenericType.21415.body { if(type instanceof TypeVariableImpl){ TypeVariableImpl tvi=((TypeVariableImpl)type); - return(new GenericTypeVar(jreSpiderRegistry.get(tvi.getName()).getName().toString(),-1)); + return(new GenericTypeVar(jreSpiderRegistry.get(tvi.getName()).getName().toString(),parentClass,-1)); }else{ //String jccNameForClass=baseTypeTranslationTable.get(cl.getSimpleName()); String jccNameForClass=baseTypeTranslationTable.get(cl.getName()); diff --git a/src/de/dhbwstuttgart/core/SyntaxTreeNode.java b/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java similarity index 96% rename from src/de/dhbwstuttgart/core/SyntaxTreeNode.java rename to src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java index 6a947d5b..15c8a373 100644 --- a/src/de/dhbwstuttgart/core/SyntaxTreeNode.java +++ b/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java @@ -1,9 +1,7 @@ -package de.dhbwstuttgart.core; +package de.dhbwstuttgart.syntaxtree; import java.util.Vector; -import de.dhbwstuttgart.syntaxtree.Class; -import de.dhbwstuttgart.syntaxtree.Generic; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; diff --git a/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java index b11e6ddc..8012781a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java @@ -4,12 +4,6 @@ package de.dhbwstuttgart.syntaxtree.misc; // ino.module.DeclId.8558.import import java.util.Vector; -import mycompiler.mybytecode.Attribute; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.mybytecode.SignatureInfo; -import mycompiler.myexception.JVMCodeException; import mycompiler.mymodifier.Final; import mycompiler.mymodifier.Modifiers; @@ -19,7 +13,15 @@ import org.apache.log4j.Logger; + + +import de.dhbwstuttgart.bytecode.Attribute; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.bytecode.SignatureInfo; import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Constant; import de.dhbwstuttgart.syntaxtree.statement.Assign; import de.dhbwstuttgart.syntaxtree.statement.Expr; diff --git a/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java index 2ad399ea..937f9a03 100755 --- a/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java @@ -5,13 +5,13 @@ package de.dhbwstuttgart.syntaxtree.misc; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.parser.JavaClassName; -import mycompiler.mybytecode.JVMCode; // ino.class.UsedId.23659.declaration diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java index 85d3b9b2..c5d1e660 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java @@ -7,6 +7,10 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.type.IntegerType; @@ -18,10 +22,6 @@ import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java index 1c6fc1df..c09b2b6b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java @@ -4,12 +4,12 @@ package de.dhbwstuttgart.syntaxtree.operator; // ino.module.DivideOp.8596.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java index f901f242..8c5b87bb 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java @@ -5,17 +5,17 @@ package de.dhbwstuttgart.syntaxtree.operator; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Null; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java index d0b9df89..2027d865 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java @@ -4,12 +4,12 @@ package de.dhbwstuttgart.syntaxtree.operator; // ino.module.GreaterEquOp.8598.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/GreaterOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterOp.java index aa74d16d..c3121083 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/GreaterOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterOp.java @@ -4,12 +4,12 @@ package de.dhbwstuttgart.syntaxtree.operator; // ino.module.GreaterOp.8599.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/LessEquOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LessEquOp.java index 7fc886e5..7af4bdae 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/LessEquOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LessEquOp.java @@ -4,12 +4,12 @@ package de.dhbwstuttgart.syntaxtree.operator; // ino.module.LessEquOp.8600.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/LessOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LessOp.java index 3e43922b..ddcdcca4 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/LessOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LessOp.java @@ -4,12 +4,12 @@ package de.dhbwstuttgart.syntaxtree.operator; // ino.module.LessOp.8601.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java index 5b019a08..17c73e23 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java @@ -7,6 +7,11 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.NotExpr; @@ -21,11 +26,6 @@ import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/MinusOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/MinusOp.java index c4c4560b..1b1a8ecc 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/MinusOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/MinusOp.java @@ -4,12 +4,12 @@ package de.dhbwstuttgart.syntaxtree.operator; // ino.module.MinusOp.8603.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/ModuloOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/ModuloOp.java index 5e92239d..866c6bd6 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/ModuloOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/ModuloOp.java @@ -4,12 +4,12 @@ package de.dhbwstuttgart.syntaxtree.operator; // ino.module.ModuloOp.8604.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java index 10a57ee7..1ffa2147 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java @@ -8,6 +8,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; @@ -15,7 +16,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.myexception.CTypeReconstructionException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java index 044e6fb1..7f8d19cc 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java @@ -5,17 +5,17 @@ package de.dhbwstuttgart.syntaxtree.operator; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Null; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java index dc6a52a4..0a588a61 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java @@ -7,7 +7,12 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.type.Pair; @@ -21,11 +26,6 @@ import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/PlusOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/PlusOp.java index 886ea59b..cfe9cc22 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/PlusOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/PlusOp.java @@ -4,12 +4,12 @@ package de.dhbwstuttgart.syntaxtree.operator; // ino.module.PlusOp.8609.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java index 9e984c2a..135f0ae4 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java @@ -8,6 +8,10 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; @@ -15,10 +19,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/TimesOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/TimesOp.java index 9e4802b2..07ca1fe8 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/TimesOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/TimesOp.java @@ -5,12 +5,12 @@ package de.dhbwstuttgart.syntaxtree.operator; // ino.module.TimesOp.8611.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; // ino.class.TimesOp.24312.declaration public class TimesOp extends MulOp diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ArgumentList.java b/src/de/dhbwstuttgart/syntaxtree/statement/ArgumentList.java index 98094f50..08c66c28 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ArgumentList.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ArgumentList.java @@ -5,14 +5,13 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.FormalParameter; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; -// ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java index 4907a623..224d2f56 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java @@ -7,13 +7,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CMultiplyTuple; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; @@ -36,8 +29,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java index 94fb695c..ff127df9 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java @@ -7,13 +7,6 @@ import java.util.HashMap; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -37,8 +30,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.operator.AddOp; import de.dhbwstuttgart.syntaxtree.operator.LogOp; import de.dhbwstuttgart.syntaxtree.operator.MulOp; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java index 06e27a02..3ab3a23e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java @@ -7,12 +7,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -35,8 +29,17 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java index 75e6e123..19bc0716 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java @@ -5,11 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -28,8 +23,16 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.BooleanType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java index 25b18c21..87832a22 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java @@ -6,13 +6,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -32,8 +25,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.ConstraintsSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java index b45b874d..f150db34 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java @@ -5,11 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -29,8 +24,16 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.CharacterType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java index f62d77ee..85b0778a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java @@ -5,11 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -19,8 +14,13 @@ import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.DoubleType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.IntegerType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java index 2dedecbb..1967fe04 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java @@ -5,10 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -28,8 +24,15 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.ConstraintsSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java b/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java index 131fa867..db241201 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java @@ -6,6 +6,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.Type; @@ -13,8 +15,6 @@ import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CMultiplyTuple; import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.CSupportData; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java index effc2c05..8ce6eb37 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java @@ -5,10 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -17,8 +13,12 @@ import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.FloatType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java index e8a752b2..1400b35c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java @@ -5,13 +5,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -22,8 +15,15 @@ import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.operator.LogOp; import de.dhbwstuttgart.syntaxtree.operator.Operator; import de.dhbwstuttgart.syntaxtree.operator.RelOp; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java index f46f531e..8822fcb3 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java @@ -7,13 +7,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; @@ -37,8 +30,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.operator.LogOp; import de.dhbwstuttgart.syntaxtree.operator.Operator; import de.dhbwstuttgart.syntaxtree.operator.RelOp; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java index 1082d3d9..be25f6cf 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java @@ -7,11 +7,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -39,8 +34,16 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java index 4e7bc907..5b8baa5f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java @@ -6,12 +6,6 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -30,8 +24,17 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.BooleanType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java index ec93cb4e..7b7a0d39 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java @@ -5,11 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -29,8 +24,16 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.IntegerType; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java index 5ba7b038..89cbcd81 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java @@ -3,12 +3,17 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassHelper; import de.dhbwstuttgart.syntaxtree.FormalParameter; import de.dhbwstuttgart.syntaxtree.Method; import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.DoubleType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; @@ -24,11 +29,6 @@ import de.dhbwstuttgart.typeinference.Typeable; import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java b/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java index 4b4ae7d2..a89ef6b5 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java @@ -3,8 +3,8 @@ package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.Literal.8636.import -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.JVMCodeException; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java index c117d65e..bd83ce15 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java @@ -6,13 +6,6 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -37,8 +30,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java index 76b0df25..eda8deef 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java @@ -6,11 +6,6 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -43,10 +38,18 @@ import org.apache.log4j.Logger; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.core.MyCompiler; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassHelper; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java index 73d5e9d2..0dca5340 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java @@ -5,11 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -19,8 +14,13 @@ import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.IntegerType; import de.dhbwstuttgart.syntaxtree.type.LongType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java index 45753b42..113fb693 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java @@ -7,13 +7,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CIntersectionType; import mycompiler.mytypereconstruction.CMultiplyTuple; import mycompiler.mytypereconstruction.CSubstitution; @@ -46,12 +39,22 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; import de.dhbwstuttgart.syntaxtree.FormalParameter; import de.dhbwstuttgart.syntaxtree.Method; import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java index a702fef3..2efdd2e8 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java @@ -6,12 +6,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -32,8 +26,17 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java index 9bd35ec0..3a921483 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java @@ -5,11 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -28,8 +23,16 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.ConstraintsSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java index 722392ff..3b6733a9 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java @@ -7,13 +7,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CMultiplyTuple; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; @@ -42,8 +35,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java index ba45d57d..c92bce5e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java @@ -6,11 +6,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -33,8 +28,16 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.BooleanType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java index 1743e136..3f81ed76 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java @@ -5,11 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -29,8 +24,16 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java index f3e8659d..e67d6a25 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java @@ -5,10 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -27,8 +23,15 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.ConstraintsSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java index 91b1cd27..9e22a4b1 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java @@ -6,13 +6,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -33,8 +26,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java index d373a178..badcceb1 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java @@ -6,13 +6,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -36,8 +29,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java index 91575ae0..8ee14021 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java @@ -6,13 +6,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -33,8 +26,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java index 7e0bd640..546c7171 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java @@ -6,13 +6,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -33,8 +26,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java b/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java index 1b566fc1..bfe41dd7 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Receiver.java @@ -5,14 +5,14 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.myexception.SCStatementException; - import org.apache.log4j.Logger; // ino.end + +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Return.java b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java index 6a4421d9..6400f0c0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Return.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java @@ -5,13 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -31,8 +24,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java b/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java index 879bc88e..68519262 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java @@ -6,9 +6,14 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.core.IItemWithOffset; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; @@ -19,11 +24,6 @@ import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.Typeable; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java index 53fbdc68..92cea66e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java @@ -5,11 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import mycompiler.mytypereconstruction.set.CTripleSet; @@ -30,8 +25,16 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.CharacterType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/This.java b/src/de/dhbwstuttgart/syntaxtree/statement/This.java index 3be2dbc1..d33e59ff 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/This.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/This.java @@ -5,12 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -31,8 +25,17 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.java index 972ed71d..f4c238e6 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryExpr.java @@ -4,16 +4,15 @@ package de.dhbwstuttgart.syntaxtree.statement; // ino.module.UnaryExpr.8655.import import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.OderConstraint; import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.myexception.JVMCodeException; -// ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/UnaryMinus.java b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryMinus.java index d473aa47..4c5fe47f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/UnaryMinus.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryMinus.java @@ -3,11 +3,10 @@ package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.UnaryMinus.8656.import -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; -// ino.end +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; // ino.class.UnaryMinus.26308.declaration public class UnaryMinus diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/UnaryNot.java b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryNot.java index f884b9b8..e76cc623 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/UnaryNot.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/UnaryNot.java @@ -3,11 +3,10 @@ package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.UnaryNot.8657.import -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.JVMCodeException; -// ino.end +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.JVMCodeException; // ino.class.UnaryNot.26314.declaration public class UnaryNot diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java index 2f5458b9..5176123a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java @@ -7,13 +7,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.mybytecode.CodeAttribute; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCExcept; -import mycompiler.myexception.SCStatementException; import mycompiler.mytypereconstruction.CSupportData; import mycompiler.mytypereconstruction.CTriple; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; @@ -36,8 +29,18 @@ import org.apache.log4j.Logger; -import de.dhbwstuttgart.core.SyntaxTreeNode; + + + +import de.dhbwstuttgart.bytecode.ClassFile; +import de.dhbwstuttgart.bytecode.CodeAttribute; +import de.dhbwstuttgart.bytecode.JVMCode; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.myexception.SCExcept; +import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.operator.LogOp; import de.dhbwstuttgart.syntaxtree.operator.Operator; import de.dhbwstuttgart.syntaxtree.operator.RelOp; diff --git a/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java index d3674efe..ed832cb1 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/BoundedGenericTypeVar.java @@ -5,6 +5,7 @@ package de.dhbwstuttgart.syntaxtree.type; // ino.module.BoundedGenericTypeVar.8669.import import java.util.Vector; +import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.SingleConstraint; @@ -53,11 +54,11 @@ public class BoundedGenericTypeVar extends GenericTypeVar */ // ino.method.BoundedGenericTypeVar.29409.definition - public BoundedGenericTypeVar(String s, Vector bounds, int offset, int endOffset) + public BoundedGenericTypeVar(String s, Vector bounds, Class parentClass, int offset, int endOffset) // ino.end // ino.method.BoundedGenericTypeVar.29409.body { - super(s, offset); + super(s, parentClass ,offset); if(bounds != null)for(Type t : bounds){ //if(t!=null)this.extendVars.add(t); } @@ -111,7 +112,7 @@ public class BoundedGenericTypeVar extends GenericTypeVar // ino.end // ino.method.clone.26483.body { - return new BoundedGenericTypeVar(this.getName().toString(), this.getBounds(), getOffset(), this.getEndOffset()); + return new BoundedGenericTypeVar(this.getName().toString(), this.getBounds(), this.getParentClass(), getOffset(), this.getEndOffset()); } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java index 6d2765e0..4af912eb 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java @@ -34,8 +34,7 @@ import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; - - +import de.dhbwstuttgart.syntaxtree.Class; // ino.class.GenericTypeVar.26505.description type=javadoc /** * TODO: Diese Klasse überarbeiten. Pair genericTypeVar ist nicht implementiert. @@ -51,6 +50,7 @@ public class GenericTypeVar extends Type //Type genericTypeVar; //Vector extendVars = new Vector(); protected Pair genericConstraint; + private Class parent; /** * Eine Registry f�r alle Generic-Instanzen, die vor der Bytecode-Generierung durch * Ihre Superklasse ersetzt werden m�ssen. Siehe "Type Erasure" in Sun Spezifikation. @@ -77,7 +77,7 @@ public class GenericTypeVar extends Type */ // ino.method.GenericTypeVar.26509.definition - public GenericTypeVar(String s, int offset) + public GenericTypeVar(String s, Class parentClass, int offset) // ino.end // ino.method.GenericTypeVar.26509.body { @@ -102,10 +102,9 @@ public class GenericTypeVar extends Type // ino.end // ino.method.clone.26512.body { - return new GenericTypeVar(this.getName().toString(),getOffset()); + return new GenericTypeVar(this.getName().toString(), this.getParentClass(), getOffset()); } // ino.end - // ino.method.equals.26515.defdescription type=javadoc /** @@ -225,6 +224,10 @@ public class GenericTypeVar extends Type public int getEndOffset() { return this.getOffset() + this.name.toString().length(); } + + public Class getParentClass() { + return this.parent; + } } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index 66ae481c..bbf164e9 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -8,8 +8,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.JVMCode; -import mycompiler.myexception.SCException; import mycompiler.mytypereconstruction.CSubstitutionGenVar; import mycompiler.mytypereconstruction.set.CSubstitutionSet; @@ -30,7 +28,11 @@ import org.apache.log4j.Logger; + + +import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.myexception.SCException; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; @@ -644,6 +646,7 @@ public class RefType extends Type implements IMatchable } // ino.end + /* // ino.method.modifyToGenericTypeVar.26694.definition public GenericTypeVar modifyToGenericTypeVar(TypeInsertable parent) // ino.end @@ -652,6 +655,7 @@ public class RefType extends Type implements IMatchable return new GenericTypeVar(this.name.toString(),getOffset()); } // ino.end + */ // ino.method.getSimpleName.26697.defdescription type=javadoc /** diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Type.java b/src/de/dhbwstuttgart/syntaxtree/type/Type.java index 6dc59014..3573d308 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Type.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Type.java @@ -5,15 +5,15 @@ package de.dhbwstuttgart.syntaxtree.type; import java.util.ArrayList; import java.util.Vector; +import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.parser.JavaClassName; -import mycompiler.mybytecode.JVMCode; diff --git a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java index 6cb026fa..d07ab2c0 100755 --- a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java +++ b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java @@ -4,10 +4,6 @@ import java.util.Iterator; import java.util.Vector; import de.dhbwstuttgart.syntaxtree.type.Pair; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CVectorSet; public class ConstraintsSet implements Iterable{ private Vector constraintsSet; diff --git a/src/de/dhbwstuttgart/typeinference/FunNInterface.java b/src/de/dhbwstuttgart/typeinference/FunNInterface.java index d9226f4f..b19ddc02 100644 --- a/src/de/dhbwstuttgart/typeinference/FunNInterface.java +++ b/src/de/dhbwstuttgart/typeinference/FunNInterface.java @@ -26,10 +26,10 @@ public class FunNInterface extends Class{ public FunNInterface(int N) { super("Fun"+N, 0); Vector paralist = new Vector(); - paralist.add(new GenericTypeVar("R",0)); + paralist.add(new GenericTypeVar("R",this, 0)); //paralist.add(TypePlaceholder.fresh()); for(int i = 1; i<=N;i++){ - paralist.add(new GenericTypeVar("T"+i,0)); + paralist.add(new GenericTypeVar("T"+i,this, 0)); //paralist.add(TypePlaceholder.fresh()); } this.set_ParaList(paralist); diff --git a/src/de/dhbwstuttgart/typeinference/SingleConstraint.java b/src/de/dhbwstuttgart/typeinference/SingleConstraint.java index b6bf0d2a..59062d29 100755 --- a/src/de/dhbwstuttgart/typeinference/SingleConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/SingleConstraint.java @@ -9,8 +9,7 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CTripleSet; + /** * Beschreibung von Herrn Plümicke: @@ -52,11 +51,11 @@ public class SingleConstraint extends UndConstraint{ //Hier werden die GTVs zu TPH gewandelt. - if(p1 instanceof RefType)((RefType)p1).GTV2TPH(); - if(p2 instanceof RefType)((RefType)p2).GTV2TPH(); + //if(p1 instanceof RefType)((RefType)p1).GTV2TPH(); + //if(p2 instanceof RefType)((RefType)p2).GTV2TPH(); - if((p1 instanceof GenericTypeVar))p1 = ((GenericTypeVar)p1).getTypePlaceHolder();//throw new DebugException("GenericTypeVar sind in den Constraints nicht erlaubt");// - if((p2 instanceof GenericTypeVar))p2 = ((GenericTypeVar)p2).getTypePlaceHolder();//throw new DebugException("GenericTypeVar sind in den Constraints nicht erlaubt");// + //if((p1 instanceof GenericTypeVar))p1 = ((GenericTypeVar)p1).getTypePlaceHolder();//throw new DebugException("GenericTypeVar sind in den Constraints nicht erlaubt");// + //if((p2 instanceof GenericTypeVar))p2 = ((GenericTypeVar)p2).getTypePlaceHolder();//throw new DebugException("GenericTypeVar sind in den Constraints nicht erlaubt");// // BaseTypes werden in RefTypes umgewandelt. Constraints dürfen nur RefTypes oder TypePlaceholder enthalten, da sonst der Unify-Algorithmus nicht funktioniert. if(!(p1 instanceof RefType) && !(p1 instanceof TypePlaceholder) && !(p1 instanceof GenericTypeVar))p1 = new RefType(p1); diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java index c1ada889..bd6c1399 100644 --- a/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java @@ -15,7 +15,7 @@ public class GenericVarAssumption extends Assumption{ this.genericVar = genericVar; } - public Type getAssumedType() { + public GenericTypeVar getAssumedType() { return genericVar;//new RefType(this.getIdentifier(), -1); } diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index e5e429ec..f7609191 100755 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -315,13 +315,19 @@ public class TypeAssumptions { //Auch die generischen Variablen durchsuchen: for(GenericVarAssumption ass : this.genericVarAssumptions){ //if(ass.inheritsType(t))return t; - if(ass.getIdentifier().equals(t.getName()))return ass.getAssumedType(); + if(ass.getIdentifier().equals(t.getName())){ + if(! ass.getAssumedType().getParentClass().getName().equals(this.thisClassName)){ + //Ist die Generische Variable nicht aus dieser Klasse, so muss sie zu einem TPH umgewandelt werden: + + } + return ass.getAssumedType(); + } } //return null; throw new TypeinferenceException("Der Typ "+t.getName()+" ist nicht korrekt",inNode); } - + /** * Fügt eine TypAssumption an. * Dadurch wird ein Pool von Typen aufgebaut, welche überhaupt erlaubt sind. @@ -347,6 +353,10 @@ public class TypeAssumptions { return null; } + /** + * Fügt eine Generische Typvariablen den Assumptions hinzu + * @param genericTypeVar + */ public void addGenericVarAssumption( GenericTypeVar genericTypeVar) { //TODO: Hier müssen alle Bounds einzeln geaddet werden. Die Bounds müssen hierbei nicht gespeichert werden, deren Constraints generiert die TYPE-Methode der GenericVarDeclarations diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java index 3ca8b8a6..607328c7 100644 --- a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java +++ b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java @@ -11,7 +11,6 @@ package de.dhbwstuttgart.typeinference.parser; import java.util.Vector; import de.dhbwstuttgart.core.AClassOrInterface; -import de.dhbwstuttgart.core.SourceFile; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; import de.dhbwstuttgart.syntaxtree.Constant; @@ -22,8 +21,11 @@ import de.dhbwstuttgart.syntaxtree.FieldDeclaration; import de.dhbwstuttgart.syntaxtree.FormalParameter; import de.dhbwstuttgart.syntaxtree.GenericDeclarationList; import de.dhbwstuttgart.syntaxtree.ImportDeclarations; +import de.dhbwstuttgart.syntaxtree.Interface; +import de.dhbwstuttgart.syntaxtree.InterfaceBody; import de.dhbwstuttgart.syntaxtree.Method; import de.dhbwstuttgart.syntaxtree.ParameterList; +import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.operator.AndOp; @@ -96,8 +98,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Void; import de.dhbwstuttgart.syntaxtree.type.WildcardType; -import mycompiler.myinterface.Interface; -import mycompiler.myinterface.InterfaceBody; import mycompiler.mymodifier.Abstract; import mycompiler.mymodifier.Final; import mycompiler.mymodifier.Modifier; diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay index 764a4dd0..703c7505 100755 --- a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay +++ b/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay @@ -563,7 +563,7 @@ paralist : IDENTIFIER ParaList pl = new ParaList(); /* #JB# 05.04.2005 */ /* ########################################################### */ - pl.getParalist().addElement(new GenericTypeVar($1.getLexem(), $1.getOffset())); + pl.getParalist().addElement(new GenericTypeVar($1.getLexem(),null, $1.getOffset())); //pl.getParalist().addElement( new TypePlaceholder($1.getLexem()) ); /* ########################################################### */ org.apache.log4j.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + $1.getLexem() + " TV"); @@ -589,7 +589,7 @@ paralist : IDENTIFIER /* #JB# 05.04.2005 */ /* ########################################################### */ - $1.getParalist().addElement(new GenericTypeVar($3.getLexem(),$3.getOffset())); + $1.getParalist().addElement(new GenericTypeVar($3.getLexem(), null,$3.getOffset())); //$1.getParalist().addElement(new TypePlaceholder($3.getLexem())); /* ########################################################### */ org.apache.log4j.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER --> Paralist f�r " + $3.getLexem() + ": TV"); @@ -1057,11 +1057,11 @@ boundedClassParameters : boundedClassParameter // returns GenericTypeVar boundedMethodParameter : IDENTIFIER { - $$=new GenericTypeVar($1.getLexem(),$1.getOffset()); + $$=new GenericTypeVar($1.getLexem(),null,$1.getOffset()); } | IDENTIFIER EXTENDS boundedclassidentifierlist { - BoundedGenericTypeVar gtv=new BoundedGenericTypeVar($1.getLexem(), $3, $1.getOffset() ,$3.getEndOffset()); + BoundedGenericTypeVar gtv=new BoundedGenericTypeVar($1.getLexem(), $3,null, $1.getOffset() ,$3.getEndOffset()); //gtv.setBounds($3); $$=gtv; } diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java b/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java index 5939a91b..36fef504 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.Vector; import de.dhbwstuttgart.core.IItemWithOffset; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java index 54ad0c1a..ad644975 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java @@ -3,9 +3,9 @@ package de.dhbwstuttgart.typeinference.typedeployment; import java.util.Vector; import de.dhbwstuttgart.core.IItemWithOffset; -import de.dhbwstuttgart.core.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.Field; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.GenericTypeInsertable; import de.dhbwstuttgart.typeinference.JavaCodeResult; diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java index 5d939f3c..ba32076d 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java @@ -8,7 +8,7 @@ import java.util.Vector; import org.apache.log4j.Logger; import de.dhbwstuttgart.core.IItemWithOffset; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index 0e87ee83..5f0ca048 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -8,14 +8,14 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.MatchException; -import mycompiler.myexception.SCException; import mycompiler.mytypereconstruction.set.CSubstitutionSet; import org.apache.log4j.Logger; import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.myexception.MatchException; +import de.dhbwstuttgart.myexception.SCException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.CRefTypeSet; diff --git a/src/mycompiler/mytest/APITest.java b/src/mycompiler/mytest/APITest.java deleted file mode 100755 index 947e6405..00000000 --- a/src/mycompiler/mytest/APITest.java +++ /dev/null @@ -1,18 +0,0 @@ -package mycompiler.mytest; - -import de.dhbwstuttgart.core.MyCompiler; -import de.dhbwstuttgart.core.MyCompilerAPI; - -public class APITest { - - /** - * @param args - */ - public static void main(String[] args) { - // TODO Auto-generated method stub - - MyCompilerAPI m_compilerApi = MyCompiler.getAPI(); - m_compilerApi.init(); - } - -} diff --git a/src/mycompiler/mytest/LambdaTest.java b/src/mycompiler/mytest/LambdaTest.java deleted file mode 100755 index f1c61f27..00000000 --- a/src/mycompiler/mytest/LambdaTest.java +++ /dev/null @@ -1,206 +0,0 @@ -package mycompiler.mytest; - -import static org.junit.Assert.*; - -import java.io.File; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Vector; - -import org.apache.log4j.Appender; -import org.apache.log4j.ConsoleAppender; -import org.apache.log4j.FileAppender; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.apache.log4j.PatternLayout; -import org.apache.log4j.SimpleLayout; - -import de.dhbwstuttgart.core.MyCompiler; -import de.dhbwstuttgart.core.MyCompilerAPI; -import de.dhbwstuttgart.syntaxtree.type.Type; -import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; -import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; -import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import mycompiler.mytypereconstruction.CSubstitution; - -public class LambdaTest { - - protected static Logger inferencelog = Logger.getLogger("Typeinference"); - - private static final String directory = System.getProperty("user.dir")+"/test/mycompiler/test/lambda/"; - - // Logfiles werden im Ordner testResults gespeichert - public final String LOG_FILENAME = directory+"testResults/"+ "LambdaTest.log"; - - private Vector filenames; - - public static void main(String[] args){ - try { - new LambdaTest(args[0]).runTest(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private LambdaTest setUp() throws Exception{ - // Setup fuer Log4J - - File f = new File(LOG_FILENAME); // Altes Logfile loeschen - f.delete(); - - // Ausgabeoptionen fuer die Logger - PatternLayout pl = new PatternLayout("%-15C{1} %-5p [%-9c] %m%n"); - FileAppender fa = new FileAppender(pl, LOG_FILENAME); - - // Die Einstellungen jedes Loggers veraendern - //ModifyLogger("parser", Level.ALL, fa); - //ModifyLogger("inference", Level.ALL, fa); - ModifyLogger("Typeinference", Level.ALL, fa); //Alle Messages von inference in die Datei schreiben. - ConsoleAppender logAppender = new ConsoleAppender(new SimpleLayout()); - logAppender.setTarget("System.out"); - logAppender.activateOptions(); - inferencelog.addAppender(logAppender); //Bei den Tests wird der Log auch in System.out geschrieben. - //ModifyLogger("codegen", Level.ALL, fa); - //ModifyLogger("bytecode", Level.ALL, fa); - return this; - } - - public LambdaTest(String testfile){ - this(new Vector()); - filenames.add(directory + testfile); - } - - public LambdaTest(Vector testfiles) { - if(filenames == null)filenames = new Vector(); - for(String filename : testfiles){ - filenames.add(directory + filename); - } - try { - this.setUp(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - - /** - * Führt einen Test aus, bei dem beliebig viele ResultSets entstehen dürfen. - * Anschließend werden die Typen in der Klasse classname nach den in der HashMap variableTypeAssumptions angegebenen Annahmen geprüft. - * Diesen Test muss jedes der ermittelten ResultSets bestehen. - * @param classname - * @param variableTypeAssumptions - */ - public void runTestAndCheckResultSet(String classname, HashMap variableTypeAssumptions){ - Vector result = this.runTest(); - if(result.size()==0)fail("Keine Lösung!"); - for(TypeinferenceResultSet result1 : result){ - TypeAssumptions assumptions = result1.getInterferedClass().getPublicFieldAssumptions();// TypeAssumptions.getAssumptionsFor(classname); - assertTrue("Fehler in Methode TypeAssumptions.getAssumptionsFor", assumptions!=null); - for(String variable : variableTypeAssumptions.keySet()){ - Type assumedType = assumptions.getVarType(variable, result1.getInterferedClass()); - assertTrue("Der Variable muss ein TPH zugewiesen sein.", assumedType!=null && assumedType instanceof TypePlaceholder); - //AssumedType auflösen: - - String assumedTypeString = result1.getTypeOfPlaceholder((TypePlaceholder)assumedType).printJavaCode(result1.getUnifiedConstraints()).toString(); - assertTrue("Die Variable "+variable+" muss vom Typ "+variableTypeAssumptions.get(variable)+" anstatt "+assumedTypeString+" sein", - assumedTypeString.equals(variableTypeAssumptions.get(variable))); - } - } - } - - /** - * Führt den Test aus und geht davon aus, dass es bei der Testdatei nur eine richtige Auflösung für die Typvariablen gibt. - * Diese eine Lösung wird zurückgegeben. - * @return - */ - public TypeinferenceResultSet runTestAndGetSingularResultSet(){ - Vector result = this.runTest(); - assertTrue("ResultSet muss genau 1 Element enthalten", result.size()==1); - TypeinferenceResultSet result1 = result.get(0); - - return result1; - } - - - public Vector runTest() - { - - //String[] arguments = new String[1]; - //arguments[0]="/home/janulrich/workspace/JavaCompilerCore/test/LampdaExpressions/general.java"; - //MyCompiler.main(arguments); - Vector resultSet = new Vector(); - - MyCompilerAPI compiler = MyCompiler.getAPI(); - try{ - ///////////////////////// - // Parsen: - ///////////////////////// - //compiler.parse(new File(filename)); - compiler.parse(filenames); - //SourceFile tree = compiler.getSyntaxTree(); - - ///////////////////////// - // Typrekonstruktion: - ///////////////////////// - try{ - resultSet = compiler.typeReconstruction(); - }catch(TypeinferenceException texc){ - texc.printStackTrace(); - fail("Fehler bei Typinferenzalgorithmus. Message: "+texc.getMessage()); - } - - return resultSet; - //System.out.println(resultSet); - ///////////////////////// - // Ausgabe: - /////////////////////// - // - /* - CTypeReconstructionResult onePossibility = resultSet.firstElement(); - Iterator substIt = onePossibility.getSubstitutions().getIterator(); - while(substIt.hasNext()){ - CSubstitution subst = (CSubstitution)substIt.next(); - Vector lineNumbers = ((TypePlaceholder)subst.getTypeVar()).getLineNumbers(); - String s = new String(); - for(int l=0; l - * Liefert die aktuelle Zeit in Langformat zurück. - * - * @return Zeit in Langformat als String - */ - // ino.end - - // ino.attribute.inferencelog.26874.declaration - protected static Logger inferencelog = Logger.getLogger("inference"); - // ino.end - - // ino.method.time.26877.definition - public static String time() - // ino.end - // ino.method.time.26877.body - { - DateFormat longTime = DateFormat.getTimeInstance(DateFormat.LONG); - return longTime.format(new Date()); - } - // ino.end - - // ino.method.print.26880.defdescription type=javadoc - /** - * Author: Jörg Bäuerle
- * Gibt einen String aus. - * - * @param s Der auszugebende String - */ - // ino.end - // ino.method.print.26880.definition - public static void print(String s) - // ino.end - // ino.method.print.26880.body - { - inferencelog.debug("TypeReconstruction@"+CHelper.time()+"> "+s); - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/CIntersectionType.java b/src/mycompiler/mytypereconstruction/CIntersectionType.java deleted file mode 100755 index 7773f372..00000000 --- a/src/mycompiler/mytypereconstruction/CIntersectionType.java +++ /dev/null @@ -1,127 +0,0 @@ -// ino.module.CIntersectionType.8682.package -package mycompiler.mytypereconstruction; -// ino.end - -// ino.module.CIntersectionType.8682.import -import java.util.Vector; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; -import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; -// ino.end - -// ino.class.CIntersectionType.26883.description type=javadoc -/** - * Ein CIntersectionType gruppiert alle Typmglichkeiten einer - * bestimmten Methode, die ber den CMethodKey eindeutig definiert - * ist.

Bei der bisherigen Implementierung enthlt IntersectionType jedoch - * nur eine - * einzige Typmglichkeit, d.h. der Vector - * m_MethodTypeAssumptions enthlt stets nur ein einziges Element.
- * Der Grund hierfr ist in der Kopplung der Typannahmen fr die einzelnen Methoden, - * d.h. der Typkombinationen, begrndet. Diese Kopplung von Methoden wird bisher ber - * die getrennten Mengen von CTypeReconstructionResults realisiert. - * @author Jrg Buerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CIntersectionType.26883.declaration -public class CIntersectionType -// ino.end -// ino.class.CIntersectionType.26883.body -{ - // ino.attribute.m_IntersectionTypeKey.26886.declaration - private CMethodKey m_IntersectionTypeKey; - // ino.end - // ino.attribute.m_MethodTypeAssumptions.26889.declaration - private Vector m_MethodTypeAssumptions; - // ino.end - - // ino.method.CIntersectionType.26892.definition - public CIntersectionType(String className, String methodIdentifier, int methodParaCount, int methodOverloadedID) - // ino.end - // ino.method.CIntersectionType.26892.body - { - m_IntersectionTypeKey = new CMethodKey(className, methodIdentifier, methodParaCount, methodOverloadedID); - m_MethodTypeAssumptions = new Vector(); - } - // ino.end - - // ino.method.CIntersectionType.26895.definition - public CIntersectionType(CMethodTypeAssumption assum) - // ino.end - // ino.method.CIntersectionType.26895.body - { - this(assum.getClassName(), assum.getIdentifier(), assum.getParaCount(),assum.getOverloadedMethodID()); - this.addMethodTypeAssumption(assum); - } - // ino.end - - // ino.method.getIntersectionTypeKey.26898.definition - public CMethodKey getIntersectionTypeKey() - // ino.end - // ino.method.getIntersectionTypeKey.26898.body - { - return m_IntersectionTypeKey; - } - // ino.end - - // ino.method.setIntersectionTypeKey.26901.definition - public void setIntersectionTypeKey(CMethodKey intersectionTypeKey) - // ino.end - // ino.method.setIntersectionTypeKey.26901.body - { - m_IntersectionTypeKey = intersectionTypeKey; - } - // ino.end - - // ino.method.getMethodTypeAssumptions.26904.definition - public Vector getMethodTypeAssumptions() - // ino.end - // ino.method.getMethodTypeAssumptions.26904.body - { - return m_MethodTypeAssumptions; - } - // ino.end - - // ino.method.setMethodTypeAssumptions.26907.definition - public void setMethodTypeAssumptions(Vector methodTypeAssumptions) - // ino.end - // ino.method.setMethodTypeAssumptions.26907.body - { - m_MethodTypeAssumptions = methodTypeAssumptions; - } - // ino.end - - // ino.method.addMethodTypeAssumption.26910.definition - public void addMethodTypeAssumption(CMethodTypeAssumption assum) - // ino.end - // ino.method.addMethodTypeAssumption.26910.body - { - m_MethodTypeAssumptions.addElement(assum); - } - // ino.end - - // ino.method.removeMethodTypeAssumption.26913.definition - public void removeMethodTypeAssumption(CMethodTypeAssumption assum) - // ino.end - // ino.method.removeMethodTypeAssumption.26913.body - { - m_MethodTypeAssumptions.removeElement(assum); - } - // ino.end - - // ino.method.toString.26916.defdescription type=javadoc - /** - *
Author: Jrg Buerle - * @return - */ - // ino.end - // ino.method.toString.26916.definition - public String toString() - // ino.end - // ino.method.toString.26916.body - { - return m_MethodTypeAssumptions.toString(); - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/CMultiplyTuple.java b/src/mycompiler/mytypereconstruction/CMultiplyTuple.java deleted file mode 100755 index 1a386ee0..00000000 --- a/src/mycompiler/mytypereconstruction/CMultiplyTuple.java +++ /dev/null @@ -1,218 +0,0 @@ -// ino.module.CMultiplyTuple.8683.package -package mycompiler.mytypereconstruction; -// ino.end - -// ino.module.CMultiplyTuple.8683.import -import java.util.Iterator; -import java.util.Vector; - -import de.dhbwstuttgart.syntaxtree.type.Type; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -// ino.end - -// ino.class.CMultiplyTuple.26919.description type=javadoc -/** - * Container-Klasse für Ergebniswerte der Algorithmen TRTuple und TRMultiply. - * (siehe Algorithmen 5.28 ff, Martin Plümicke) - * @author Jörg Bäuerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CMultiplyTuple.26919.declaration -public class CMultiplyTuple -// ino.end -// ino.class.CMultiplyTuple.26919.body -{ - // ino.attribute.m_Substitutions.26922.declaration - private CSubstitutionSet m_Substitutions = null; - // ino.end - // ino.attribute.m_ResultTypes.26925.declaration - private Vector m_ResultTypes = null; - // ino.end - // ino.attribute.m_AssumptionSet.26928.declaration - private CTypeAssumptionSet m_AssumptionSet = null; - // ino.end - - // ino.method.CMultiplyTuple.26931.defdescription type=javadoc - /** - * Author: Jörg Bäuerle
- * - */ - // ino.end - // ino.method.CMultiplyTuple.26931.definition - public CMultiplyTuple() - // ino.end - // ino.method.CMultiplyTuple.26931.body - { - m_Substitutions = new CSubstitutionSet(); - m_ResultTypes = new Vector(); - m_AssumptionSet = new CTypeAssumptionSet(); - } - // ino.end - - // ino.method.CMultiplyTuple.26934.definition - public CMultiplyTuple(CSubstitutionSet substitutions, Vector resultTypes, CTypeAssumptionSet assumptionSet) - // ino.end - // ino.method.CMultiplyTuple.26934.body - { - m_Substitutions = substitutions; - m_ResultTypes = resultTypes; - m_AssumptionSet = assumptionSet; - } - // ino.end - - - // ino.method.getAssumptionSet.26937.defdescription type=javadoc - /** - * Author: Jörg Bäuerle
- * @return Returns the AssumptionSet. - */ - // ino.end - // ino.method.getAssumptionSet.26937.definition - public CTypeAssumptionSet getAssumptionSet() - // ino.end - // ino.method.getAssumptionSet.26937.body - { - return m_AssumptionSet; - } - // ino.end - - // ino.method.setAssumptionSet.26940.defdescription type=javadoc - /** - * Author: Jörg Bäuerle
- * @param assumptionSet The AssumptionSet to set. - */ - // ino.end - // ino.method.setAssumptionSet.26940.definition - public void setAssumptionSet(CTypeAssumptionSet assumptionSet) - // ino.end - // ino.method.setAssumptionSet.26940.body - { - m_AssumptionSet = assumptionSet; - } - // ino.end - - // ino.method.getResultTypes.26943.defdescription type=javadoc - /** - * Author: Jörg Bäuerle
- * @return Returns the ResultTypes. - */ - // ino.end - // ino.method.getResultTypes.26943.definition - public Vector getResultTypes() - // ino.end - // ino.method.getResultTypes.26943.body - { - return m_ResultTypes; - } - // ino.end - - // ino.method.getResultTypeIterator.26946.definition - public Iterator getResultTypeIterator() - // ino.end - // ino.method.getResultTypeIterator.26946.body - { - return this.getResultTypes().iterator(); - } - // ino.end - - // ino.method.setResultTypes.26949.defdescription type=javadoc - /** - * Author: Jörg Bäuerle
- * @param resultType The ResultType to set. - */ - // ino.end - // ino.method.setResultTypes.26949.definition - public void setResultTypes(Vector resultTypes) - // ino.end - // ino.method.setResultTypes.26949.body - { - m_ResultTypes = resultTypes; - } - // ino.end - - // ino.method.getSubstitutions.26952.defdescription type=javadoc - /** - * Author: Jörg Bäuerle
- * @return Returns the Substitutions. - */ - // ino.end - // ino.method.getSubstitutions.26952.definition - public CSubstitutionSet getSubstitutions() - // ino.end - // ino.method.getSubstitutions.26952.body - { - return m_Substitutions; - } - // ino.end - - // ino.method.setSubstitutions.26955.defdescription type=javadoc - /** - * Author: Jörg Bäuerle
- * @param substitution The Substitutions to set. - */ - // ino.end - // ino.method.setSubstitutions.26955.definition - public void setSubstitutions(CSubstitutionSet substitutions) - // ino.end - // ino.method.setSubstitutions.26955.body - { - m_Substitutions = substitutions; - } - // ino.end - - - // ino.method.equals.26958.definition - public boolean equals(Object obj) - // ino.end - // ino.method.equals.26958.body - { - if(obj instanceof CSubstitution){ - CMultiplyTuple tup = (CMultiplyTuple)obj; - boolean ret = true; - ret &= (m_AssumptionSet.equals(tup.m_AssumptionSet)); - ret &= (m_ResultTypes.equals(tup.m_ResultTypes)); - ret &= (m_Substitutions.equals(tup.m_Substitutions)); - return ret; - } - else{ - return false; - } - } - // ino.end - - // ino.method.toString.26961.definition - public String toString() - // ino.end - // ino.method.toString.26961.body - { - StringBuffer sb = new StringBuffer(); - sb.append("MultiplyTuple (\n"); - sb.append("Substitutions:\n"); - sb.append(m_Substitutions.toString()); - sb.append(m_ResultTypes.toString()); - sb.append("\n"); - sb.append(m_AssumptionSet.toString()); - sb.append(" )"); - return sb.toString(); - } - // ino.end - - // ino.method.clone.26964.definition - public CMultiplyTuple clone() - // ino.end - // ino.method.clone.26964.body - { - CMultiplyTuple copy = new CMultiplyTuple(); - copy.setSubstitutions(m_Substitutions.deepCopy()); - Iterator typeIt = this.getResultTypeIterator(); - while(typeIt.hasNext()){ - copy.getResultTypes().addElement(typeIt.next().clone()); - } - copy.setAssumptionSet(m_AssumptionSet.deepCopy()); - return copy; - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/CReconstructionTuple.java b/src/mycompiler/mytypereconstruction/CReconstructionTuple.java deleted file mode 100755 index 0b5c6fdf..00000000 --- a/src/mycompiler/mytypereconstruction/CReconstructionTuple.java +++ /dev/null @@ -1,133 +0,0 @@ -// ino.module.CReconstructionTuple.8684.package -package mycompiler.mytypereconstruction; -// ino.end - -// ino.module.CReconstructionTuple.8684.import -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -// ino.end - - -// ino.class.CReconstructionTuple.26967.description type=javadoc -/** - * Container-Klasse für Ergebniswerte des Algorithmus TRStart. - * (siehe Algorithmus 5.18 TRStart, Martin Plümicke) - * @author Jörg Bäuerle - * @version $date - */ -// ino.end -// ino.class.CReconstructionTuple.26967.declaration -public class CReconstructionTuple -// ino.end -// ino.class.CReconstructionTuple.26967.body -{ - // ino.attribute.m_SubSet.26970.declaration - private CSubstitutionSet m_SubSet; - // ino.end - // ino.attribute.m_AssumSet.26973.declaration - private CTypeAssumptionSet m_AssumSet; - // ino.end - - // ino.method.CReconstructionTuple.26976.definition - public CReconstructionTuple() - // ino.end - // ino.method.CReconstructionTuple.26976.body - { - this(new CSubstitutionSet(), new CTypeAssumptionSet()); - } - // ino.end - - // ino.method.CReconstructionTuple.26979.definition - public CReconstructionTuple(CSubstitutionSet subSet, CTypeAssumptionSet assumSet) - // ino.end - // ino.method.CReconstructionTuple.26979.body - { - m_SubSet = subSet; - m_AssumSet = assumSet; - } - // ino.end - - // ino.method.getAssumSet.26982.definition - public CTypeAssumptionSet getAssumSet() - // ino.end - // ino.method.getAssumSet.26982.body - { - return m_AssumSet; - } - // ino.end - - // ino.method.setAssumSet.26985.definition - public void setAssumSet(CTypeAssumptionSet assumSet) - // ino.end - // ino.method.setAssumSet.26985.body - { - m_AssumSet = assumSet; - } - // ino.end - - // ino.method.getSubSet.26988.definition - public CSubstitutionSet getSubSet() - // ino.end - // ino.method.getSubSet.26988.body - { - return m_SubSet; - } - // ino.end - - // ino.method.setSubSet.26991.definition - public void setSubSet(CSubstitutionSet subSet) - // ino.end - // ino.method.setSubSet.26991.body - { - m_SubSet = subSet; - } - // ino.end - - // ino.method.equals.26994.definition - public boolean equals(Object obj) - // ino.end - // ino.method.equals.26994.body - { - if(obj instanceof CReconstructionTuple){ - CReconstructionTuple tuple = (CReconstructionTuple)obj; - boolean ret = true; - ret &= (m_SubSet.equals(tuple.m_SubSet)); - ret &= (m_AssumSet.equals(tuple.m_AssumSet)); - return ret; - } - else{ - return false; - } - } - // ino.end - - // ino.method.toString.26997.definition - public String toString() - // ino.end - // ino.method.toString.26997.body - { - StringBuffer sb = new StringBuffer(); - sb.append("ReconstructionTuple (\n"); - sb.append("Substitutions:\n"); - sb.append(m_SubSet.toString()); - sb.append("\n"); - sb.append("Assumptions:\n"); - sb.append(m_AssumSet.toString()); - sb.append("\n)"); - return sb.toString(); - } - // ino.end - - // ino.method.clone.27000.definition - public CReconstructionTuple clone() - // ino.end - // ino.method.clone.27000.body - { - CReconstructionTuple copy = new CReconstructionTuple(); - copy.setSubSet(m_SubSet.deepCopy()); - copy.setAssumSet(m_AssumSet.deepCopy()); - return copy; - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/CSubstitution.java b/src/mycompiler/mytypereconstruction/CSubstitution.java deleted file mode 100755 index c5a749e8..00000000 --- a/src/mycompiler/mytypereconstruction/CSubstitution.java +++ /dev/null @@ -1,272 +0,0 @@ -// ino.module.CSubstitution.8685.package -package mycompiler.mytypereconstruction; -// ino.end - -// ino.module.CSubstitution.8685.import -import java.util.Iterator; -import java.util.Vector; - -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; - -import org.apache.log4j.Logger; -// ino.end - -import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; -import de.dhbwstuttgart.syntaxtree.type.RefType; -import de.dhbwstuttgart.syntaxtree.type.Type; -import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; - -// ino.class.CSubstitution.27003.description type=javadoc -/** - * Implementierung einer Typsubstitution. Bildet eine zu ersetzende - * TypePlaceholder auf einen Substitutions-Typ ab. Instanzen dieser - * Klasse werden in der Regel aus - * Pair-Objekten erzeugt. - * @author J�rg B�uerle - * @version $Date: 2006/07/10 11:27:04 $ - */ -// ino.end -// ino.class.CSubstitution.27003.declaration -public class CSubstitution -// ino.end -// ino.class.CSubstitution.27003.body -{ - // ino.attribute.m_TypeVar.27006.declaration - private TypePlaceholder m_TypeVar = null; - // ino.end - // ino.attribute.m_Type.27009.declaration - protected Type m_Type = null; - // ino.end - // ino.attribute.inferencelog.27012.declaration - protected static Logger inferencelog = Logger.getLogger("inference"); - // ino.end - // ino.method.CSubstitution.27015.definition - public CSubstitution() - // ino.end - // ino.method.CSubstitution.27015.body - { - this(null, null); - } - // ino.end - - // ino.method.CSubstitution.27018.definition - public CSubstitution(TypePlaceholder typeVar, Type type) - // ino.end - // ino.method.CSubstitution.27018.body - { - m_TypeVar = typeVar; - m_Type = type; - } - // ino.end - - // ino.method.CSubstitution.27021.definition - public CSubstitution(Pair unifier) - throws CTypeReconstructionException - // ino.end - // ino.method.CSubstitution.27021.body - { - if(!(unifier.TA1 instanceof TypePlaceholder)){ - throw new CTypeReconstructionException("Unifier enth�lt keinen Typeplaceholder",unifier.TA1); - } - m_TypeVar = (TypePlaceholder)unifier.TA1; - m_Type = unifier.TA2; - } - // ino.end - - - // ino.method.getType.27024.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @return Returns the Type. - */ - // ino.end - // ino.method.getType.27024.definition - public Type getType() - // ino.end - // ino.method.getType.27024.body - { - return m_Type; - } - // ino.end - - // ino.method.setType.27027.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @param type The Type to set. - */ - // ino.end - // ino.method.setType.27027.definition - public void setType(Type type) - // ino.end - // ino.method.setType.27027.body - { - m_Type = type; - } - // ino.end - - // ino.method.getTypeVar.27030.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @return Returns the TypeVar. - */ - // ino.end - // ino.method.getTypeVar.27030.definition - public Type getTypeVar() - // ino.end - // ino.method.getTypeVar.27030.body - { - return this.m_TypeVar; - } - // ino.end - - // ino.method.setTypeVar.27033.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @param typeVar The TypeVar to set. - */ - // ino.end - // ino.method.setTypeVar.27033.definition - public void setTypeVar(TypePlaceholder typeVar) - // ino.end - // ino.method.setTypeVar.27033.body - { - m_TypeVar = typeVar; - } - // ino.end - - // ino.method.equals.27036.definition - public boolean equals(Object obj) - // ino.end - // ino.method.equals.27036.body - { - if(obj instanceof CSubstitution){ - CSubstitution sub = (CSubstitution)obj; - boolean ret = true; - ret &= (m_TypeVar.equals(sub.m_TypeVar)); - ret &= (m_Type.equals(sub.m_Type)); - return ret; - } - else{ - return false; - } - } - // ino.end - - // ino.method.toString.27039.definition - public String toString() - // ino.end - // ino.method.toString.27039.body - { - //return m_TypeVar.getName() +" --> "+m_Type.getName(); - return m_TypeVar.toString() +" --> "+m_Type.toString(); - } - // ino.end - - // ino.method.clone.27042.definition - public CSubstitution clone() - // ino.end - // ino.method.clone.27042.body - { - CSubstitution copy = new CSubstitution(m_TypeVar.clone(), m_Type.clone()); - return copy; - } - // ino.end - - // ino.method.execute.27045.defdescription type=javadoc - /** - * Sucht die eindeutige Instanz der Typeplaceholders in der Registry der - * Typeplaceholders des Syntaxbaumes und f�hrt die Typsubstitution im - * Syntaxbaum durch. - *
Author: J�rg B�uerle - * wenn die TypePlaceholder nicht in der Registry gefunden wurde. - * @throws CTypeReconstructionException Falls TypePlaceholder nicht in Registry - * gefunden wird. - */ - // ino.end - // ino.method.execute.27045.definition - public void execute() - throws CTypeReconstructionException - // ino.end - // ino.method.execute.27045.body - { - TypePlaceholder uniqueVar = TypePlaceholder.getInstance(m_TypeVar.getName().toString()); - if(uniqueVar==null){ - throw new CTypeReconstructionException("CSubstitution.execute(): TypePlaceholder \""+m_TypeVar.getName()+"\" wurde nicht in der Registry gefunden!",null); - } - inferencelog.debug("F�hre Substitution aus: "+this.toString()); - uniqueVar.replaceWithType(m_Type); - } - // ino.end - - // ino.method.applyUnifier.27048.defdescription type=javadoc - /** - * Wendet den Unifier auf die rechte Seite dieser Substitution an. - *
Author: J�rg B�uerle - * @param unifier - */ - // ino.end - // ino.method.applyUnifier.27048.definition - public void applyUnifier(CSubstitutionSet unifier) - // ino.end - // ino.method.applyUnifier.27048.body - { - Iterator pairIt = unifier.getIterator(); - while(pairIt.hasNext()){ - CSubstitution subst = (CSubstitution)pairIt.next(); - - //korrigiert PL 05-07-31 das erste duerfte doch richtig sein. - //subst.setType(this.applySubstitution(subst.getType(), subst)); - this.setType(this.applySubstitution(this.getType(), subst)); - } - - } - // ino.end - - // ino.method.applySubstitution.27051.defdescription type=javadoc - /** - * Wendet die �bergebene Substitution rekursiv auf den �bergebenen Typ an. - *
Author: J�rg B�uerle - * @param type Der zu untersuchende Typ - * @param unifierSub Die anzuwendende Substitution - * @return Den ermittelnden Typ - */ - // ino.end - // ino.method.applySubstitution.27051.definition - private Type applySubstitution(Type type, CSubstitution unifierSub) - // ino.end - // ino.method.applySubstitution.27051.body - { - if(type instanceof TypePlaceholder){ - if(type.equals(unifierSub.getTypeVar())){ - return unifierSub.getType(); - } - } - else if(type instanceof GenericTypeVar){ - if(type.equals(unifierSub.getTypeVar())){ - return unifierSub.getType(); - } - } - else if(type instanceof RefType){ - Vector paras = ((RefType)type).get_ParaList(); - if(paras != null){ - for(int i=0; iTypePlaceholder auf einen Substitutions-Typ ab. Instanzen dieser - * Klasse werden in der Regel aus - * Pair-Objekten erzeugt. - * @author Martin Pl�micke - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CSubstitutionGenVar.27057.declaration -public class CSubstitutionGenVar extends CSubstitution -// ino.end -// ino.class.CSubstitutionGenVar.27057.body -{ - // ino.attribute.m_TypeVar.27061.declaration - private GenericTypeVar m_TypeVar = null; - // ino.end - - // ino.method.CSubstitutionGenVar.27064.definition - public CSubstitutionGenVar() - // ino.end - // ino.method.CSubstitutionGenVar.27064.body - { - this(null, null); - } - // ino.end - - // ino.method.CSubstitutionGenVar.27067.definition - public CSubstitutionGenVar(GenericTypeVar typeVar, Type type) - // ino.end - // ino.method.CSubstitutionGenVar.27067.body - { - m_TypeVar = typeVar; - m_Type = type; - } - // ino.end - - // ino.method.getTypeVar.27070.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @return Returns the TypeVar. - */ - // ino.end - // ino.method.getTypeVar.27070.definition - public Type getTypeVar() - // ino.end - // ino.method.getTypeVar.27070.body - { - return this.m_TypeVar; - } - // ino.end - - // ino.method.toString.27073.definition - public String toString() - // ino.end - // ino.method.toString.27073.body - { - return this.m_TypeVar.getName() +" --> "+this.m_Type.getName(); - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/CSupportData.java b/src/mycompiler/mytypereconstruction/CSupportData.java deleted file mode 100755 index 7ddb28cc..00000000 --- a/src/mycompiler/mytypereconstruction/CSupportData.java +++ /dev/null @@ -1,346 +0,0 @@ -// ino.module.CSupportData.8687.package -package mycompiler.mytypereconstruction; -// ino.end - -// ino.module.CSupportData.8687.import -import java.util.Vector; - -import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.RefType; -import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import de.dhbwstuttgart.typeinference.unify.FC_TTO; - -// ino.class.CSupportData.27076.description type=javadoc -/** - * Container-Klasse fr bestimmte Hilfsdaten, die beim - * Typrekonstruktionsalgorithmus bentigt und deshalb - * rekursiv weiter gereicht werden. - * @author Jrg Buerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CSupportData.27076.declaration -public class CSupportData -// ino.end -// ino.class.CSupportData.27076.body -{ - // ino.attribute.NO_METHOD.27079.decldescription type=javadoc - /** - * Gibt Namensstring fr den Classbody auerhalb einer Methode - * fr m_CurrentMethod. - */ - // ino.end - // ino.attribute.NO_METHOD.27079.declaration - public static final String NO_METHOD = "#nomethod#"; - // ino.end - - // ino.attribute.m_FiniteClosure.27082.declaration - private FC_TTO m_FiniteClosure; - // ino.end - // ino.attribute.m_A.27085.declaration - private Vector m_A; - // ino.end - // ino.attribute.m_CurrentClass.27088.declaration - private String m_CurrentClass; - // ino.end - // ino.attribute.m_CurrentClassPara.27091.declaration - private Vector m_CurrentClassPara; - // ino.end - // ino.attribute.m_CurrentMethod.27094.declaration - private String m_CurrentMethod; - // ino.end - // ino.attribute.m_CurrentMethodParaCount.27097.declaration - private int m_CurrentMethodParaCount; - // ino.end - // ino.attribute.m_BlockIdList.27100.declaration - private Vector m_BlockIdList; - // ino.end - // ino.attribute.m_CurrentBlockDepth.27103.declaration - private int m_CurrentBlockDepth; - // ino.end - - // ino.attribute.m_CurrentMethodOverloadedID.27106.declaration - private int m_CurrentMethodOverloadedID; - // ino.end - - // ino.method.CSupportData.27109.definition - public CSupportData(FC_TTO finiteClosure, Vector A, String currentClass, Vector currentClassPara) - // ino.end - // ino.method.CSupportData.27109.body - { - this(finiteClosure, A, currentClass, currentClassPara, NO_METHOD, 0, 0, new Vector(), 0); - } - // ino.end - - // ino.method.CSupportData.27112.definition - public CSupportData(FC_TTO finiteClosure, Vector A, String currentClass, Vector currentClassPara, String currentMethod, int currentMethodParaCount, int currentMethodOverloadedID, Vector blockIdList, int blockDepth) - // ino.end - // ino.method.CSupportData.27112.body - { - m_FiniteClosure = finiteClosure; - m_A = A; - m_CurrentClass = currentClass; - m_CurrentClassPara = currentClassPara; - m_CurrentMethod = currentMethod; - m_CurrentMethodParaCount = currentMethodParaCount; - m_CurrentMethodOverloadedID=currentMethodOverloadedID; - m_BlockIdList = blockIdList; - m_CurrentBlockDepth = blockDepth; - } - // ino.end - - // ino.method.getFiniteClosure.27115.definition - public FC_TTO getFiniteClosure() - // ino.end - // ino.method.getFiniteClosure.27115.body - { - return m_FiniteClosure; - } - // ino.end - - // ino.method.setFiniteClosure.27118.definition - public void setFiniteClosure(FC_TTO finiteClosure) - // ino.end - // ino.method.setFiniteClosure.27118.body - { - m_FiniteClosure = finiteClosure; - } - // ino.end - - // ino.method.getA.27121.definition - public Vector getA() - // ino.end - // ino.method.getA.27121.body - { - return m_A; - } - // ino.end - - // ino.method.setA.27124.definition - public void setA(Vector A) - // ino.end - // ino.method.setA.27124.body - { - m_A = A; - } - // ino.end - - // ino.method.getCurrentClassType.27127.definition - public RefType getCurrentClassType() - // ino.end - // ino.method.getCurrentClassType.27127.body - { - if(m_CurrentClassPara==null || m_CurrentClassPara.size()==0){ - return(new RefType(m_CurrentClass,-1)); - }else{ - return(new RefType(m_CurrentClass,m_CurrentClassPara,-1)); - } - - } - // ino.end - - // ino.method.getCurrentClass.27130.definition - public String getCurrentClass() - // ino.end - // ino.method.getCurrentClass.27130.body - { - return m_CurrentClass; - } - // ino.end - - // ino.method.setCurrentClass.27133.definition - public void setCurrentClass(String currentClass) - // ino.end - // ino.method.setCurrentClass.27133.body - { - m_CurrentClass = currentClass; - } - // ino.end - - // ino.method.getCurrentClassPara.27136.definition - public Vector getCurrentClassPara() - // ino.end - // ino.method.getCurrentClassPara.27136.body - { - return m_CurrentClassPara; - } - // ino.end - - // ino.method.setCurrentClassPara.27139.definition - public void setCurrentClassPara(Vector currentClassPara) - // ino.end - // ino.method.setCurrentClassPara.27139.body - { - m_CurrentClassPara = currentClassPara; - } - // ino.end - - // ino.method.getCurrentMethod.27142.definition - public String getCurrentMethod() - // ino.end - // ino.method.getCurrentMethod.27142.body - { - return m_CurrentMethod; - } - // ino.end - - // ino.method.setCurrentMethod.27145.definition - public void setCurrentMethod(String currentMethod) - // ino.end - // ino.method.setCurrentMethod.27145.body - { - m_CurrentMethod = currentMethod; - } - // ino.end - - // ino.method.getCurrentMethodParaCount.27148.definition - public int getCurrentMethodParaCount() - // ino.end - // ino.method.getCurrentMethodParaCount.27148.body - { - return m_CurrentMethodParaCount; - } - // ino.end - - // ino.method.setCurrentMethodParaCount.27151.definition - public void setCurrentMethodParaCount(int currentMethodParaCount) - // ino.end - // ino.method.setCurrentMethodParaCount.27151.body - { - m_CurrentMethodParaCount = currentMethodParaCount; - } - // ino.end - // ino.method.setCurrentMethodOverloadedID.27154.definition - public void setCurrentMethodOverloadedID(int currentMethodOverloadedID) - // ino.end - // ino.method.setCurrentMethodOverloadedID.27154.body - { - m_CurrentMethodOverloadedID = currentMethodOverloadedID; - } - // ino.end - - // ino.method.getBlockIdList.27157.definition - public Vector getBlockIdList() - // ino.end - // ino.method.getBlockIdList.27157.body - { - return m_BlockIdList; - } - // ino.end - - // ino.method.setBlockIdList.27160.definition - public void setBlockIdList(Vector blockId) - // ino.end - // ino.method.setBlockIdList.27160.body - { - m_BlockIdList = blockId; - } - // ino.end - - // ino.method.resetBlockId.27163.definition - public void resetBlockId() - // ino.end - // ino.method.resetBlockId.27163.body - { - m_BlockIdList = new Vector(); - m_CurrentBlockDepth = 0; - } - // ino.end - - // ino.method.getCurrentBlockDepth.27166.definition - public int getCurrentBlockDepth() - // ino.end - // ino.method.getCurrentBlockDepth.27166.body - { - return m_CurrentBlockDepth; - } - // ino.end - - // ino.method.setCurrentBlockDepth.27169.definition - public void setCurrentBlockDepth(int currentBlockDepth) - // ino.end - // ino.method.setCurrentBlockDepth.27169.body - { - m_CurrentBlockDepth = currentBlockDepth; - } - // ino.end - - // ino.method.incBlockDepth.27172.definition - public int incBlockDepth() - // ino.end - // ino.method.incBlockDepth.27172.body - { - m_CurrentBlockDepth++; - if(m_CurrentBlockDepth>m_BlockIdList.size()){ - m_BlockIdList.addElement(new Integer(0)); - } - int blockCount = m_BlockIdList.elementAt(m_CurrentBlockDepth-1).intValue(); - blockCount++; - m_BlockIdList.setElementAt(blockCount, m_CurrentBlockDepth-1); - return m_CurrentBlockDepth; - } - // ino.end - - // ino.method.decBlockDepth.27175.definition - public int decBlockDepth() - // ino.end - // ino.method.decBlockDepth.27175.body - { - if(m_CurrentBlockDepth>0){ - m_CurrentBlockDepth--; - } - return m_CurrentBlockDepth; - } - // ino.end - - // ino.method.getCurrentBlockId.27178.definition - public String getCurrentBlockId() - // ino.end - // ino.method.getCurrentBlockId.27178.body - { - return this.getBlockId(m_CurrentBlockDepth); - } - // ino.end - - // ino.method.getBlockId.27181.definition - public String getBlockId(int blockDepth) - // ino.end - // ino.method.getBlockId.27181.body - { - StringBuffer sb = new StringBuffer(); - for(int i=0; i)m_A.clone(), - m_CurrentClass, (Vector) m_CurrentClassPara.clone(), m_CurrentMethod, m_CurrentMethodParaCount,m_CurrentMethodOverloadedID, - (Vector)m_BlockIdList.clone(), m_CurrentBlockDepth - ); - return dolly; - } - // ino.end - - // ino.method.getCurrentMethodOverloadedID.27187.definition - public int getCurrentMethodOverloadedID() - // ino.end - // ino.method.getCurrentMethodOverloadedID.27187.body - { - return(m_CurrentMethodOverloadedID); - } - // ino.end - -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/CTriple.java b/src/mycompiler/mytypereconstruction/CTriple.java deleted file mode 100755 index cd525f5d..00000000 --- a/src/mycompiler/mytypereconstruction/CTriple.java +++ /dev/null @@ -1,263 +0,0 @@ -// ino.module.CTriple.8688.package -package mycompiler.mytypereconstruction; -// ino.end - -// ino.module.CTriple.8688.import -import de.dhbwstuttgart.syntaxtree.type.Type; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -// ino.end - -// ino.class.CTriple.27190.description type=javadoc -/** - * Container-Klasse f�r Ergebniswerte der Algorithmen TRStmt und TRExp. - * (siehe Algorithmus 5.20 ff TRStmt und 5.30 ff TRExp, Martin Pl�micke) - * CTriple steht genau wie CReconstructionTuple für eine mögliche Typkombination mit - * dem einzigen Unterschied, dass sie zusätzlich noch den berechneten ReturnType des aktuell - * betrachteten Blocks enthält. Bei diesem ReturnTyp kann es sich auch nur um eine Vermutung handeln. - * Die Klasse taucht meistens als CTripleSet auf. Der Inferenzalgorithmus kann dann unter den verschiedenen vorgeschlagenen ReturnTypen auswählen. - * @author J�rg B�uerle - * @version $Date: 2013/02/07 05:08:51 $ - */ -// ino.end -// ino.class.CTriple.27190.declaration -public class CTriple -// ino.end -// ino.class.CTriple.27190.body -{ - // ino.attribute.m_Substitutions.27193.declaration - private CSubstitutionSet m_Substitutions = null; - // ino.end - // ino.attribute.m_ResultType.27196.declaration - private Type m_ResultType = null; - // ino.end - // ino.attribute.m_AssumptionSet.27199.declaration - private CTypeAssumptionSet m_AssumptionSet = null; - // ino.end - - // ino.method.CTriple.27202.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * - */ - // ino.end - // ino.method.CTriple.27202.definition - public CTriple() - // ino.end - // ino.method.CTriple.27202.body - { - m_Substitutions = new CSubstitutionSet(); - m_ResultType = null; - m_AssumptionSet = new CTypeAssumptionSet(); - } - // ino.end - - /** - * - * @param substitutions - * @param resultType - * @param assumptionSet - */ - // ino.method.CTriple.27205.definition - public CTriple(CSubstitutionSet substitutions, Type resultType, CTypeAssumptionSet assumptionSet) - // ino.end - // ino.method.CTriple.27205.body - { - m_Substitutions = substitutions; - m_ResultType = resultType; - m_AssumptionSet = assumptionSet; - } - // ino.end - - - // ino.method.getAssumptionSet.27208.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @return Returns the AssumptionSet. - */ - // ino.end - // ino.method.getAssumptionSet.27208.definition - public CTypeAssumptionSet getAssumptionSet() - // ino.end - // ino.method.getAssumptionSet.27208.body - { - return m_AssumptionSet; - } - // ino.end - - // ino.method.setAssumptionSet.27211.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @param assumptionSet The AssumptionSet to set. - */ - // ino.end - // ino.method.setAssumptionSet.27211.definition - public void setAssumptionSet(CTypeAssumptionSet assumptionSet) - // ino.end - // ino.method.setAssumptionSet.27211.body - { - m_AssumptionSet = assumptionSet; - } - // ino.end - - // ino.method.getResultType.27214.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @return Returns the ResultType. - */ - // ino.end - // ino.method.getResultType.27214.definition - public Type getResultType() - // ino.end - // ino.method.getResultType.27214.body - { - return m_ResultType; - } - // ino.end - - // ino.method.setResultType.27217.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @param resultType The ResultType to set. - */ - // ino.end - // ino.method.setResultType.27217.definition - public void setResultType(Type resultType) - // ino.end - // ino.method.setResultType.27217.body - { - m_ResultType = resultType; - } - // ino.end - - // ino.method.getSubstitutions.27220.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @return Returns the Substitutions. - */ - // ino.end - // ino.method.getSubstitutions.27220.definition - public CSubstitutionSet getSubstitutions() - // ino.end - // ino.method.getSubstitutions.27220.body - { - return m_Substitutions; - } - // ino.end - - // ino.method.setSubstitutions.27223.defdescription type=javadoc - /** - * Author: J�rg B�uerle
- * @param substitution The Substitutions to set. - */ - // ino.end - // ino.method.setSubstitutions.27223.definition - public void setSubstitutions(CSubstitutionSet substitutions) - // ino.end - // ino.method.setSubstitutions.27223.body - { - m_Substitutions = substitutions; - } - // ino.end - - - // ino.method.equals.27226.definition - public boolean equals(Object obj) - // ino.end - // ino.method.equals.27226.body - { - if(obj instanceof CTriple){ - CTriple trip = (CTriple)obj; - boolean ret = true; - ret &= (m_AssumptionSet.equals(trip.m_AssumptionSet)); - ret &= (m_ResultType.equals(trip.m_ResultType)); - ret &= (m_Substitutions.equals(trip.m_Substitutions)); - return ret; - } - else{ - return false; - } - } - // ino.end - - // ino.method.toString.27229.definition - public String toString() - // ino.end - // ino.method.toString.27229.body - { - StringBuffer sb = new StringBuffer(); - sb.append("Triple (\n"); - sb.append("Substitutions:\n"); - sb.append(m_Substitutions.toString()); - sb.append("\n"); - sb.append("ResultType: "+m_ResultType.getName()); - sb.append("\n"); - sb.append("Assumptions:\n"); - sb.append(m_AssumptionSet.toString()); - sb.append(" )"); - return sb.toString(); - } - // ino.end - - // ino.method.clone.27232.definition - public CTriple clone() - // ino.end - // ino.method.clone.27232.body - { - CTriple copy = new CTriple(); - copy.setSubstitutions(m_Substitutions.deepCopy()); - copy.setResultType(m_ResultType.clone()); - copy.setAssumptionSet(m_AssumptionSet.deepCopy()); - return copy; - } - // ino.end - - // ino.method.cloneAndApplyUnify.27235.defdescription type=javadoc - /** - * Kopiert dieses Triple und wendet alle Substitutionen eines Unifiers auf - * die Kopie an. - *
Author: J�rg B�uerle - * @param unifier - * @return Die Kopie nach Anwendung des Unifiers - */ - // ino.end - // ino.method.cloneAndApplyUnify.27235.definition - public CTriple cloneAndApplyUnify(CSubstitutionSet unifier) - // ino.end - // ino.method.cloneAndApplyUnify.27235.body - { - // -------------------------- - // Typannahmen bauen: - // -------------------------- - CTypeAssumptionSet V_substituted = this.getAssumptionSet().deepCopy(); - V_substituted.sub(unifier); - // -------------------------- - // Substitutionen bauen: - // -------------------------- - CSubstitutionSet substitutionSet = this.getSubstitutions().deepCopy(); - substitutionSet.applyUnifier(unifier); - substitutionSet.unite(unifier); - // -------------------------- - // R�ckgabetyp bauen: - // -------------------------- - Type ty = substitutionSet.applyThisSubstitutionSet(this.getResultType().clone()); - //PL 05-08-25 hier muessen TypePlaceholders-Variablen auch erstezt werden, - //wenn sie als Subvariablen in typen vorkommen.if(ty instanceof TypePlaceholder){ - // Iterator pairIt = unifier.getIterator(); - // while(pairIt.hasNext()){ - // CSubstitution pair = pairIt.next(); - // if(pair.getTypeVar().getName().equals(ty.getName())){ - // ty = pair.getType(); - // break; - // } - // } - //} - // -------------------------- - // Triple zusammensetzen: - // -------------------------- - CTriple triple = new CTriple(substitutionSet, ty, V_substituted); - return triple; - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/replacementlistener/CReplaceTypeEvent.java b/src/mycompiler/mytypereconstruction/replacementlistener/CReplaceTypeEvent.java deleted file mode 100755 index b39868a9..00000000 --- a/src/mycompiler/mytypereconstruction/replacementlistener/CReplaceTypeEvent.java +++ /dev/null @@ -1,55 +0,0 @@ -// ino.module.CReplaceTypeEvent.8691.package -package mycompiler.mytypereconstruction.replacementlistener; -// ino.end - -// ino.module.CReplaceTypeEvent.8691.import -import de.dhbwstuttgart.syntaxtree.type.Type; - -// ino.class.CReplaceTypeEvent.27311.description type=javadoc -/** - * - * @author Jörg Bäuerle - * @version $date - */ -// ino.end -// ino.class.CReplaceTypeEvent.27311.declaration -public class CReplaceTypeEvent -// ino.end -// ino.class.CReplaceTypeEvent.27311.body -{ - // ino.attribute.m_OldType.27314.declaration - private Type m_OldType; - // ino.end - // ino.attribute.m_NewType.27317.declaration - private Type m_NewType; - // ino.end - - // ino.method.CReplaceTypeEvent.27320.definition - public CReplaceTypeEvent(Type oldType, Type newType) - // ino.end - // ino.method.CReplaceTypeEvent.27320.body - { - m_OldType = oldType; - m_NewType = newType; - } - // ino.end - - // ino.method.getNewType.27323.definition - public Type getNewType() - // ino.end - // ino.method.getNewType.27323.body - { - return m_NewType; - } - // ino.end - - // ino.method.getOldType.27326.definition - public Type getOldType() - // ino.end - // ino.method.getOldType.27326.body - { - return m_OldType; - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/replacementlistener/IReplaceTypeEventProvider.java b/src/mycompiler/mytypereconstruction/replacementlistener/IReplaceTypeEventProvider.java deleted file mode 100755 index 32789888..00000000 --- a/src/mycompiler/mytypereconstruction/replacementlistener/IReplaceTypeEventProvider.java +++ /dev/null @@ -1,41 +0,0 @@ -// ino.module.IReplaceTypeEventProvider.8692.package -package mycompiler.mytypereconstruction.replacementlistener; -// ino.end - -// ino.module.IReplaceTypeEventProvider.8692.import -import java.util.Iterator; -// ino.end - -// ino.class.IReplaceTypeEventProvider.27329.description type=javadoc -/** - * Interface für ein Objekt, das ReplaceTypeEvents zur Verfügung stellt und - * es TypeReplacementListenern erlaubt, sich zu registrieren. - * @author Jörg Bäuerle - * @version $date - */ -// ino.end -// ino.class.IReplaceTypeEventProvider.27329.declaration -public interface IReplaceTypeEventProvider -// ino.end -// ino.class.IReplaceTypeEventProvider.27329.body -{ - // ino.method.addReplacementListener.27332.declaration - public void addReplacementListener(ITypeReplacementListener listener); - // ino.end - // ino.method.removeReplacementListener.27335.declaration - public void removeReplacementListener(ITypeReplacementListener listener); - // ino.end - // ino.method.removeAllReplacementListeners.27338.declaration - public void removeAllReplacementListeners(); - // ino.end - // ino.method.getReplacementListeners.27341.declaration - public Iterator getReplacementListeners(); - // ino.end - // ino.method.containsListener.27344.declaration - public boolean containsListener(ITypeReplacementListener listener); - // ino.end - // ino.method.fireReplaceTypeEvent.27347.declaration - public void fireReplaceTypeEvent(CReplaceTypeEvent e); - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/replacementlistener/ITypeReplacementListener.java b/src/mycompiler/mytypereconstruction/replacementlistener/ITypeReplacementListener.java deleted file mode 100755 index 12728490..00000000 --- a/src/mycompiler/mytypereconstruction/replacementlistener/ITypeReplacementListener.java +++ /dev/null @@ -1,42 +0,0 @@ -// ino.module.ITypeReplacementListener.8693.package -package mycompiler.mytypereconstruction.replacementlistener; -// ino.end - - -// ino.class.ITypeReplacementListener.27350.description type=javadoc -/** - * Interface f�r einen TypeReplacementListener, der es erm�glicht, - * einen Typ gegen einen anderen auszutauschen. - * @author J�rg B�uerle - * @version $date - */ -// ino.end -// ino.class.ITypeReplacementListener.27350.declaration -public interface ITypeReplacementListener -// ino.end -// ino.class.ITypeReplacementListener.27350.body -{ - // ino.method.replaceType.27353.decldescription type=javadoc - /** - * Tauscht einen Typ gegen einen anderen aus. - *
Author: J�rg B�uerle - * @param e Das Event mit dem neuen Typ - */ - // ino.end - // ino.method.replaceType.27353.declaration - public void replaceType(CReplaceTypeEvent e); - // ino.end - - // ino.method.getTypeLineNumber.27356.decldescription type=javadoc - /** - * Gibt die Zeilennummer zur�ck, in der eine TypePlaceholder - * angelegt worden ist. - *
Author: J�rg B�uerle - * @return Die Zeilennummer - */ - // ino.end - // ino.method.getTypeLineNumber.27356.declaration - public int getTypeLineNumber(); - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/CHashtableSet.java b/src/mycompiler/mytypereconstruction/set/CHashtableSet.java deleted file mode 100755 index 38606cf8..00000000 --- a/src/mycompiler/mytypereconstruction/set/CHashtableSet.java +++ /dev/null @@ -1,262 +0,0 @@ -// ino.module.CHashtableSet.8695.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.module.CHashtableSet.8695.import -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.Vector; -import mycompiler.mytypereconstruction.typeassumptionkey.IMethodBoundKey; -import org.apache.log4j.Logger; -// ino.end - -// ino.class.CHashtableSet.27360.description type=javadoc -/** - * @author Jrg Buerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CHashtableSet.27360.declaration -public abstract class CHashtableSet extends CSet -// ino.end -// ino.class.CHashtableSet.27360.body -{ - - // ino.attribute.inferencelog.27364.declaration - protected static Logger inferencelog = Logger.getLogger("inference"); - // ino.end - - // ino.attribute.m_Elements.27367.declaration - private Hashtable m_Elements = null; - // ino.end - - // ino.method.CHashtableSet.27370.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * - */ - // ino.end - // ino.method.CHashtableSet.27370.definition - public CHashtableSet() - // ino.end - // ino.method.CHashtableSet.27370.body - { - m_Elements = new Hashtable(); - } - // ino.end - - // ino.method.addElement.27373.defdescription type=javadoc - /** - * Diese Methode fügt das Element element unter dem Key des Elements - * in der HashMap ab, falls diese Position schon belegt ist (überladene - * Methode mit gleicher Parameteranzahl), wird ein neuer Key generiert - * mit einer um 1 höheren overloadedMethodID - * - * @return Liefert die overloadedMethodID zurück - */ - // ino.end - // ino.method.addElement.27373.definition - public void addElement(E element) - // ino.end - // ino.method.addElement.27373.body - { - this.addElement(element.getHashSetKey(), element); - } - // ino.end - - // ino.method.addElement.27376.defdescription type=javadoc - /** - * Diese Methode fügt das Element element unter dem Key elementKey - * in der HashMap ab, falls diese Position schon belegt ist (überladene - * Methode mit gleicher Parameteranzahl), wird ein neuer Key generiert - * mit einer um 1 höheren overloadedMethodID - * - * @return Liefert die overloadedMethodID zurück - */ - // ino.end - // ino.method.addElement.27376.definition - public void addElement(IHashSetKey elementKey, E element) - // ino.end - // ino.method.addElement.27376.body - { - if(elementKey instanceof IMethodBoundKey){ - IMethodBoundKey key=(IMethodBoundKey)elementKey; - while(m_Elements.get((IHashSetKey)key)!=null){ - key=key.getNextMethodKey(); - } - element.updateHashSetKey((IHashSetKey)key); - // fixme Key in element storen - m_Elements.put((IHashSetKey)key, element); - }else{ - m_Elements.put(elementKey, element); - } - } - // ino.end - - - // ino.method.getElement.27379.definition - public E getElement(IHashSetKey key) - // ino.end - // ino.method.getElement.27379.body - { - if(key instanceof IMethodBoundKey){ - if(!((IMethodBoundKey)key).isOverloadedIDSet()){ - inferencelog.warn("Es wurde ein nicht-initialisierter MethodKey verwendet! Kann zu Problemen fürhren: " + key); - } - } - return m_Elements.get(key); - } - // ino.end - - // ino.method.getElements.27382.defdescription type=javadoc - /** - * Liefert alle Elemente in der HashTable, die zu der Methoden-Signatur-Klass - * gehören d.h. - * liefert - overloaded(String a) - * - overloaded(int a) - * - ... - * - */ - // ino.end - // ino.method.getElements.27382.definition - public Vector getElements(IHashSetKey key) - // ino.end - // ino.method.getElements.27382.body - { - Vector elements=new Vector(); - if(key instanceof IMethodBoundKey){ - IMethodBoundKey keyToIterate=((IMethodBoundKey)key).getFirstMethodKey(); - E elem; - while((elem=getElement((IHashSetKey)keyToIterate))!=null){ - elements.add(elem); - keyToIterate=keyToIterate.getNextMethodKey(); - } - - }else{ - elements.add(getElement(key)); - } - return elements; - } - // ino.end - - // ino.method.removeElement.27385.definition - public void removeElement(E element) - // ino.end - // ino.method.removeElement.27385.body - { - this.removeElement(element.getHashSetKey()); - } - // ino.end - - // ino.method.removeElement.27388.definition - public void removeElement(IHashSetKey key) - // ino.end - // ino.method.removeElement.27388.body - { - m_Elements.remove(key); - } - // ino.end - - // ino.method.getCardinality.27391.definition - public int getCardinality() - // ino.end - // ino.method.getCardinality.27391.body - { - return m_Elements.size(); - } - // ino.end - - // ino.method.getHashtable.27394.definition - public Hashtable getHashtable() - // ino.end - // ino.method.getHashtable.27394.body - { - return m_Elements; - } - // ino.end - - // ino.method.setHashtable.27397.definition - public void setHashtable(Hashtable hash) - // ino.end - // ino.method.setHashtable.27397.body - { - m_Elements = hash; - } - // ino.end - - // ino.method.getIterator.27400.definition - public Iterator getIterator() - // ino.end - // ino.method.getIterator.27400.body - { - return m_Elements.values().iterator(); - } - // ino.end - - // ino.method.unite.27403.definition - public void unite(CSet anotherSet) - // ino.end - // ino.method.unite.27403.body - { - if(!(anotherSet instanceof CHashtableSet)){ - return; - } - CHashtableSet assumSet = (CHashtableSet)anotherSet; - - // Elemente der anderen Menge hinzufgen: - Enumeration enumer = assumSet.getHashtable().keys(); - while(enumer.hasMoreElements()){ - this.addElement(assumSet.getElement(enumer.nextElement())); - } - } - // ino.end - - // ino.method.subtract.27406.definition - public void subtract(CSet anotherSet) - // ino.end - // ino.method.subtract.27406.body - { - if(!(anotherSet instanceof CHashtableSet)){ - return; - } - CHashtableSet assumSet = (CHashtableSet)anotherSet; - - // Elemente der anderen Menge entfernen: - Enumeration enumer = assumSet.getHashtable().keys(); - while(enumer.hasMoreElements()){ - this.removeElement(assumSet.getElement(enumer.nextElement())); - } - } - // ino.end - - // ino.method.contains.27409.definition - public boolean contains(E element) - // ino.end - // ino.method.contains.27409.body - { - return m_Elements.contains(element); - } - // ino.end - - // ino.method.equals.27412.definition - public boolean equals(Object obj) - // ino.end - // ino.method.equals.27412.body - { - if(obj instanceof CHashtableSet){ - CHashtableSet hashSet = (CHashtableSet)obj; - boolean ret = true; - ret &= m_Elements.size() == hashSet.getHashtable().size(); - if(ret){ - m_Elements.equals(hashSet.m_Elements); - } - return ret; - } - else{ - return false; - } - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/CMultiplyTupleSet.java b/src/mycompiler/mytypereconstruction/set/CMultiplyTupleSet.java deleted file mode 100755 index 32eea6c8..00000000 --- a/src/mycompiler/mytypereconstruction/set/CMultiplyTupleSet.java +++ /dev/null @@ -1,52 +0,0 @@ -// ino.module.CMultiplyTupleSet.8696.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.module.CMultiplyTupleSet.8696.import -import java.util.Iterator; -import java.util.Vector; -import mycompiler.mytypereconstruction.CMultiplyTuple; -// ino.end - -// ino.class.CMultiplyTupleSet.27415.description type=javadoc -/** - * @author J�rg B�uerle - * @version $Date: 2013/03/27 18:29:34 $ - */ -// ino.end -// ino.class.CMultiplyTupleSet.27415.declaration -public class CMultiplyTupleSet extends CVectorSet -// ino.end -// ino.class.CMultiplyTupleSet.27415.body -{ - - // ino.method.shallowCopy.27419.definition - public CMultiplyTupleSet shallowCopy() - // ino.end - // ino.method.shallowCopy.27419.body - { - CMultiplyTupleSet copy = new CMultiplyTupleSet(); - copy.setVector((Vector)this.getVector().clone()); - return copy; - } - // ino.end - - // ino.method.deepCopy.27422.definition - public CMultiplyTupleSet deepCopy() - // ino.end - // ino.method.deepCopy.27422.body - { - CMultiplyTupleSet copy = new CMultiplyTupleSet(); - Iterator it = this.getIterator(); - while(it.hasNext()){ - copy.addElement(it.next().clone()); - } - return copy; - } - // ino.end - - public Iterator iterator() { - return this.getIterator(); - } -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/CReconstructionTupleSet.java b/src/mycompiler/mytypereconstruction/set/CReconstructionTupleSet.java deleted file mode 100755 index a4903032..00000000 --- a/src/mycompiler/mytypereconstruction/set/CReconstructionTupleSet.java +++ /dev/null @@ -1,58 +0,0 @@ -// ino.module.CReconstructionTupleSet.8697.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.module.CReconstructionTupleSet.8697.import -import java.util.Iterator; -import java.util.Vector; -import mycompiler.mytypereconstruction.CReconstructionTuple; -// ino.end - -// ino.class.CReconstructionTupleSet.27425.description type=javadoc -/** - * @author J�rg B�uerle - * @version $Date: 2013/03/27 18:29:34 $ - */ -// ino.end -// ino.class.CReconstructionTupleSet.27425.declaration -public class CReconstructionTupleSet extends CVectorSet -// ino.end -// ino.class.CReconstructionTupleSet.27425.body -{ - - // ino.method.shallowCopy.27429.definition - public CReconstructionTupleSet shallowCopy() - // ino.end - // ino.method.shallowCopy.27429.body - { - CReconstructionTupleSet copy = new CReconstructionTupleSet(); - copy.setVector((Vector)this.getVector().clone()); - return copy; - } - // ino.end - - // ino.method.deepCopy.27432.defdescription type=javadoc - /** - *
Author: J�rg B�uerle - * @return - */ - // ino.end - // ino.method.deepCopy.27432.definition - public CReconstructionTupleSet deepCopy() - // ino.end - // ino.method.deepCopy.27432.body - { - CReconstructionTupleSet copy = new CReconstructionTupleSet(); - Iterator it = this.getIterator(); - while(it.hasNext()){ - copy.addElement(it.next().clone()); - } - return copy; - } - // ino.end - - public Iterator iterator() { - return this.getIterator(); - } -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/CSet.java b/src/mycompiler/mytypereconstruction/set/CSet.java deleted file mode 100755 index 088afb99..00000000 --- a/src/mycompiler/mytypereconstruction/set/CSet.java +++ /dev/null @@ -1,72 +0,0 @@ -// ino.module.CSet.8698.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.module.CSet.8698.import -import java.util.Iterator; -// ino.end - -// ino.class.CSet.27435.description type=javadoc -/** - * - * @author Jrg Buerle - * @version $date - */ -// ino.end -// ino.class.CSet.27435.declaration -public abstract class CSet implements Iterable -// ino.end -// ino.class.CSet.27435.body -{ - // ino.method.addElement.27438.declaration - public abstract void addElement(E element); - // ino.end - // ino.method.removeElement.27441.declaration - public abstract void removeElement(E element); - // ino.end - // ino.method.unite.27444.declaration - public abstract void unite(CSet anotherSet); - // ino.end - // ino.method.subtract.27447.declaration - public abstract void subtract(CSet anotherSet); - // ino.end - // ino.method.shallowCopy.27450.declaration - public abstract CSet shallowCopy(); - // ino.end - // ino.method.deepCopy.27453.declaration - public abstract CSet deepCopy(); - // ino.end - // ino.method.contains.27456.declaration - public abstract boolean contains(E element); - // ino.end - // ino.method.getCardinality.27459.declaration - public abstract int getCardinality(); - // ino.end - // ino.method.getIterator.27462.declaration - public abstract Iterator getIterator(); - // ino.end - // ino.method.equals.27465.declaration - public abstract boolean equals(Object obj); - // ino.end - - // ino.method.toString.27468.definition - public String toString() - // ino.end - // ino.method.toString.27468.body - { - StringBuffer sb = new StringBuffer(); - sb.append("Set {\n"); - Iterator it = this.getIterator(); - while(it.hasNext()){ - sb.append(it.next().toString()); - sb.append(",\n"); - } - if(this.getCardinality()>0){ - sb.delete(sb.length()-2, sb.length()-1); - } - sb.append("}"); - return sb.toString(); - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/CSubstitutionSet.java b/src/mycompiler/mytypereconstruction/set/CSubstitutionSet.java deleted file mode 100755 index 6a98c406..00000000 --- a/src/mycompiler/mytypereconstruction/set/CSubstitutionSet.java +++ /dev/null @@ -1,134 +0,0 @@ -// ino.module.CSubstitutionSet.8699.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.module.CSubstitutionSet.8699.import -import java.util.Iterator; -import java.util.Vector; - -import de.dhbwstuttgart.syntaxtree.type.Pair; -import de.dhbwstuttgart.syntaxtree.type.Type; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.mytypereconstruction.CSubstitution; -// ino.end - -// ino.class.CSubstitutionSet.27471.description type=javadoc -/** - * @author J�rg B�uerle - * @version $Date: 2013/03/27 18:29:34 $ - */ -// ino.end -// ino.class.CSubstitutionSet.27471.declaration -public class CSubstitutionSet extends CVectorSet -// ino.end -// ino.class.CSubstitutionSet.27471.body -{ - // ino.method.CSubstitutionSet.27475.definition - public CSubstitutionSet() - // ino.end - // ino.method.CSubstitutionSet.27475.body - { - super(); - } - // ino.end - - // ino.method.CSubstitutionSet.27478.definition - public CSubstitutionSet(Vector unifiers) - throws CTypeReconstructionException - // ino.end - // ino.method.CSubstitutionSet.27478.body - { - super(); - for(int i=0; i substIter = this.getIterator(); - while(substIter.hasNext()){ - copy.addElement(substIter.next().clone()); - } - return copy; - } - // ino.end - - // ino.method.applyUnifier.27487.defdescription type=javadoc - /** - * Wendet den Unifier auf die rechten Seiten alle Substitutionen an. - *
Author: J�rg B�uerle - * @param unifier - */ - // ino.end - // ino.method.applyUnifier.27487.definition - public void applyUnifier(CSubstitutionSet unifier) - // ino.end - // ino.method.applyUnifier.27487.body - { - Iterator substIt = this.getIterator(); - - while(substIt.hasNext()){ - substIt.next().applyUnifier(unifier); - } - } - // ino.end - - // ino.method.applyThisSubstitutionSet.27490.definition - public Type applyThisSubstitutionSet(Type type) - // ino.end - // ino.method.applyThisSubstitutionSet.27490.body - { - Iterator substIt = this.getIterator(); - Type ty = type; - - while(substIt.hasNext()) { - ty = substIt.next().applyThisSubstitution(ty); - } - return ty; - } - // ino.end - - // ino.method.execute.27493.defdescription type=javadoc - /** - * F�hrt jede einzelne CSubstitution aus. - *
Author: J�rg B�uerle - * @throws CTypeReconstructionException Falls TypePlaceholder nicht in Registry - * gefunden wird. - */ - // ino.end - // ino.method.execute.27493.definition - public void execute() - throws CTypeReconstructionException - // ino.end - // ino.method.execute.27493.body - { - Iterator substIt = this.getIterator(); - - while(substIt.hasNext()){ - substIt.next().execute(); - } - } - // ino.end - - public Iterator iterator() { - return this.getIterator(); - } -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/CTripleSet.java b/src/mycompiler/mytypereconstruction/set/CTripleSet.java deleted file mode 100755 index 6bc86b40..00000000 --- a/src/mycompiler/mytypereconstruction/set/CTripleSet.java +++ /dev/null @@ -1,60 +0,0 @@ -// ino.module.CTripleSet.8700.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.module.CTripleSet.8700.import -import java.util.Iterator; -import java.util.Vector; -import mycompiler.mytypereconstruction.CTriple; -// ino.end - -// ino.class.CTripleSet.27496.description type=javadoc -/** - * Enthält Objekte vom Typ CTriple - * (Ist im Grunde ein CVectorSet) - * Es enthält alle Typannahmen in Form von CTriple s - * @see CTriple - * @author J�rg B�uerle - * @version $Date: 2013/03/27 18:29:34 $ - */ -// ino.end -// ino.class.CTripleSet.27496.declaration -public class CTripleSet extends CVectorSet -// ino.end -// ino.class.CTripleSet.27496.body -{ - - // ino.method.shallowCopy.27500.definition - public CTripleSet shallowCopy() - // ino.end - // ino.method.shallowCopy.27500.body - { - CTripleSet copy = new CTripleSet(); - copy.setVector((Vector)this.getVector().clone()); - return copy; - } - // ino.end - - /** - * Diese Funktion kopiert nicht nur das VectorSet, sondern auch alle enthaltenen CTriple-Sets. - * Dadurch wirken sich Modifizierungen an den enthaltenen Elementen nicht auf die Kopie aus. - */ - // ino.method.deepCopy.27503.definition - public CTripleSet deepCopy() - // ino.end - // ino.method.deepCopy.27503.body - { - CTripleSet copy = new CTripleSet(); - Iterator it = this.getIterator(); - while(it.hasNext()){ - copy.addElement(it.next().clone()); - } - return copy; - } - // ino.end - - public Iterator iterator() { - return this.getIterator(); - } -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/CTypeAssumptionSet.java b/src/mycompiler/mytypereconstruction/set/CTypeAssumptionSet.java deleted file mode 100755 index af930103..00000000 --- a/src/mycompiler/mytypereconstruction/set/CTypeAssumptionSet.java +++ /dev/null @@ -1,67 +0,0 @@ -// ino.module.CTypeAssumptionSet.8701.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.module.CTypeAssumptionSet.8701.import -import java.util.Hashtable; -import java.util.Iterator; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -// ino.end - -// ino.class.CTypeAssumptionSet.27506.description type=javadoc -/** - * @author Jrg Buerle - * @version $Date: 2013/06/18 05:18:59 $ - */ -// ino.end -// ino.class.CTypeAssumptionSet.27506.declaration -public class CTypeAssumptionSet extends CHashtableSet -// ino.end -// ino.class.CTypeAssumptionSet.27506.body -{ - - // ino.method.sub.27510.definition - public void sub(CSubstitutionSet subtitutions) - // ino.end - // ino.method.sub.27510.body - { - Iterator it = this.getIterator(); - while(it.hasNext()){ - it.next().sub(subtitutions); - } - } - // ino.end - - // ino.method.shallowCopy.27513.definition - public CTypeAssumptionSet shallowCopy() - // ino.end - // ino.method.shallowCopy.27513.body - { - CTypeAssumptionSet copy = new CTypeAssumptionSet(); - copy.setHashtable((Hashtable)this.getHashtable().clone()); - return copy; - } - // ino.end - - // ino.method.deepCopy.27516.definition - public CTypeAssumptionSet deepCopy() - // ino.end - // ino.method.deepCopy.27516.body - { - CTypeAssumptionSet copy = new CTypeAssumptionSet(); - Iterator assumIter = this.getHashtable().values().iterator(); - while(assumIter.hasNext()){ - CTypeAssumption actualAssum=assumIter.next(); - CTypeAssumption clonedObject=actualAssum.clone(); - copy.addElement(clonedObject); - } - return copy; - } - // ino.end - - public Iterator iterator() { - return this.getIterator(); - } - -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/CVectorSet.java b/src/mycompiler/mytypereconstruction/set/CVectorSet.java deleted file mode 100755 index c9bf78d0..00000000 --- a/src/mycompiler/mytypereconstruction/set/CVectorSet.java +++ /dev/null @@ -1,165 +0,0 @@ -// ino.module.CVectorSet.8702.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.module.CVectorSet.8702.import -import java.util.Iterator; -import java.util.Vector; -// ino.end - -// ino.class.CVectorSet.27519.description type=javadoc -/** - * @author J�rg B�uerle - * @version $Date: 2013/02/07 05:08:51 $ - */ -// ino.end -// ino.class.CVectorSet.27519.declaration -public abstract class CVectorSet extends CSet -// ino.end -// ino.class.CVectorSet.27519.body -{ - // ino.attribute.m_Elements.27523.declaration - private Vector m_Elements = null; - // ino.end - - // ino.method.CVectorSet.27526.definition - public CVectorSet() - // ino.end - // ino.method.CVectorSet.27526.body - { - m_Elements = new Vector(); - } - // ino.end - - // ino.method.addElement.27529.definition - public void addElement(E element) - // ino.end - // ino.method.addElement.27529.body - { - m_Elements.addElement(element); - } - // ino.end - - // ino.method.removeElement.27532.definition - public void removeElement(E element) - // ino.end - // ino.method.removeElement.27532.body - { - m_Elements.addElement(element); - } - // ino.end - - public void addAll( CVectorSet set ) - { - for( int i=0;i getIterator() - // ino.end - // ino.method.getIterator.27535.body - { - return m_Elements.iterator(); - } - // ino.end - - // ino.method.getVector.27538.definition - public Vector getVector() - // ino.end - // ino.method.getVector.27538.body - { - return m_Elements; - } - // ino.end - - // ino.method.setVector.27541.definition - public void setVector(Vector elements) - // ino.end - // ino.method.setVector.27541.body - { - m_Elements = elements; - } - // ino.end - - /** - * Fügt ein CVectorSet an! - * Es handelt sich um eine Vereinigung (es werden keine bereits vorhandenen Elemente übernommen) - * @param anotherSet Das hinzuzufügende CVectorSet (CSet wird ignoriert) - */ - // ino.method.unite.27544.definition - public void unite(CSet anotherSet) - // ino.end - // ino.method.unite.27544.body - { - if(!(anotherSet instanceof CVectorSet)){ - return; - } - CVectorSet vectorSet = (CVectorSet)anotherSet; - - // Elemente der anderen Menge hinzuf�gen: - Iterator it = vectorSet.getIterator(); - while(it.hasNext()){ - E elem = it.next(); - if(!m_Elements.contains(elem)){ - m_Elements.addElement(elem); - } - } - //m_Elements.addAll(vectorSet.m_Elements); - } - // ino.end - - // ino.method.subtract.27547.definition - public void subtract(CSet anotherSet) - // ino.end - // ino.method.subtract.27547.body - { - if(!(anotherSet instanceof CVectorSet)){ - return; - } - CVectorSet vectorSet = (CVectorSet)anotherSet; - - // Elemente der anderen Menge entfernen: - m_Elements.removeAll(vectorSet.m_Elements); - } - // ino.end - - // ino.method.contains.27550.definition - public boolean contains(E element) - // ino.end - // ino.method.contains.27550.body - { - return m_Elements.contains(element); - } - // ino.end - - // ino.method.equals.27553.definition - public boolean equals(Object obj) - // ino.end - // ino.method.equals.27553.body - { - if(obj instanceof CVectorSet){ - CVectorSet tripSet= (CVectorSet)obj; - boolean ret = true; - ret &= (m_Elements.containsAll(tripSet.m_Elements)); - ret &= (tripSet.m_Elements.containsAll(m_Elements)); - return ret; - } - else{ - return false; - } - } - // ino.end - - // ino.method.getCardinality.27556.definition - public int getCardinality() - // ino.end - // ino.method.getCardinality.27556.body - { - return m_Elements.size(); - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/IHashSetElement.java b/src/mycompiler/mytypereconstruction/set/IHashSetElement.java deleted file mode 100755 index c37140c6..00000000 --- a/src/mycompiler/mytypereconstruction/set/IHashSetElement.java +++ /dev/null @@ -1,24 +0,0 @@ -// ino.module.IHashSetElement.8703.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.class.IHashSetElement.27559.description type=javadoc -/** - * - * @author Jrg Buerle - * @version $date - */ -// ino.end -// ino.class.IHashSetElement.27559.declaration -public interface IHashSetElement -// ino.end -// ino.class.IHashSetElement.27559.body -{ - // ino.method.getHashSetKey.27562.declaration - public IHashSetKey getHashSetKey(); - // ino.end - // ino.method.updateHashSetKey.27565.declaration - public void updateHashSetKey(IHashSetKey key); - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/set/IHashSetKey.java b/src/mycompiler/mytypereconstruction/set/IHashSetKey.java deleted file mode 100755 index b1990b8e..00000000 --- a/src/mycompiler/mytypereconstruction/set/IHashSetKey.java +++ /dev/null @@ -1,19 +0,0 @@ -// ino.module.IHashSetKey.8704.package -package mycompiler.mytypereconstruction.set; -// ino.end - -// ino.class.IHashSetKey.27568.description type=javadoc -/** - * - * @author Jörg Bäuerle - * @version $date - */ -// ino.end -// ino.class.IHashSetKey.27568.declaration -public interface IHashSetKey -// ino.end -// ino.class.IHashSetKey.27568.body -{ - -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumption/CInstVarTypeAssumption.java b/src/mycompiler/mytypereconstruction/typeassumption/CInstVarTypeAssumption.java deleted file mode 100755 index 408b4049..00000000 --- a/src/mycompiler/mytypereconstruction/typeassumption/CInstVarTypeAssumption.java +++ /dev/null @@ -1,99 +0,0 @@ -// ino.module.CInstVarTypeAssumption.8706.package -package mycompiler.mytypereconstruction.typeassumption; -// ino.end - -// ino.module.CInstVarTypeAssumption.8706.import -import java.util.Vector; - -import de.dhbwstuttgart.syntaxtree.type.Type; -import mycompiler.mytypereconstruction.set.IHashSetKey; -import mycompiler.mytypereconstruction.typeassumptionkey.CInstVarKey; -// ino.end - -// ino.class.CInstVarTypeAssumption.27572.description type=javadoc -/** - * @author Jrg Buerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CInstVarTypeAssumption.27572.declaration -public class CInstVarTypeAssumption extends CTypeAssumption -// ino.end -// ino.class.CInstVarTypeAssumption.27572.body -{ - - // ino.attribute.hashSetKey.27576.declaration - private CInstVarKey hashSetKey; - // ino.end - - - // ino.method.CInstVarTypeAssumption.27579.definition - public CInstVarTypeAssumption(String className, String identifier, Type type, int lineNumber,int offset, Vector Offsetvektor) - // ino.end - // ino.method.CInstVarTypeAssumption.27579.body - { - super(className, identifier, type, lineNumber,offset,Offsetvektor); - } - // ino.end - - // ino.method.getHashSetKey.27582.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * @return - */ - // ino.end - // ino.method.getHashSetKey.27582.definition - public CInstVarKey getHashSetKey() - // ino.end - // ino.method.getHashSetKey.27582.body - { - if(hashSetKey==null){ - this.hashSetKey=new CInstVarKey(m_ClassName, m_Identifier); - } - return hashSetKey; - } - // ino.end - - // ino.method.equalsAssumption.27585.defdescription type=javadoc - /** - *
Author: Jrg Buerle - * @param assumption - * @return - */ - // ino.end - // ino.method.equalsAssumption.27585.definition - public boolean equalsAssumption(CTypeAssumption assumption) - // ino.end - // ino.method.equalsAssumption.27585.body - { - if(assumption instanceof CInstVarTypeAssumption){ - return true; - } - else{ - return false; - } - } - // ino.end - - // ino.method.clone.27588.definition - public CInstVarTypeAssumption clone() - // ino.end - // ino.method.clone.27588.body - { - CInstVarTypeAssumption copy = new CInstVarTypeAssumption(m_ClassName, m_Identifier, m_AssumedType.clone(), m_LineNumber,m_Offset,m_OffsetVector); - return copy; - } - // ino.end - - // ino.method.updateHashSetKey.27591.definition - public void updateHashSetKey(IHashSetKey key) - // ino.end - // ino.method.updateHashSetKey.27591.body - { - this.hashSetKey=(CInstVarKey)key; - - } - // ino.end - -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumption/CLocalVarTypeAssumption.java b/src/mycompiler/mytypereconstruction/typeassumption/CLocalVarTypeAssumption.java deleted file mode 100755 index a2408639..00000000 --- a/src/mycompiler/mytypereconstruction/typeassumption/CLocalVarTypeAssumption.java +++ /dev/null @@ -1,179 +0,0 @@ -// ino.module.CLocalVarTypeAssumption.8707.package -package mycompiler.mytypereconstruction.typeassumption; -// ino.end - -// ino.module.CLocalVarTypeAssumption.8707.import -import java.util.Vector; - -import de.dhbwstuttgart.syntaxtree.type.Type; -import mycompiler.mytypereconstruction.set.IHashSetKey; -import mycompiler.mytypereconstruction.typeassumptionkey.CLocalVarKey; -// ino.end - -// ino.class.CLocalVarTypeAssumption.27594.description type=javadoc -/** - * @author Jrg Buerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CLocalVarTypeAssumption.27594.declaration -public class CLocalVarTypeAssumption extends CTypeAssumption -// ino.end -// ino.class.CLocalVarTypeAssumption.27594.body -{ - // ino.attribute.m_MethodName.27598.declaration - protected String m_MethodName; - // ino.end - // ino.attribute.m_MethodParaCount.27601.declaration - protected int m_MethodParaCount; - // ino.end - // ino.attribute.m_BlockId.27604.declaration - protected String m_BlockId; - // ino.end - // ino.attribute.hashSetKey.27607.declaration - private CLocalVarKey hashSetKey; - // ino.end - // ino.attribute.m_methodOverloadedID.27610.declaration - private int m_methodOverloadedID; - // ino.end - - // ino.method.CLocalVarTypeAssumption.27613.definition - public CLocalVarTypeAssumption(String className, String methodName, int methodParaCount, int methodOverloadedID, String blockId, String identifier, Type assumedType, int lineNumber,int offset, Vector Offsetvektor) - // ino.end - // ino.method.CLocalVarTypeAssumption.27613.body - { - super(className, identifier, assumedType, lineNumber,offset,Offsetvektor); - m_MethodName = methodName; - m_MethodParaCount = methodParaCount; - m_BlockId = blockId; - m_methodOverloadedID=methodOverloadedID; - - } - // ino.end - - // ino.method.getMethodOverloadedID.27616.definition - public int getMethodOverloadedID() - // ino.end - // ino.method.getMethodOverloadedID.27616.body - { - return m_methodOverloadedID; - } - // ino.end - - // ino.method.getMethodName.27619.definition - public String getMethodName() - // ino.end - // ino.method.getMethodName.27619.body - { - return m_MethodName; - } - // ino.end - - // ino.method.setMethodName.27622.definition - public void setMethodName(String methodName) - // ino.end - // ino.method.setMethodName.27622.body - { - m_MethodName = methodName; - } - // ino.end - - // ino.method.getMethodParaCount.27625.definition - public int getMethodParaCount() - // ino.end - // ino.method.getMethodParaCount.27625.body - { - return m_MethodParaCount; - } - // ino.end - - // ino.method.setMethodParaCount.27628.definition - public void setMethodParaCount(int methodParaCount) - // ino.end - // ino.method.setMethodParaCount.27628.body - { - m_MethodParaCount = methodParaCount; - } - // ino.end - - // ino.method.getBlockId.27631.definition - public String getBlockId() - // ino.end - // ino.method.getBlockId.27631.body - { - return m_BlockId; - } - // ino.end - - // ino.method.setBlockId.27634.definition - public void setBlockId(String blockId) - // ino.end - // ino.method.setBlockId.27634.body - { - m_BlockId = blockId; - } - // ino.end - - // ino.method.getHashSetKey.27637.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * @return - */ - // ino.end - // ino.method.getHashSetKey.27637.definition - public CLocalVarKey getHashSetKey() - // ino.end - // ino.method.getHashSetKey.27637.body - { - if(hashSetKey==null){ - hashSetKey=new CLocalVarKey(m_ClassName, m_MethodName, m_MethodParaCount, m_methodOverloadedID, m_BlockId, m_Identifier); - } - return hashSetKey; - } - // ino.end - - // ino.method.equalsAssumption.27640.defdescription type=javadoc - /** - *
Author: Jrg Buerle - * @param assumption - * @return - */ - // ino.end - // ino.method.equalsAssumption.27640.definition - public boolean equalsAssumption(CTypeAssumption assumption) - // ino.end - // ino.method.equalsAssumption.27640.body - { - if(assumption instanceof CLocalVarTypeAssumption){ - CLocalVarTypeAssumption assum = (CLocalVarTypeAssumption)assumption; - boolean ret = true; - ret &= m_MethodName.equals(assum.getMethodName()); - ret &= m_MethodParaCount == assum.getMethodParaCount(); - ret &= m_BlockId == assum.getBlockId(); - return ret; - } - else{ - return false; - } - } - // ino.end - - // ino.method.clone.27643.definition - public CLocalVarTypeAssumption clone() - // ino.end - // ino.method.clone.27643.body - { - CLocalVarTypeAssumption copy = new CLocalVarTypeAssumption(m_ClassName, m_MethodName, m_MethodParaCount, m_methodOverloadedID, m_BlockId, m_Identifier, m_AssumedType.clone(), m_LineNumber,m_Offset,m_OffsetVector); - return copy; - } - // ino.end - // ino.method.updateHashSetKey.27646.definition - public void updateHashSetKey(IHashSetKey key) - // ino.end - // ino.method.updateHashSetKey.27646.body - { - this.hashSetKey=(CLocalVarKey)key; - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumption/CMethodTypeAssumption.java b/src/mycompiler/mytypereconstruction/typeassumption/CMethodTypeAssumption.java deleted file mode 100755 index 189c00e2..00000000 --- a/src/mycompiler/mytypereconstruction/typeassumption/CMethodTypeAssumption.java +++ /dev/null @@ -1,251 +0,0 @@ -// ino.module.CMethodTypeAssumption.8708.package -package mycompiler.mytypereconstruction.typeassumption; -// ino.end - -// ino.module.CMethodTypeAssumption.8708.import -import java.util.Iterator; -import java.util.Vector; - -import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Type; -import mycompiler.mytypereconstruction.CSubstitution; -import mycompiler.mytypereconstruction.set.IHashSetKey; -import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; -// ino.end - -// ino.class.CMethodTypeAssumption.27649.description type=javadoc -/** - * @author Jrg Buerle - * @version $Date: 2013/07/28 17:05:44 $ - */ -// ino.end -// ino.class.CMethodTypeAssumption.27649.declaration -public class CMethodTypeAssumption extends CTypeAssumption -// ino.end -// ino.class.CMethodTypeAssumption.27649.body -{ - /** - * classType enthält den Typ der Klasse, zu welcher die Methode gehört - */ - private Type classType; - - // ino.attribute.m_ParaAssumptions.27653.declaration - protected Vector m_ParaAssumptions = null; - // ino.end - // ino.attribute.hashSetKey.27656.declaration - private CMethodKey hashSetKey; - // ino.end - // ino.attribute.m_overloadedMethodID.27659.declaration - private int m_overloadedMethodID; - // ino.end - // ino.attribute.parameterCount.27662.declaration - private int parameterCount; - // ino.end - // ino.attribute.genericMethodParameters.27665.declaration - private Vector genericMethodParameters=new Vector(); - // ino.end - - // ino.method.CMethodTypeAssumption.27668.definition - public CMethodTypeAssumption(Type classType, String identifier, Type assumedType, int parameterCount, int lineNumber,int offset, Vector Offsetvektor, Vector genericMethodParameters) - // ino.end - // ino.method.CMethodTypeAssumption.27668.body - { - super(classType.get_Name(), identifier, assumedType, lineNumber,offset,Offsetvektor); - if(genericMethodParameters!=null) - this.genericMethodParameters=genericMethodParameters; - this.parameterCount=parameterCount; - m_ParaAssumptions = new Vector(); - this.classType = classType; - } - // ino.end - - // ino.method.getParaCount.27671.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * @return Returns the ParaCount. - */ - // ino.end - // ino.method.getParaCount.27671.definition - public int getParaCount() - // ino.end - // ino.method.getParaCount.27671.body - { - return parameterCount; - } - // ino.end - - // ino.method.getGenericMethodParameters.27674.definition - public Vector getGenericMethodParameters() - // ino.end - // ino.method.getGenericMethodParameters.27674.body - { - return genericMethodParameters; - } - // ino.end - - // ino.method.addParaAssumption.27677.definition - public void addParaAssumption(CParaTypeAssumption paraAssumption) - // ino.end - // ino.method.addParaAssumption.27677.body - { - m_ParaAssumptions.addElement(paraAssumption); - parameterCount=m_ParaAssumptions.size(); - } - // ino.end - - // ino.method.getParaAssumption.27680.definition - public CParaTypeAssumption getParaAssumption(int index) - // ino.end - // ino.method.getParaAssumption.27680.body - { - return m_ParaAssumptions.elementAt(index); - } - // ino.end - - // ino.method.getParaAssumptions.27683.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * @return Returns the m_ParaAssumptions. - */ - // ino.end - // ino.method.getParaAssumptions.27683.definition - public Vector getParaAssumptions() - // ino.end - // ino.method.getParaAssumptions.27683.body - { - return m_ParaAssumptions; - } - // ino.end - - // ino.method.sub.27686.definition - public void sub(CSubstitution substitution) - // ino.end - // ino.method.sub.27686.body - { - super.sub(substitution); - for(int i=0; iAuthor: Jrg Buerle - * @param assumption - * @return - */ - // ino.end - // ino.method.equalsAssumption.27689.definition - public boolean equalsAssumption(CTypeAssumption assumption) - // ino.end - // ino.method.equalsAssumption.27689.body - { - if(assumption instanceof CMethodTypeAssumption){ - CMethodTypeAssumption assum = (CMethodTypeAssumption)assumption; - boolean ret = true; - ret &= (this.getParaCount() == assum.getParaCount()); - for(int i=0; i it = m_ParaAssumptions.iterator(); - while(it.hasNext()){ - sb.append(it.next().getAssumedType().getName()); - sb.append(" * "); - } - sb.delete(sb.length()-3,sb.length()); - } - else { - sb.append("NOPARAS"); - } - sb.append(" --> "); - if(this.getAssumedType()!=null)sb.append(this.getAssumedType().toString()); - return sb.toString(); - } - // ino.end - - // ino.method.getHashSetKey.27695.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * @return - */ - // ino.end - // ino.method.getHashSetKey.27695.definition - public CMethodKey getHashSetKey() - // ino.end - // ino.method.getHashSetKey.27695.body - { - if(hashSetKey==null){ - this.hashSetKey=new CMethodKey(m_ClassName, m_Identifier, this.getParaCount(),this.getOverloadedMethodID()); - } - return(hashSetKey); - } - // ino.end - - // ino.method.getOverloadedMethodID.27698.definition - public int getOverloadedMethodID() - // ino.end - // ino.method.getOverloadedMethodID.27698.body - { - return(m_overloadedMethodID); - } - // ino.end - - // ino.method.clone.27701.defdescription type=javadoc - /** - *
Author: Jrg Buerle - * @return - */ - // ino.end - // ino.method.clone.27701.definition - public CMethodTypeAssumption clone() - // ino.end - // ino.method.clone.27701.body - { - CMethodTypeAssumption copy = new CMethodTypeAssumption(this.classType, m_Identifier, m_AssumedType.clone(), parameterCount,m_LineNumber,m_Offset,m_OffsetVector,genericMethodParameters); - for(int i=0; i Offsetvektor) - // ino.end - // ino.method.CParaTypeAssumption.27723.body - { - super(className, identifier, assumedType, lineNumber,offset,Offsetvektor); - m_MethodName = methodName; - m_MethodParaCount = methodParaCount; - m_methodOverloadedID=methodOverloadedID; - } - // ino.end - - // ino.method.getMethodName.27726.definition - public String getMethodName() - // ino.end - // ino.method.getMethodName.27726.body - { - return m_MethodName; - } - // ino.end - - // ino.method.setMethodName.27729.definition - public void setMethodName(String methodName) - // ino.end - // ino.method.setMethodName.27729.body - { - m_MethodName = methodName; - } - // ino.end - - // ino.method.getMethodParaCount.27732.definition - public int getMethodParaCount() - // ino.end - // ino.method.getMethodParaCount.27732.body - { - return m_MethodParaCount; - } - // ino.end - - // ino.method.setMethodParaCount.27735.definition - public void setMethodParaCount(int methodParaCount) - // ino.end - // ino.method.setMethodParaCount.27735.body - { - m_MethodParaCount = methodParaCount; - } - // ino.end - - // ino.method.getHashSetKey.27738.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * @return - */ - // ino.end - // ino.method.getHashSetKey.27738.definition - public CMethodParaKey getHashSetKey() - // ino.end - // ino.method.getHashSetKey.27738.body - { - if(hashSetKey==null){ - this.hashSetKey=new CMethodParaKey(m_ClassName, m_MethodName, m_MethodParaCount,m_methodOverloadedID, m_Identifier); - } - return(hashSetKey); - } - // ino.end - - // ino.method.equalsAssumption.27741.defdescription type=javadoc - /** - *
Author: Jrg Buerle - * @param assumption - * @return - */ - // ino.end - // ino.method.equalsAssumption.27741.definition - public boolean equalsAssumption(CTypeAssumption assumption) - // ino.end - // ino.method.equalsAssumption.27741.body - { - if(assumption instanceof CParaTypeAssumption){ - CParaTypeAssumption assum = (CParaTypeAssumption)assumption; - boolean ret = true; - ret &= m_MethodName.equals(assum.getMethodName()); - ret &= m_MethodParaCount == assum.getMethodParaCount(); - return ret; - } - else{ - return false; - } - } - // ino.end - - // ino.method.clone.27744.defdescription type=javadoc - /** - *
Author: Jrg Buerle - * @return - */ - // ino.end - // ino.method.clone.27744.definition - public CParaTypeAssumption clone() - // ino.end - // ino.method.clone.27744.body - { - CParaTypeAssumption copy = new CParaTypeAssumption(m_ClassName, m_MethodName, m_MethodParaCount, m_methodOverloadedID, m_Identifier, m_AssumedType.clone(), m_LineNumber, m_Offset,m_OffsetVector); - return copy; - } - // ino.end - - // ino.method.updateHashSetKey.27747.definition - public void updateHashSetKey(IHashSetKey key) - // ino.end - // ino.method.updateHashSetKey.27747.body - { - hashSetKey=(CMethodParaKey)key; - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumption/CTypeAssumption.java b/src/mycompiler/mytypereconstruction/typeassumption/CTypeAssumption.java deleted file mode 100755 index d9e0436b..00000000 --- a/src/mycompiler/mytypereconstruction/typeassumption/CTypeAssumption.java +++ /dev/null @@ -1,254 +0,0 @@ -// ino.module.CTypeAssumption.8710.package -package mycompiler.mytypereconstruction.typeassumption; -// ino.end - -// ino.module.CTypeAssumption.8710.import -import java.util.Iterator; -import java.util.Vector; - -import de.dhbwstuttgart.syntaxtree.type.Type; -import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; -import mycompiler.mytypereconstruction.CSubstitution; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.IHashSetElement; -import mycompiler.mytypereconstruction.typeassumptionkey.CTypeAssumptionKey; -// ino.end - -// ino.class.CTypeAssumption.27750.description type=javadoc -/** - * Diese Klasse repr�sentiert eine Typannahme und bildet einen - * Bezeichner innerhalb einer bestimmten Klasse auf einen angenommenen - * Typ ab.
- * Die von dieser Klasse abgeleiteten Subklassen stehen f�r bestimmte - * Typannahmen des abstrakten Syntaxbaumes, wie z.B. f�r Felder, Methoden, - * lokale Variablen, etc. - * @author J�rg B�uerle - * @version $Date: 2006/07/10 11:27:04 $ - */ -// ino.end -// ino.class.CTypeAssumption.27750.declaration -public abstract class CTypeAssumption implements IHashSetElement -// ino.end -// ino.class.CTypeAssumption.27750.body -{ - // ino.attribute.m_ClassName.27754.declaration - protected String m_ClassName; - // ino.end - // ino.attribute.m_Identifier.27757.declaration - protected String m_Identifier; - // ino.end - // ino.attribute.m_AssumedType.27760.declaration - protected Type m_AssumedType; - // ino.end - // ino.attribute.m_LineNumber.27763.declaration - protected int m_LineNumber; - // ino.end - // ino.attribute.m_Offset.27766.declaration - protected int m_Offset; - // ino.end - // ino.attribute.m_OffsetVector.27769.declaration - protected Vector m_OffsetVector; - // ino.end - - // ino.method.CTypeAssumption.27772.definition - public CTypeAssumption(String className, String identifier, Type assumedType, int lineNumber, int offset, Vector OffsetVektor) - // ino.end - // ino.method.CTypeAssumption.27772.body - { - m_ClassName = className; - m_Identifier = identifier; - m_AssumedType = assumedType; - m_LineNumber = lineNumber; - m_Offset = offset; - m_OffsetVector = OffsetVektor; - } - // ino.end - - // ino.method.getClassName.27775.definition - public String getClassName() - // ino.end - // ino.method.getClassName.27775.body - { - return m_ClassName; - } - // ino.end - - // ino.method.setClassName.27778.definition - public void setClassName(String className) - // ino.end - // ino.method.setClassName.27778.body - { - m_ClassName = className; - } - // ino.end - - // ino.method.getIdentifier.27781.definition - public String getIdentifier() - // ino.end - // ino.method.getIdentifier.27781.body - { - return m_Identifier; - } - // ino.end - - // ino.method.setIdentifier.27784.definition - public void setIdentifier(String identifier) - // ino.end - // ino.method.setIdentifier.27784.body - { - m_Identifier = identifier; - } - // ino.end - - // ino.method.getAssumedType.27787.definition - public Type getAssumedType() - // ino.end - // ino.method.getAssumedType.27787.body - { - return m_AssumedType; - } - // ino.end - - // ino.method.setAssumedType.27790.definition - public void setAssumedType(Type assumedType) - // ino.end - // ino.method.setAssumedType.27790.body - { - m_AssumedType = assumedType; - } - // ino.end - - // ino.method.getLineNumber.27793.definition - public int getLineNumber() - // ino.end - // ino.method.getLineNumber.27793.body - { - return m_LineNumber; - } - // ino.end - - // ino.method.setLineNumber.27796.definition - public void setLineNumber(int lineNumber) - // ino.end - // ino.method.setLineNumber.27796.body - { - m_LineNumber = lineNumber; - } - // ino.end - - // ino.method.getOffset.27799.definition - public int getOffset() - // ino.end - // ino.method.getOffset.27799.body - { - return m_Offset; - } - // ino.end - - // ino.method.addOffset.27802.definition - public void addOffset(int i) - // ino.end - // ino.method.addOffset.27802.body - { - m_OffsetVector.addElement(new Integer(i)); - } - // ino.end - - // ino.method.getOffsetVector.27805.definition - public Vector getOffsetVector() - // ino.end - // ino.method.getOffsetVector.27805.body - { - return m_OffsetVector; - } - // ino.end - - // ino.method.setOffset.27808.definition - public void setOffset(int Offset) - // ino.end - // ino.method.setOffset.27808.body - { - m_Offset = Offset; - } - // ino.end - - - // ino.method.sub.27811.definition - public void sub(CSubstitutionSet substitutionSet) - // ino.end - // ino.method.sub.27811.body - { - Iterator it = substitutionSet.getIterator(); - while(it.hasNext()){ - this.sub(it.next()); - } - } - // ino.end - - // ino.method.sub.27814.definition - public void sub(CSubstitution substitution) - // ino.end - // ino.method.sub.27814.body - { - //PL 05-08-25 hier muessen TypePlaceholder-Variablen auch erstezt werden, - //wenn sie als Subvariablen in typen vorkommen. - //if(m_AssumedType.equals(substitution.getTypeVar())){ - // m_AssumedType = substitution.getType(); - // System.out.println(); - m_AssumedType = substitution.applyThisSubstitution(m_AssumedType); - - } - // ino.end - - // ino.method.toString.27817.definition - public String toString() - // ino.end - // ino.method.toString.27817.body - { - return m_Identifier +": "+m_AssumedType.toString(); - //return m_Identifier +": "+m_AssumedType.getName(); - } - // ino.end - - // ino.method.equals.27820.definition - public final boolean equals(Object obj) - // ino.end - // ino.method.equals.27820.body - { - if(obj instanceof CTypeAssumption){ - CTypeAssumption assum = (CTypeAssumption)obj; - boolean ret = true; - ret &= m_ClassName.equals(assum.getClassName()); - ret &= m_Identifier.equals(assum.getIdentifier()); - ret &= m_AssumedType.equals(assum.getAssumedType()); - ret &= m_LineNumber==assum.getLineNumber(); - ret &= this.equalsAssumption(assum); - return ret; - } - else{ - return false; - } - } - // ino.end - - // ino.method.isPlaceholderVariable.27823.definition - public boolean isPlaceholderVariable() - // ino.end - // ino.method.isPlaceholderVariable.27823.body - { - return (m_AssumedType instanceof TypePlaceholder); - } - // ino.end - - // ino.method.equalsAssumption.27826.declaration - public abstract boolean equalsAssumption(CTypeAssumption assumption); - // ino.end - // ino.method.clone.27829.declaration - public abstract CTypeAssumption clone(); - // ino.end - // ino.method.getHashSetKey.27832.declaration - public abstract CTypeAssumptionKey getHashSetKey(); - // ino.end - -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumptionkey/CInstVarKey.java b/src/mycompiler/mytypereconstruction/typeassumptionkey/CInstVarKey.java deleted file mode 100755 index e9794c3c..00000000 --- a/src/mycompiler/mytypereconstruction/typeassumptionkey/CInstVarKey.java +++ /dev/null @@ -1,37 +0,0 @@ -// ino.module.CInstVarKey.8712.package -package mycompiler.mytypereconstruction.typeassumptionkey; -// ino.end - -// ino.class.CInstVarKey.27836.description type=javadoc -/** - * @author Jörg Bäuerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CInstVarKey.27836.declaration -public class CInstVarKey extends CTypeAssumptionKey -// ino.end -// ino.class.CInstVarKey.27836.body -{ - // ino.attribute.KEYPREFIX.27840.declaration - public static String KEYPREFIX = "InstVar"; - // ino.end - - // ino.method.CInstVarKey.27843.definition - public CInstVarKey(String className, String identifier) - // ino.end - // ino.method.CInstVarKey.27843.body - { - StringBuffer key = new StringBuffer(); - - key.append(KEYPREFIX); - key.append("#"); - key.append(className); - key.append("."); - key.append(identifier); - - m_KeyString = key.toString(); - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumptionkey/CLocalVarKey.java b/src/mycompiler/mytypereconstruction/typeassumptionkey/CLocalVarKey.java deleted file mode 100755 index 7b0f7e4a..00000000 --- a/src/mycompiler/mytypereconstruction/typeassumptionkey/CLocalVarKey.java +++ /dev/null @@ -1,131 +0,0 @@ -// ino.module.CLocalVarKey.8713.package -package mycompiler.mytypereconstruction.typeassumptionkey; -// ino.end - - -// ino.class.CLocalVarKey.27846.description type=javadoc -/** - * @author Jrg Buerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CLocalVarKey.27846.declaration -public class CLocalVarKey extends CTypeAssumptionKey implements IMethodBoundKey -// ino.end -// ino.class.CLocalVarKey.27846.body -{ - // ino.attribute.KEYPREFIX.27851.declaration - public static String KEYPREFIX = "LocalVar"; - // ino.end - - // ino.attribute.className.27854.declaration - String className; - // ino.end - // ino.attribute.methodName.27857.declaration - String methodName; - // ino.end - // ino.attribute.methodParaCount.27860.declaration - int methodParaCount; - // ino.end - // ino.attribute.blockId.27863.declaration - String blockId; - // ino.end - // ino.attribute.identifier.27866.declaration - String identifier; - // ino.end - // ino.attribute.overloadedMethodID.27869.declaration - int overloadedMethodID; - // ino.end - - // ino.attribute.isOverloadedInitialized.27872.declaration - private boolean isOverloadedInitialized=true; - // ino.end - - - // ino.method.CLocalVarKey.27875.definition - public CLocalVarKey(String className, String methodName, int methodParaCount, String blockId, String identifier) - // ino.end - // ino.method.CLocalVarKey.27875.body - { - this(className,methodName,methodParaCount,0,blockId,identifier); - isOverloadedInitialized=false; - } - // ino.end - - - // ino.method.CLocalVarKey.27878.definition - public CLocalVarKey(String className, String methodName, int methodParaCount, int overloadedMethodID, String blockId, String identifier) - // ino.end - // ino.method.CLocalVarKey.27878.body - { - - this.className=className; - this.methodName=methodName; - this.methodParaCount=methodParaCount; - this.blockId=blockId; - this.identifier=identifier; - this.overloadedMethodID=overloadedMethodID; - - StringBuffer key = new StringBuffer(); - - key.append(KEYPREFIX); - key.append("#"); - key.append(className); - key.append("."); - key.append(methodName); - key.append("("); - key.append(methodParaCount); - key.append(";"); - key.append(overloadedMethodID); - key.append(")"); - key.append("."); - key.append("Block_"); - key.append(blockId); - key.append("."); - key.append(identifier); - - m_KeyString = key.toString(); - } - // ino.end - - - // ino.method.getNextMethodKey.27881.definition - public CLocalVarKey getNextMethodKey() - // ino.end - // ino.method.getNextMethodKey.27881.body - { - return(new CLocalVarKey(className,methodName,methodParaCount,overloadedMethodID+1,blockId,identifier)); - } - // ino.end - - - // ino.method.getFirstMethodKey.27884.definition - public CLocalVarKey getFirstMethodKey() - // ino.end - // ino.method.getFirstMethodKey.27884.body - { - return(new CLocalVarKey(className,methodName,methodParaCount,blockId,identifier)); - } - // ino.end - - - // ino.method.getOverloadedMethodID.27887.definition - public int getOverloadedMethodID() - // ino.end - // ino.method.getOverloadedMethodID.27887.body - { - return overloadedMethodID; - } - // ino.end - - - // ino.method.isOverloadedIDSet.27890.definition - public boolean isOverloadedIDSet() - // ino.end - // ino.method.isOverloadedIDSet.27890.body - { - return isOverloadedInitialized; - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumptionkey/CMethodKey.java b/src/mycompiler/mytypereconstruction/typeassumptionkey/CMethodKey.java deleted file mode 100755 index cedd57b6..00000000 --- a/src/mycompiler/mytypereconstruction/typeassumptionkey/CMethodKey.java +++ /dev/null @@ -1,112 +0,0 @@ -// ino.module.CMethodKey.8714.package -package mycompiler.mytypereconstruction.typeassumptionkey; -// ino.end - -// ino.class.CMethodKey.27893.description type=javadoc -/** - * @author Jrg Buerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CMethodKey.27893.declaration -public class CMethodKey extends CTypeAssumptionKey implements IMethodBoundKey -// ino.end -// ino.class.CMethodKey.27893.body -{ - // ino.attribute.KEYPREFIX.27898.declaration - public static String KEYPREFIX = "Method"; - // ino.end - - - // ino.attribute.identifier.27901.declaration - private String identifier; - // ino.end - // ino.attribute.paraCount.27904.declaration - private int paraCount; - // ino.end - // ino.attribute.overloadedMethodID.27907.declaration - private int overloadedMethodID; - // ino.end - // ino.attribute.className.27910.declaration - private String className; - // ino.end - // ino.attribute.isOverloadedInitialized.27913.declaration - private boolean isOverloadedInitialized=true; - // ino.end - - // ino.method.CMethodKey.27916.definition - public CMethodKey(String className, String identifier, int paraCount) - // ino.end - // ino.method.CMethodKey.27916.body - { - this(className,identifier,paraCount,0); - isOverloadedInitialized=false; - } - // ino.end - - - // ino.method.CMethodKey.27919.definition - public CMethodKey(String className, String identifier, int paraCount, int overloadedMethodID) - // ino.end - // ino.method.CMethodKey.27919.body - { - - this.className=className; - this.identifier=identifier; - this.paraCount=paraCount; - this.overloadedMethodID=overloadedMethodID; - - StringBuffer key = new StringBuffer(); - - key.append(KEYPREFIX); - key.append("#"); - key.append(className); - key.append("."); - key.append(identifier); - key.append("("); - key.append(paraCount); - key.append(";"); - key.append(overloadedMethodID); - key.append(")"); - - m_KeyString = key.toString(); - } - // ino.end - - // ino.method.getNextMethodKey.27922.definition - public CMethodKey getNextMethodKey() - // ino.end - // ino.method.getNextMethodKey.27922.body - { - return(new CMethodKey(className,identifier, paraCount, overloadedMethodID+1)); - } - // ino.end - - // ino.method.getFirstMethodKey.27925.definition - public CMethodKey getFirstMethodKey() - // ino.end - // ino.method.getFirstMethodKey.27925.body - { - return(new CMethodKey(className,identifier, paraCount, 0)); - } - // ino.end - - // ino.method.getOverloadedMethodID.27928.definition - public int getOverloadedMethodID() - // ino.end - // ino.method.getOverloadedMethodID.27928.body - { - return overloadedMethodID; - } - // ino.end - - // ino.method.isOverloadedIDSet.27931.definition - public boolean isOverloadedIDSet() - // ino.end - // ino.method.isOverloadedIDSet.27931.body - { - return isOverloadedInitialized; - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumptionkey/CMethodParaKey.java b/src/mycompiler/mytypereconstruction/typeassumptionkey/CMethodParaKey.java deleted file mode 100755 index ebc4cb43..00000000 --- a/src/mycompiler/mytypereconstruction/typeassumptionkey/CMethodParaKey.java +++ /dev/null @@ -1,118 +0,0 @@ -// ino.module.CMethodParaKey.8715.package -package mycompiler.mytypereconstruction.typeassumptionkey; -// ino.end - -// ino.class.CMethodParaKey.27934.description type=javadoc -/** - * @author Jrg Buerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CMethodParaKey.27934.declaration -public class CMethodParaKey extends CTypeAssumptionKey implements IMethodBoundKey -// ino.end -// ino.class.CMethodParaKey.27934.body -{ - // ino.attribute.KEYPREFIX.27939.declaration - public static String KEYPREFIX = "MethodPara"; - // ino.end - - - // ino.attribute.className.27942.declaration - private String className; - // ino.end - // ino.attribute.methodName.27945.declaration - private String methodName; - // ino.end - // ino.attribute.overloadedMethodID.27948.declaration - private int overloadedMethodID; - // ino.end - // ino.attribute.identifier.27951.declaration - private String identifier; - // ino.end - // ino.attribute.methodParaCount.27954.declaration - private int methodParaCount; - // ino.end - - - // ino.attribute.isOverloadedInitialized.27957.declaration - private boolean isOverloadedInitialized=true; - // ino.end - - // ino.method.CMethodParaKey.27960.definition - public CMethodParaKey(String className, String methodName, int methodParaCount, String identifier) - // ino.end - // ino.method.CMethodParaKey.27960.body - { - this(className,methodName,methodParaCount,0,identifier); - isOverloadedInitialized=false; - } - // ino.end - - // ino.method.CMethodParaKey.27963.definition - public CMethodParaKey(String className, String methodName, int methodParaCount,int overloadedMethodID, String identifier) - // ino.end - // ino.method.CMethodParaKey.27963.body - { - - this.className=className; - this.methodName=methodName; - this.overloadedMethodID=overloadedMethodID; - this.identifier=identifier; - this.methodParaCount=methodParaCount; - - - StringBuffer key = new StringBuffer(); - - key.append(KEYPREFIX); - key.append("#"); - key.append(className); - key.append("."); - key.append(methodName); - key.append("("); - key.append(methodParaCount); - key.append(";"); - key.append(overloadedMethodID); - key.append(")"); - key.append("."); - key.append(identifier); - - m_KeyString = key.toString(); - } - // ino.end - // ino.method.getNextMethodKey.27966.definition - public CMethodParaKey getNextMethodKey() - // ino.end - // ino.method.getNextMethodKey.27966.body - { - return(new CMethodParaKey(className,methodName, methodParaCount, overloadedMethodID+1,identifier)); - - } - // ino.end - // ino.method.getFirstMethodKey.27969.definition - public CMethodParaKey getFirstMethodKey() - // ino.end - // ino.method.getFirstMethodKey.27969.body - { - return(new CMethodParaKey(className,methodName, methodParaCount,identifier)); - } - // ino.end - // ino.method.getOverloadedMethodID.27972.definition - public int getOverloadedMethodID() - // ino.end - // ino.method.getOverloadedMethodID.27972.body - { - return overloadedMethodID; - } - // ino.end - - // ino.method.isOverloadedIDSet.27975.definition - public boolean isOverloadedIDSet() - // ino.end - // ino.method.isOverloadedIDSet.27975.body - { - return isOverloadedInitialized; - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumptionkey/CTypeAssumptionKey.java b/src/mycompiler/mytypereconstruction/typeassumptionkey/CTypeAssumptionKey.java deleted file mode 100755 index 5e60a117..00000000 --- a/src/mycompiler/mytypereconstruction/typeassumptionkey/CTypeAssumptionKey.java +++ /dev/null @@ -1,94 +0,0 @@ -// ino.module.CTypeAssumptionKey.8716.package -package mycompiler.mytypereconstruction.typeassumptionkey; -// ino.end - -// ino.module.CTypeAssumptionKey.8716.import -import mycompiler.mytypereconstruction.set.IHashSetKey; -// ino.end - - -// ino.class.CTypeAssumptionKey.27978.description type=javadoc -/** - * Diese Klasse modelliert einen eindeutigen Schlssel fr eine Typannahme, - * die in einem CTypeAssumptionSet abgelegt wird. - * @author Jrg Buerle - * @version $Date: 2006/06/13 10:37:32 $ - */ -// ino.end -// ino.class.CTypeAssumptionKey.27978.declaration -public abstract class CTypeAssumptionKey implements IHashSetKey -// ino.end -// ino.class.CTypeAssumptionKey.27978.body -{ - - // ino.attribute.m_KeyString.27982.declaration - protected String m_KeyString = null; - // ino.end - - // ino.method.getKeyString.27985.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * @return Returns the KeyString. - */ - // ino.end - // ino.method.getKeyString.27985.definition - public String getKeyString() - // ino.end - // ino.method.getKeyString.27985.body - { - return m_KeyString; - } - // ino.end - - // ino.method.equals.27988.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * @param obj - * @return - */ - // ino.end - // ino.method.equals.27988.definition - public boolean equals(Object obj) - // ino.end - // ino.method.equals.27988.body - { - if(obj instanceof CTypeAssumptionKey){ - return m_KeyString.equals(((CTypeAssumptionKey)obj).getKeyString()); - } - else{ - return false; - } - } - // ino.end - - // ino.method.hashCode.27991.defdescription type=javadoc - /** - * Author: Jrg Buerle
- * @return - */ - // ino.end - // ino.method.hashCode.27991.definition - public int hashCode() - // ino.end - // ino.method.hashCode.27991.body - { - return m_KeyString.hashCode(); - } - // ino.end - - // ino.method.toString.27994.defdescription type=javadoc - /** - *
Author: Jrg Buerle - * @return - */ - // ino.end - // ino.method.toString.27994.definition - public String toString() - // ino.end - // ino.method.toString.27994.body - { - return this.getKeyString(); - } - // ino.end -} -// ino.end diff --git a/src/mycompiler/mytypereconstruction/typeassumptionkey/IMethodBoundKey.java b/src/mycompiler/mytypereconstruction/typeassumptionkey/IMethodBoundKey.java deleted file mode 100755 index 92852937..00000000 --- a/src/mycompiler/mytypereconstruction/typeassumptionkey/IMethodBoundKey.java +++ /dev/null @@ -1,68 +0,0 @@ -// ino.module.IMethodBoundKey.8717.package -package mycompiler.mytypereconstruction.typeassumptionkey; -// ino.end - -// ino.class.IMethodBoundKey.27997.declaration -public interface IMethodBoundKey -// ino.end -// ino.class.IMethodBoundKey.27997.body -{ - - - // ino.method.getNextMethodKey.28000.decldescription type=javadoc - /** - * Berechnet anhand des aktuellen Schluessels den Schluessel - * fuer die naechste Ueberlandene Methode - * - * Bsp: - * - * Es gibt 2 Methoden - * - * -overloaded(int a) - * -overloaded(char a) - * - * Wenn ich den MethodKey der 1. Methode (je nach reihenfolge - * der Methodendeklaration) habe, kann ich durch den Aufruf - * von getNextMethodKey() den Key der 2. Methode berechnen - * lassen ohne dass der Key neu erstellt werden muss - */ - // ino.end - // ino.method.getNextMethodKey.28000.declaration - public IMethodBoundKey getNextMethodKey(); - // ino.end - - // ino.method.getFirstMethodKey.28003.decldescription type=javadoc - /** - * Liefert immer den Key der 1. Methode - * - */ - // ino.end - // ino.method.getFirstMethodKey.28003.declaration - public IMethodBoundKey getFirstMethodKey(); - // ino.end - - - // ino.method.getOverloadedMethodID.28006.decldescription type=javadoc - /** - * Liefert die Überladen-ID der Methode - * @return overloaded-ID - */ - // ino.end - // ino.method.getOverloadedMethodID.28006.declaration - public int getOverloadedMethodID(); - // ino.end - - - // ino.method.isOverloadedIDSet.28009.decldescription type=javadoc - /** - * Gibt an, ob die overloaded-id initialisiert wurde, - * oder ob das Objekt mit dem "lazy"-konstruktor initialisiert wurde - * @return true/false - */ - // ino.end - // ino.method.isOverloadedIDSet.28009.declaration - public boolean isOverloadedIDSet(); - // ino.end - -} -// ino.end diff --git a/src/mycompiler/unused/ConstantValueAttribute.java b/src/mycompiler/unused/ConstantValueAttribute.java deleted file mode 100755 index 32b25676..00000000 --- a/src/mycompiler/unused/ConstantValueAttribute.java +++ /dev/null @@ -1,7 +0,0 @@ -package mycompiler.unused; -public class ConstantValueAttribute -{ - /*private short attribute_name_index; - private int attribute_length; - private short constantvalue_index;*/ -} \ No newline at end of file diff --git a/src/mycompiler/unused/Import.java b/src/mycompiler/unused/Import.java deleted file mode 100755 index 65b9432b..00000000 --- a/src/mycompiler/unused/Import.java +++ /dev/null @@ -1,8 +0,0 @@ -package mycompiler.unused; - -import de.dhbwstuttgart.syntaxtree.misc.Status; - -public class Import extends Status -{ - -} \ No newline at end of file diff --git a/src/mycompiler/unused/JavaCompiler.java b/src/mycompiler/unused/JavaCompiler.java deleted file mode 100755 index b8a1063e..00000000 --- a/src/mycompiler/unused/JavaCompiler.java +++ /dev/null @@ -1,30 +0,0 @@ -package mycompiler.unused; - -import de.dhbwstuttgart.typeinference.parser.JavaParser; -import de.dhbwstuttgart.typeinference.parser.Scanner; - -public class JavaCompiler extends JavaParser -{ - public static void main(String[] args) - { - JavaParser Parser = new JavaParser(); - Scanner JScanner = new Scanner(new java.io.InputStreamReader(System.in)); - try - { - //Parser.path.toString(); - /*SourceFile SCfile =(SourceFile)*/ Parser.yyparse(JScanner); - } - catch(java.io.IOException ie) - { - ie.printStackTrace(); - } - catch(JavaParser.yyException ye) - { - System.err.println(ye); - } - //Parser.path.toString(); - } - - - -} diff --git a/src/mycompiler/unused/TestClass.java b/src/mycompiler/unused/TestClass.java deleted file mode 100755 index d71fb565..00000000 --- a/src/mycompiler/unused/TestClass.java +++ /dev/null @@ -1,19 +0,0 @@ -package mycompiler.unused; - -import mycompiler.mytypereconstruction.set.CSet; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - -/** - * - * @author Jörg Bäuerle - * @version $Date: 2005/03/29 09:28:51 $ - */ -public class TestClass { - public static void main(String[] args){ - CSubstitutionSet substSet = new CSubstitutionSet(); - CSet set = new CTypeAssumptionSet(); - set.unite((CSet)substSet); - } -} diff --git a/test/bytecode/BytecodeTester.java b/test/bytecode/BytecodeTester.java index 47096d0a..806deb38 100644 --- a/test/bytecode/BytecodeTester.java +++ b/test/bytecode/BytecodeTester.java @@ -7,11 +7,11 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.util.Vector; +import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.myexception.JVMCodeException; import junit.framework.TestCase; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.JVMCodeException; public class BytecodeTester{ diff --git a/test/bytecode/EmptyClassTest.java b/test/bytecode/EmptyClassTest.java index 601bb28c..56c3c848 100644 --- a/test/bytecode/EmptyClassTest.java +++ b/test/bytecode/EmptyClassTest.java @@ -3,12 +3,12 @@ package bytecode; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.myexception.JVMCodeException; import org.junit.Test; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; public class EmptyClassTest extends TestCase { diff --git a/test/bytecode/GeneralTest.java b/test/bytecode/GeneralTest.java index 816ecfbf..bf379b24 100644 --- a/test/bytecode/GeneralTest.java +++ b/test/bytecode/GeneralTest.java @@ -9,8 +9,8 @@ import junit.framework.TestCase; import org.junit.Test; +import de.dhbwstuttgart.bytecode.ClassFile; import sun.misc.IOUtils; -import mycompiler.mybytecode.ClassFile; public class GeneralTest extends TestCase{ @Test diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java index 54f6a05b..f4a62459 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java @@ -3,15 +3,15 @@ package mycompiler.test.unittest.typeReconstructionTest; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; import org.apache.log4j.Logger; import org.apache.log4j.xml.DOMConfigurator; -import de.dhbwstuttgart.core.SourceFile; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; +import de.dhbwstuttgart.syntaxtree.Interface; +import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java index c24539c1..76154140 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java @@ -4,7 +4,6 @@ package mycompiler.test.unittest.typeReconstructionTest; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; import org.apache.log4j.Logger; @@ -13,9 +12,10 @@ import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; -import de.dhbwstuttgart.core.SourceFile; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; +import de.dhbwstuttgart.syntaxtree.Interface; +import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java index fc76f76d..c6fc5538 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java @@ -3,7 +3,6 @@ package mycompiler.test.unittest.typeReconstructionTest; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.myinterface.Interface; import mycompiler.mymodifier.Modifiers; import org.apache.log4j.xml.DOMConfigurator; @@ -11,9 +10,10 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import de.dhbwstuttgart.core.SourceFile; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; +import de.dhbwstuttgart.syntaxtree.Interface; +import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; diff --git a/test/plugindevelopment/TRMEqualTest.java b/test/plugindevelopment/TRMEqualTest.java index 01fa8698..65475cec 100644 --- a/test/plugindevelopment/TRMEqualTest.java +++ b/test/plugindevelopment/TRMEqualTest.java @@ -11,7 +11,7 @@ import org.junit.Test; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; diff --git a/test/syntaxTree/NodeEqualTest.java b/test/syntaxTree/NodeEqualTest.java index daaaf534..0b4c2073 100644 --- a/test/syntaxTree/NodeEqualTest.java +++ b/test/syntaxTree/NodeEqualTest.java @@ -8,8 +8,8 @@ import org.junit.Test; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; -import de.dhbwstuttgart.core.SourceFile; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.syntaxtree.SourceFile; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import junit.framework.TestCase; From 9f97bef6cdb43019cdabf9ae7f1f1558da1932fd Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Fri, 5 Sep 2014 11:49:31 +0200 Subject: [PATCH 26/31] Umstrukturierung zu de.dhbwstuttgart-Packagenamen --- bin/.gitignore | 7 +- bin/bytecode/FieldTest.jav | 6 + bin/parser/BoundedParameter.jav | 3 + bin/parser/FieldInitializationTest.jav | 3 + bin/parser/GenericFieldVarTest.jav | 3 + bin/parser/ImportTest.jav | 4 + .../dhbwstuttgart/JvmDisassembler}/.cvsignore | 0 .../JvmDisassembler}/GenericsTest.java | 2 +- .../JvmDisassembler}/jvmDisassembler.java | 2 +- .../dhbwstuttgart/core/AClassOrInterface.java | 7 +- .../dhbwstuttgart/core}/ConsoleInterface.java | 5 +- src/de/dhbwstuttgart/core/MyCompiler.java | 6 +- src/de/dhbwstuttgart/core/MyCompilerAPI.java | 2 +- .../{typeinference => }/parser/.cvsignore | 0 .../parser/BoundedClassIdentifierList.java | 2 +- .../parser/ClassAndParameter.java | 2 +- .../parser/GenericVarDeclarationList.java | 2 +- .../parser/InterfaceAndParameter.java | 2 +- .../parser/InterfaceList.java | 2 +- .../parser/JavaClassName.java | 2 +- .../{typeinference => }/parser/JavaLexer.java | 2 +- .../{typeinference => }/parser/JavaLexer.lex | 0 .../parser/JavaParser.java | 18 +- .../{typeinference => }/parser/JavaParser.jay | 0 .../parser/JavaParser_old.jay | 0 .../{typeinference => }/parser/Scanner.java | 2 +- .../{typeinference => }/parser/Token.java | 2 +- .../syntaxtree/BasicAssumptionClass.java | 3 +- src/de/dhbwstuttgart/syntaxtree/Class.java | 232 +------- src/de/dhbwstuttgart/syntaxtree/Constant.java | 11 +- .../dhbwstuttgart/syntaxtree/Constructor.java | 11 +- src/de/dhbwstuttgart/syntaxtree/Field.java | 1 - .../syntaxtree/FieldDeclaration.java | 12 - .../syntaxtree/FormalParameter.java | 54 +- .../syntaxtree/GenericDeclarationList.java | 2 +- .../dhbwstuttgart/syntaxtree/Interface.java | 2 +- .../syntaxtree/InterfaceBody.java | 3 +- src/de/dhbwstuttgart/syntaxtree/Method.java | 39 +- .../syntaxtree/ParameterList.java | 1 - .../dhbwstuttgart/syntaxtree/SourceFile.java | 22 +- .../dhbwstuttgart/syntaxtree/misc/DeclId.java | 6 +- .../dhbwstuttgart/syntaxtree/misc/Status.java | 15 +- .../dhbwstuttgart/syntaxtree/misc/UsedId.java | 2 +- .../syntaxtree/modifier}/Abstract.java | 2 +- .../syntaxtree/modifier}/Final.java | 2 +- .../modifier}/InterfaceModifier.java | 2 +- .../syntaxtree/modifier}/Modifier.java | 2 +- .../syntaxtree/modifier}/Modifiers.java | 2 +- .../syntaxtree/modifier}/Private.java | 2 +- .../syntaxtree/modifier}/Protected.java | 2 +- .../syntaxtree/modifier}/Public.java | 2 +- .../syntaxtree/modifier}/Static.java | 2 +- .../syntaxtree/modifier}/Super.java | 2 +- .../syntaxtree/operator/AddOp.java | 5 - .../syntaxtree/operator/EqualOp.java | 5 - .../syntaxtree/operator/LogOp.java | 5 - .../syntaxtree/operator/MulOp.java | 5 - .../syntaxtree/operator/NotEqualOp.java | 8 - .../syntaxtree/operator/Operator.java | 6 - .../syntaxtree/operator/RelOp.java | 6 - .../syntaxtree/statement/Assign.java | 30 +- .../syntaxtree/statement/Binary.java | 31 +- .../syntaxtree/statement/Block.java | 69 +-- .../syntaxtree/statement/BoolLiteral.java | 76 +-- .../syntaxtree/statement/CastExpr.java | 27 +- .../syntaxtree/statement/CharLiteral.java | 79 +-- .../syntaxtree/statement/DoubleLiteral.java | 43 +- .../syntaxtree/statement/EmptyStmt.java | 39 +- .../syntaxtree/statement/Expr.java | 20 - .../syntaxtree/statement/ExprStmt.java | 13 +- .../syntaxtree/statement/FloatLiteral.java | 43 +- .../syntaxtree/statement/ForStmt.java | 19 - .../syntaxtree/statement/IfStmt.java | 148 ----- .../syntaxtree/statement/InstVar.java | 91 +--- .../syntaxtree/statement/InstanceOf.java | 42 +- .../syntaxtree/statement/IntLiteral.java | 58 +- .../statement/LambdaExpression.java | 22 +- .../syntaxtree/statement/Literal.java | 33 +- .../syntaxtree/statement/LocalOrFieldVar.java | 45 +- .../syntaxtree/statement/LocalVarDecl.java | 106 +--- .../syntaxtree/statement/LongLiteral.java | 44 +- .../syntaxtree/statement/MethodCall.java | 512 +----------------- .../syntaxtree/statement/NegativeExpr.java | 27 +- .../syntaxtree/statement/NewArray.java | 60 +- .../syntaxtree/statement/NewClass.java | 44 +- .../syntaxtree/statement/NotExpr.java | 30 +- .../syntaxtree/statement/Null.java | 39 +- .../syntaxtree/statement/PositivExpr.java | 41 +- .../syntaxtree/statement/PostDecExpr.java | 27 +- .../syntaxtree/statement/PostIncExpr.java | 31 +- .../syntaxtree/statement/PreDecExpr.java | 28 +- .../syntaxtree/statement/PreIncExpr.java | 28 +- .../syntaxtree/statement/Return.java | 34 +- .../syntaxtree/statement/Statement.java | 27 +- .../syntaxtree/statement/StringLiteral.java | 31 +- .../syntaxtree/statement/This.java | 69 +-- .../syntaxtree/statement/WhileStmt.java | 36 +- .../syntaxtree/type/CRefTypeSet.java | 2 +- .../syntaxtree/type/FreshWildcardType.java | 2 +- .../syntaxtree/type/GenericTypeVar.java | 24 +- .../dhbwstuttgart/syntaxtree/type/Pair.java | 3 +- .../syntaxtree/type/RefType.java | 26 +- .../dhbwstuttgart/syntaxtree/type/Type.java | 9 +- .../syntaxtree/type/TypePlaceholder.java | 194 +------ src/de/dhbwstuttgart/typeinference/FunN.java | 23 +- .../typeinference/FunNInterface.java | 1 - .../typeinference/FunNMethod.java | 2 - .../typeinference/Overloading.java | 2 - .../typeinference/TypeInsertable.java | 3 +- .../dhbwstuttgart/typeinference/Typeable.java | 1 - .../typeinference/TypeinferenceResultSet.java | 8 +- .../typeinference/assumptions/Assumption.java | 3 +- .../assumptions/ClassAssumption.java | 3 - .../assumptions/FieldAssumption.java | 2 +- .../assumptions/GenericVarAssumption.java | 2 +- .../assumptions/MethodAssumption.java | 2 - .../assumptions/TypeAssumptions.java | 8 +- .../typeinference/exceptions/ParserError.java | 2 +- .../typedeployment/TypeInsertPoint.java | 3 - .../typeinference/unify/CSet.java | 72 +++ .../typeinference/unify/CSubstitution.java | 252 +++++++++ .../unify/CSubstitutionGenVar.java | 70 +++ .../typeinference/unify/CSubstitutionSet.java | 111 ++++ .../typeinference/unify/CVectorSet.java | 165 ++++++ .../typeinference/unify/Unify.java | 4 +- src/myJvmDisassembler/.cvsignore | 3 - .../AbstractInferenceTestOLD_2.java | 2 +- .../AbstractInferenceTestOld.java | 2 +- .../typeReconstructionTest/TrMakeFCTest.java | 2 +- .../TrSubUnifyTest.java | 2 +- .../typeReconstructionTest/TrUnifyTest.java | 2 +- .../InsertSingleTypeTest.java | 2 +- .../MartinTestCases/Tester.java | 2 +- test/plugindevelopment/TRMEqualTest.java | 2 +- .../TypeInsertSetEqualTest.java | 2 +- test/plugindevelopment/TypeInsertTester.java | 2 +- .../MultipleTypesInsertTester.java | 2 +- .../OverloadingInsertTest.java | 2 +- test/syntaxTree/NodeEqualTest.java | 2 +- 139 files changed, 878 insertions(+), 2854 deletions(-) create mode 100644 bin/bytecode/FieldTest.jav create mode 100644 bin/parser/BoundedParameter.jav create mode 100644 bin/parser/FieldInitializationTest.jav create mode 100644 bin/parser/GenericFieldVarTest.jav create mode 100644 bin/parser/ImportTest.jav rename {bin/myJvmDisassembler => src/de/dhbwstuttgart/JvmDisassembler}/.cvsignore (100%) rename src/{myJvmDisassembler => de/dhbwstuttgart/JvmDisassembler}/GenericsTest.java (83%) rename src/{myJvmDisassembler => de/dhbwstuttgart/JvmDisassembler}/jvmDisassembler.java (99%) rename src/{userinterface => de/dhbwstuttgart/core}/ConsoleInterface.java (94%) rename src/de/dhbwstuttgart/{typeinference => }/parser/.cvsignore (100%) rename src/de/dhbwstuttgart/{typeinference => }/parser/BoundedClassIdentifierList.java (92%) rename src/de/dhbwstuttgart/{typeinference => }/parser/ClassAndParameter.java (98%) rename src/de/dhbwstuttgart/{typeinference => }/parser/GenericVarDeclarationList.java (92%) rename src/de/dhbwstuttgart/{typeinference => }/parser/InterfaceAndParameter.java (98%) rename src/de/dhbwstuttgart/{typeinference => }/parser/InterfaceList.java (95%) rename src/de/dhbwstuttgart/{typeinference => }/parser/JavaClassName.java (98%) rename src/de/dhbwstuttgart/{typeinference => }/parser/JavaLexer.java (99%) rename src/de/dhbwstuttgart/{typeinference => }/parser/JavaLexer.lex (100%) rename src/de/dhbwstuttgart/{typeinference => }/parser/JavaParser.java (99%) rename src/de/dhbwstuttgart/{typeinference => }/parser/JavaParser.jay (100%) rename src/de/dhbwstuttgart/{typeinference => }/parser/JavaParser_old.jay (100%) rename src/de/dhbwstuttgart/{typeinference => }/parser/Scanner.java (96%) rename src/de/dhbwstuttgart/{typeinference => }/parser/Token.java (98%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/Abstract.java (93%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/Final.java (93%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/InterfaceModifier.java (88%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/Modifier.java (93%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/Modifiers.java (98%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/Private.java (92%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/Protected.java (92%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/Public.java (92%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/Static.java (92%) rename src/{mycompiler/mymodifier => de/dhbwstuttgart/syntaxtree/modifier}/Super.java (88%) create mode 100755 src/de/dhbwstuttgart/typeinference/unify/CSet.java create mode 100755 src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java create mode 100755 src/de/dhbwstuttgart/typeinference/unify/CSubstitutionGenVar.java create mode 100755 src/de/dhbwstuttgart/typeinference/unify/CSubstitutionSet.java create mode 100755 src/de/dhbwstuttgart/typeinference/unify/CVectorSet.java delete mode 100755 src/myJvmDisassembler/.cvsignore diff --git a/bin/.gitignore b/bin/.gitignore index 79da6df7..4ce50fc9 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,7 +1,6 @@ -/bytecode /de -/myJvmDisassembler -/mycompiler -/parser /plugindevelopment +/mycompiler +/mytypereconstruction /syntaxTree +/userinterface diff --git a/bin/bytecode/FieldTest.jav b/bin/bytecode/FieldTest.jav new file mode 100644 index 00000000..57f1614a --- /dev/null +++ b/bin/bytecode/FieldTest.jav @@ -0,0 +1,6 @@ +class FieldTest{ + String var; + String methode(String para1){ + return var; + } +} \ No newline at end of file diff --git a/bin/parser/BoundedParameter.jav b/bin/parser/BoundedParameter.jav new file mode 100644 index 00000000..6d7518a9 --- /dev/null +++ b/bin/parser/BoundedParameter.jav @@ -0,0 +1,3 @@ +class Matrix{ + String op = "String"; +} diff --git a/bin/parser/FieldInitializationTest.jav b/bin/parser/FieldInitializationTest.jav new file mode 100644 index 00000000..302667b9 --- /dev/null +++ b/bin/parser/FieldInitializationTest.jav @@ -0,0 +1,3 @@ +class FieldInitializationTest{ + String var = "hallo"; +} \ No newline at end of file diff --git a/bin/parser/GenericFieldVarTest.jav b/bin/parser/GenericFieldVarTest.jav new file mode 100644 index 00000000..a47b41eb --- /dev/null +++ b/bin/parser/GenericFieldVarTest.jav @@ -0,0 +1,3 @@ +class Test{ + A var; +} diff --git a/bin/parser/ImportTest.jav b/bin/parser/ImportTest.jav new file mode 100644 index 00000000..2de55cee --- /dev/null +++ b/bin/parser/ImportTest.jav @@ -0,0 +1,4 @@ +import java.util.*; + +class ImportTest{ +} \ No newline at end of file diff --git a/bin/myJvmDisassembler/.cvsignore b/src/de/dhbwstuttgart/JvmDisassembler/.cvsignore similarity index 100% rename from bin/myJvmDisassembler/.cvsignore rename to src/de/dhbwstuttgart/JvmDisassembler/.cvsignore diff --git a/src/myJvmDisassembler/GenericsTest.java b/src/de/dhbwstuttgart/JvmDisassembler/GenericsTest.java similarity index 83% rename from src/myJvmDisassembler/GenericsTest.java rename to src/de/dhbwstuttgart/JvmDisassembler/GenericsTest.java index 954fad1f..5185f056 100755 --- a/src/myJvmDisassembler/GenericsTest.java +++ b/src/de/dhbwstuttgart/JvmDisassembler/GenericsTest.java @@ -1,4 +1,4 @@ -package myJvmDisassembler; +package de.dhbwstuttgart.JvmDisassembler; diff --git a/src/myJvmDisassembler/jvmDisassembler.java b/src/de/dhbwstuttgart/JvmDisassembler/jvmDisassembler.java similarity index 99% rename from src/myJvmDisassembler/jvmDisassembler.java rename to src/de/dhbwstuttgart/JvmDisassembler/jvmDisassembler.java index 19bb41ba..6988d70a 100755 --- a/src/myJvmDisassembler/jvmDisassembler.java +++ b/src/de/dhbwstuttgart/JvmDisassembler/jvmDisassembler.java @@ -1,4 +1,4 @@ -package myJvmDisassembler; +package de.dhbwstuttgart.JvmDisassembler; import java.util.*; import java.io.*; diff --git a/src/de/dhbwstuttgart/core/AClassOrInterface.java b/src/de/dhbwstuttgart/core/AClassOrInterface.java index 7b9d3091..93323e79 100755 --- a/src/de/dhbwstuttgart/core/AClassOrInterface.java +++ b/src/de/dhbwstuttgart/core/AClassOrInterface.java @@ -6,17 +6,18 @@ package de.dhbwstuttgart.core; // ino.module.AClassOrInterface.8526.import import java.util.Vector; -import mycompiler.mymodifier.Modifiers; - import org.apache.log4j.Logger; // ino.end + + import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.misc.UsedId; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; // ino.class.AClassOrInterface.21186.description type=javadoc /** diff --git a/src/userinterface/ConsoleInterface.java b/src/de/dhbwstuttgart/core/ConsoleInterface.java similarity index 94% rename from src/userinterface/ConsoleInterface.java rename to src/de/dhbwstuttgart/core/ConsoleInterface.java index 8bd5e028..576077d7 100755 --- a/src/userinterface/ConsoleInterface.java +++ b/src/de/dhbwstuttgart/core/ConsoleInterface.java @@ -1,16 +1,13 @@ -package userinterface; +package de.dhbwstuttgart.core; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; -import java.util.Vector; import java.util.*; import org.apache.log4j.Logger; import org.apache.log4j.varia.NullAppender; -import de.dhbwstuttgart.core.MyCompiler; -import de.dhbwstuttgart.core.MyCompilerAPI; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; public class ConsoleInterface { diff --git a/src/de/dhbwstuttgart/core/MyCompiler.java b/src/de/dhbwstuttgart/core/MyCompiler.java index c8f2d43b..2eb043b0 100755 --- a/src/de/dhbwstuttgart/core/MyCompiler.java +++ b/src/de/dhbwstuttgart/core/MyCompiler.java @@ -22,6 +22,9 @@ import com.sun.org.apache.xerces.internal.impl.xs.identity.Field; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.parser.JavaParser; +import de.dhbwstuttgart.parser.Scanner; +import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.ClassBody; import de.dhbwstuttgart.syntaxtree.FormalParameter; @@ -45,9 +48,6 @@ import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.ParserError; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaParser; -import de.dhbwstuttgart.typeinference.parser.Scanner; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; diff --git a/src/de/dhbwstuttgart/core/MyCompilerAPI.java b/src/de/dhbwstuttgart/core/MyCompilerAPI.java index fcfb8450..e774618f 100755 --- a/src/de/dhbwstuttgart/core/MyCompilerAPI.java +++ b/src/de/dhbwstuttgart/core/MyCompilerAPI.java @@ -11,12 +11,12 @@ import java.util.Vector; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.parser.JavaParser; import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.exceptions.ParserError; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaParser; // ino.class.MyCompilerAPI.21328.description type=javadoc /** diff --git a/src/de/dhbwstuttgart/typeinference/parser/.cvsignore b/src/de/dhbwstuttgart/parser/.cvsignore similarity index 100% rename from src/de/dhbwstuttgart/typeinference/parser/.cvsignore rename to src/de/dhbwstuttgart/parser/.cvsignore diff --git a/src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java b/src/de/dhbwstuttgart/parser/BoundedClassIdentifierList.java similarity index 92% rename from src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java rename to src/de/dhbwstuttgart/parser/BoundedClassIdentifierList.java index f3713403..6a41d80d 100644 --- a/src/de/dhbwstuttgart/typeinference/parser/BoundedClassIdentifierList.java +++ b/src/de/dhbwstuttgart/parser/BoundedClassIdentifierList.java @@ -1,4 +1,4 @@ -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; import java.util.Vector; diff --git a/src/de/dhbwstuttgart/typeinference/parser/ClassAndParameter.java b/src/de/dhbwstuttgart/parser/ClassAndParameter.java similarity index 98% rename from src/de/dhbwstuttgart/typeinference/parser/ClassAndParameter.java rename to src/de/dhbwstuttgart/parser/ClassAndParameter.java index ef928aee..87441788 100755 --- a/src/de/dhbwstuttgart/typeinference/parser/ClassAndParameter.java +++ b/src/de/dhbwstuttgart/parser/ClassAndParameter.java @@ -1,5 +1,5 @@ // ino.module.ClassAndParameter.8613.package -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; // ino.end // ino.module.ClassAndParameter.8613.import diff --git a/src/de/dhbwstuttgart/typeinference/parser/GenericVarDeclarationList.java b/src/de/dhbwstuttgart/parser/GenericVarDeclarationList.java similarity index 92% rename from src/de/dhbwstuttgart/typeinference/parser/GenericVarDeclarationList.java rename to src/de/dhbwstuttgart/parser/GenericVarDeclarationList.java index 0833d370..ef1ad7c8 100644 --- a/src/de/dhbwstuttgart/typeinference/parser/GenericVarDeclarationList.java +++ b/src/de/dhbwstuttgart/parser/GenericVarDeclarationList.java @@ -1,4 +1,4 @@ -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; import java.util.Vector; diff --git a/src/de/dhbwstuttgart/typeinference/parser/InterfaceAndParameter.java b/src/de/dhbwstuttgart/parser/InterfaceAndParameter.java similarity index 98% rename from src/de/dhbwstuttgart/typeinference/parser/InterfaceAndParameter.java rename to src/de/dhbwstuttgart/parser/InterfaceAndParameter.java index b13858d9..1aa50b6f 100755 --- a/src/de/dhbwstuttgart/typeinference/parser/InterfaceAndParameter.java +++ b/src/de/dhbwstuttgart/parser/InterfaceAndParameter.java @@ -1,5 +1,5 @@ // ino.module.InterfaceAndParameter.8614.package -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; // ino.end // ino.module.InterfaceAndParameter.8614.import diff --git a/src/de/dhbwstuttgart/typeinference/parser/InterfaceList.java b/src/de/dhbwstuttgart/parser/InterfaceList.java similarity index 95% rename from src/de/dhbwstuttgart/typeinference/parser/InterfaceList.java rename to src/de/dhbwstuttgart/parser/InterfaceList.java index 3e20555f..3277b359 100755 --- a/src/de/dhbwstuttgart/typeinference/parser/InterfaceList.java +++ b/src/de/dhbwstuttgart/parser/InterfaceList.java @@ -1,5 +1,5 @@ // ino.module.InterfaceList.8615.package -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; // ino.end // ino.module.InterfaceList.8615.import diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java b/src/de/dhbwstuttgart/parser/JavaClassName.java similarity index 98% rename from src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java rename to src/de/dhbwstuttgart/parser/JavaClassName.java index 0cfd41ab..1f99511a 100644 --- a/src/de/dhbwstuttgart/typeinference/parser/JavaClassName.java +++ b/src/de/dhbwstuttgart/parser/JavaClassName.java @@ -1,4 +1,4 @@ -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; import java.util.Vector; diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaLexer.java b/src/de/dhbwstuttgart/parser/JavaLexer.java similarity index 99% rename from src/de/dhbwstuttgart/typeinference/parser/JavaLexer.java rename to src/de/dhbwstuttgart/parser/JavaLexer.java index 92f09f6a..4c5ccab1 100644 --- a/src/de/dhbwstuttgart/typeinference/parser/JavaLexer.java +++ b/src/de/dhbwstuttgart/parser/JavaLexer.java @@ -6,7 +6,7 @@ * * ********************************************/ // user code: -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; public class JavaLexer { diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaLexer.lex b/src/de/dhbwstuttgart/parser/JavaLexer.lex similarity index 100% rename from src/de/dhbwstuttgart/typeinference/parser/JavaLexer.lex rename to src/de/dhbwstuttgart/parser/JavaLexer.lex diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java b/src/de/dhbwstuttgart/parser/JavaParser.java similarity index 99% rename from src/de/dhbwstuttgart/typeinference/parser/JavaParser.java rename to src/de/dhbwstuttgart/parser/JavaParser.java index 607328c7..188af602 100644 --- a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.java +++ b/src/de/dhbwstuttgart/parser/JavaParser.java @@ -6,7 +6,7 @@ Backup von JavaParser.jay 10.April 17 Uhr */ -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; import java.util.Vector; @@ -28,6 +28,14 @@ import de.dhbwstuttgart.syntaxtree.ParameterList; import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.modifier.Abstract; +import de.dhbwstuttgart.syntaxtree.modifier.Final; +import de.dhbwstuttgart.syntaxtree.modifier.Modifier; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; +import de.dhbwstuttgart.syntaxtree.modifier.Private; +import de.dhbwstuttgart.syntaxtree.modifier.Protected; +import de.dhbwstuttgart.syntaxtree.modifier.Public; +import de.dhbwstuttgart.syntaxtree.modifier.Static; import de.dhbwstuttgart.syntaxtree.operator.AndOp; import de.dhbwstuttgart.syntaxtree.operator.DivideOp; import de.dhbwstuttgart.syntaxtree.operator.EqualOp; @@ -98,14 +106,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Void; import de.dhbwstuttgart.syntaxtree.type.WildcardType; -import mycompiler.mymodifier.Abstract; -import mycompiler.mymodifier.Final; -import mycompiler.mymodifier.Modifier; -import mycompiler.mymodifier.Modifiers; -import mycompiler.mymodifier.Private; -import mycompiler.mymodifier.Protected; -import mycompiler.mymodifier.Public; -import mycompiler.mymodifier.Static; public class JavaParser{ public Vector path = new Vector(); diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay b/src/de/dhbwstuttgart/parser/JavaParser.jay similarity index 100% rename from src/de/dhbwstuttgart/typeinference/parser/JavaParser.jay rename to src/de/dhbwstuttgart/parser/JavaParser.jay diff --git a/src/de/dhbwstuttgart/typeinference/parser/JavaParser_old.jay b/src/de/dhbwstuttgart/parser/JavaParser_old.jay similarity index 100% rename from src/de/dhbwstuttgart/typeinference/parser/JavaParser_old.jay rename to src/de/dhbwstuttgart/parser/JavaParser_old.jay diff --git a/src/de/dhbwstuttgart/typeinference/parser/Scanner.java b/src/de/dhbwstuttgart/parser/Scanner.java similarity index 96% rename from src/de/dhbwstuttgart/typeinference/parser/Scanner.java rename to src/de/dhbwstuttgart/parser/Scanner.java index e8a0f9b9..d8eef5c0 100755 --- a/src/de/dhbwstuttgart/typeinference/parser/Scanner.java +++ b/src/de/dhbwstuttgart/parser/Scanner.java @@ -1,5 +1,5 @@ // ino.module.Scanner.8618.package -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; // ino.end // ino.class.Scanner.24842.declaration public class Scanner extends JavaLexer implements JavaParser.yyInput diff --git a/src/de/dhbwstuttgart/typeinference/parser/Token.java b/src/de/dhbwstuttgart/parser/Token.java similarity index 98% rename from src/de/dhbwstuttgart/typeinference/parser/Token.java rename to src/de/dhbwstuttgart/parser/Token.java index 4c433d08..a371818e 100755 --- a/src/de/dhbwstuttgart/typeinference/parser/Token.java +++ b/src/de/dhbwstuttgart/parser/Token.java @@ -1,5 +1,5 @@ // ino.module.Token.8619.package -package de.dhbwstuttgart.typeinference.parser; +package de.dhbwstuttgart.parser; // ino.end // ino.class.Token.24859.declaration public class Token diff --git a/src/de/dhbwstuttgart/syntaxtree/BasicAssumptionClass.java b/src/de/dhbwstuttgart/syntaxtree/BasicAssumptionClass.java index 81c082ef..e6a319b7 100755 --- a/src/de/dhbwstuttgart/syntaxtree/BasicAssumptionClass.java +++ b/src/de/dhbwstuttgart/syntaxtree/BasicAssumptionClass.java @@ -3,8 +3,7 @@ package de.dhbwstuttgart.syntaxtree; // ino.end // ino.module.BasicAssumptionClass.8552.import -import mycompiler.mymodifier.Modifiers; -// ino.end +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; // ino.class.BasicAssumptionClass.23000.declaration public class BasicAssumptionClass extends Class diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 2dba6720..9a7b8ffc 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -9,72 +9,13 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mybytecode.ClassFile; -import mycompiler.myexception.CTypeReconstructionException; -import mycompiler.myexception.JVMCodeException; -import mycompiler.myexception.SCClassBodyException; -import mycompiler.myexception.SCClassException; -import mycompiler.myexception.SCExcept; -import mycompiler.mymodifier.Modifiers; -import mycompiler.mystatement.*; -import mycompiler.mytypereconstruction.CReconstructionTuple; -import mycompiler.mytypereconstruction.CSubstitution; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.set.CReconstructionTupleSet; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.set.IHashSetKey; -import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - import de.dhbwstuttgart.core.AClassOrInterface; import de.dhbwstuttgart.core.IItemWithOffset; -import de.dhbwstuttgart.core.SourceFile; -import de.dhbwstuttgart.core.SyntaxTreeNode; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.statement.Block; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Statement; @@ -90,7 +31,6 @@ import de.dhbwstuttgart.typeinference.assumptions.ClassAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.unify.FC_TTO; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -387,24 +327,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit return classfile; } */ - public void codegen(ClassFile classfile, Vector paralist) - throws JVMCodeException - { - for(int i=0 ; i < this.getFields().size() ; i++) - { - /* - * if(this.fielddecl.elementAt(i) instanceof InstVarDecl) - { - ((InstVarDecl)this.fielddecl.elementAt(i)).codegen(classfile, paralist); - } - else - */ - { - this.fielddecl.elementAt(i).codegen(classfile, paralist); - } - } - } - + public void set_UsedId (UsedId uid) // ino.end // ino.method.set_UsedId.23074.body @@ -655,7 +578,6 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit // ino.end // ino.method.TRProg.23110.definition public ConstraintsSet typeReconstruction(FC_TTO supportData, TypeAssumptions globalAssumptions) - throws CTypeReconstructionException // ino.end // ino.method.TRProg.23110.body { @@ -911,30 +833,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit return ret; } */ - // ino.method.clear.23113.defdescription type=javadoc - /** - * Entfernt Annahmen f�r lokale Variablen, die f�r Methodenparameter erzeugt - * worden sind. (siehe Algorithmus 5.17 TRProg, Martin Pl�micke) - *
Author: J�rg B�uerle - * @param V - * @param locals - */ - // ino.end - // ino.method.clear.23113.definition - void clear(CTypeAssumptionSet V, Vector locals) - // ino.end - // ino.method.clear.23113.body - { - Iterator localsIt = locals.iterator(); - while(localsIt.hasNext()){ - CTypeAssumption local = localsIt.next(); - CTypeAssumption assum = V.getElement(local.getHashSetKey()); - if(assum!=null){ - V.removeElement(local.getHashSetKey()); - } - } - } - // ino.end + // ino.method.RetType.23119.defdescription type=javadoc /** @@ -1037,128 +936,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit // // } - // ino.method.addOffsetsToAssumption.23131.defdescription type=javadoc - /** - * Methode f�gt zu einer CTypeAssumption alle - * Offsets hinzu, wo die Variable benutzt wird. - *
Author: Thomas Hornberger 07.04.2006 - *
Author: Arne Lüdtke 20.01.2007, Auf Polymorphie erweitert. - * Wird nicht mehr verwendet. In Block ausgelagert. - * @return - */ - // ino.end - // ino.method.addOffsetsToAssumption.23131.definition - public static void addOffsetsToAssumption(CTypeAssumption localAssumption, Block localBlock,String NameVariable,boolean isMemberVariable) - // ino.end - // ino.method.addOffsetsToAssumption.23131.body - { - /*if(localBlock!=null){ - for(Object vectorObjekt : localBlock.statements) //durchlaufe alle Statements dieses Blocks - { - if(vectorObjekt instanceof Block) //Bei Block - { - Block b = (Block)vectorObjekt; - addOffsetsToAssumption(localAssumption,b,NameVariable,isMemberVariable);//rekursiver Aufruf - } - else - { - String Name_Superklasse = vectorObjekt.getClass().getSuperclass().getSimpleName(); - if(Name_Superklasse.equals("Statement")) //Bei Statement - { - Statement s = (Statement)vectorObjekt; - try{ - if(addOffsetsToStatement(localAssumption,s,NameVariable,isMemberVariable)==false) - {break;}} - catch(NullPointerException NPE){} - } - else if(Name_Superklasse.equals("Expr") || Name_Superklasse.equals("BinaryExpr") || Name_Superklasse.equals("UnaryExpr")) //Bei Expression - { - Expr e = (Expr)vectorObjekt; - try{ - addOffsetsToExpression(localAssumption,e,NameVariable,isMemberVariable);} - catch(NullPointerException NPE){} - } - } - - }}*/ - } - // ino.end - - // ino.method.addOffsetsToStatement.23134.defdescription type=javadoc - /** - * Hilfs-Methode f�r die Offset-Zuweisung - * durchsucht ein Statement rekursiv - *
Author: Thomas Hornberger 08.04.2006 - *
Author: Arne Lüdtke 20.10.2007, Auf Polymorphie umgebaut. - * @return - */ - // ino.end - // ino.method.addOffsetsToStatement.23134.definition - public static boolean addOffsetsToStatement(CTypeAssumption localAssumption,Statement statement, String NameVariable, boolean isMemberVariable) - // ino.end - // ino.method.addOffsetsToStatement.23134.body - { - return statement.addOffsetsToStatement(localAssumption,NameVariable,isMemberVariable); - /*if(statement instanceof Block) //Wenn Block - { - Block b = (Block)statement; - addOffsetsToAssumption(localAssumption,b,NameVariable,isMemberVariable); - } - else if(statement instanceof IfStmt)//Wenn if - { - IfStmt i = (IfStmt)statement; - addOffsetsToExpression(localAssumption,i.expr,NameVariable,isMemberVariable); - addOffsetsToStatement(localAssumption,i.else_block,NameVariable,isMemberVariable); - addOffsetsToStatement(localAssumption,i.then_block,NameVariable,isMemberVariable); - } - else if(statement instanceof Return)//Wenn Return - { - Return r = (Return)statement; - addOffsetsToExpression(localAssumption,r.retexpr,NameVariable,isMemberVariable); - } - else if(statement instanceof WhileStmt)//Wenn While - { - WhileStmt w = (WhileStmt)statement; - addOffsetsToExpression(localAssumption,w.expr,NameVariable,isMemberVariable); - addOffsetsToStatement(localAssumption,w.loop_block,NameVariable,isMemberVariable); - } - else if(statement instanceof LocalVarDecl)//Wenn Lokale-Variable-Deklaration - { - isMemberVariable=true;//hoth 02.05.06 - if(isMemberVariable)//Wenn Objektvariable - { - LocalVarDecl l = (LocalVarDecl)statement; - if(l.get_Name().equals(NameVariable)) - { - if(isFirstLocalVarDecl==false) - {return false;}//Wenn jetzt lokale Variable kommt, dann springe raus - else - {isFirstLocalVarDecl=false;} - } - } - } - return true;*/ - } - // ino.end - - // ino.method.addOffsetsToExpression.23137.defdescription type=javadoc - /** - * Hilfs-Methode f�r die Offset-Zuweisung - * durchsucht eine Expression rekursiv - *
Author: Thomas Hornberger 07.04.2006 - *
Authos: Arne Lüdtke 20.01.2007, Auf Polymorphie umgebaut. - * @return - */ - // ino.end - // ino.method.addOffsetsToExpression.23137.definition - public static void addOffsetsToExpression(CTypeAssumption localAssumption,Expr expression, String NameVariable,boolean isMemberVariable) - // ino.end - // ino.method.addOffsetsToExpression.23137.body - { - expression.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } - // ino.end - + // ino.method.getSimpleName.23140.defdescription type=javadoc /** * HOTI diff --git a/src/de/dhbwstuttgart/syntaxtree/Constant.java b/src/de/dhbwstuttgart/syntaxtree/Constant.java index 5790a442..b9e5dcc7 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Constant.java +++ b/src/de/dhbwstuttgart/syntaxtree/Constant.java @@ -10,17 +10,15 @@ import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.parser.JavaClassName; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Literal; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.mymodifier.Modifiers; -// ino.end -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; // ino.class.Constant.23212.description type=javadoc /** @@ -225,11 +223,6 @@ public class Constant extends Method //return null; } - @Override - public void replaceType(CReplaceTypeEvent e) { - // TODO Auto-generated method stub - - } @Override public int getTypeLineNumber() { diff --git a/src/de/dhbwstuttgart/syntaxtree/Constructor.java b/src/de/dhbwstuttgart/syntaxtree/Constructor.java index e35a46de..bc301e51 100644 --- a/src/de/dhbwstuttgart/syntaxtree/Constructor.java +++ b/src/de/dhbwstuttgart/syntaxtree/Constructor.java @@ -4,7 +4,9 @@ import java.util.Vector; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.statement.Block; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; @@ -17,9 +19,6 @@ import de.dhbwstuttgart.typeinference.assumptions.ConstructorAssumption; import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; -import mycompiler.mymodifier.Modifiers; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; public class Constructor extends Method { private Method methode; @@ -179,12 +178,6 @@ public class Constructor extends Method { this.methode.setOffset(Offset); } - @Override - public void replaceType(CReplaceTypeEvent e) { - - this.methode.replaceType(e); - } - @Override public int getTypeLineNumber() { diff --git a/src/de/dhbwstuttgart/syntaxtree/Field.java b/src/de/dhbwstuttgart/syntaxtree/Field.java index 74a1b08e..51930b34 100644 --- a/src/de/dhbwstuttgart/syntaxtree/Field.java +++ b/src/de/dhbwstuttgart/syntaxtree/Field.java @@ -17,7 +17,6 @@ import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.Typeable; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; public abstract class Field extends SyntaxTreeNode implements TypeInsertable, Typeable, Generic, GenericTypeInsertable{ diff --git a/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java index 02f4d8e8..087689c9 100644 --- a/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java +++ b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java @@ -18,7 +18,6 @@ import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.FieldAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; /** * Eine Feldinitialisation steht für eine Felddeklaration mit gleichzeitiger Wertzuweisung @@ -111,17 +110,6 @@ public class FieldDeclaration extends Field{ return ret; } - @Override - public void replaceType(CReplaceTypeEvent e) { - // TODO Auto-generated method stub - - } - @Override - public int getTypeLineNumber() { - // TODO Auto-generated method stub - return 0; - } - public int getVariableLength() { return declid.elementAt(0).get_Name().length(); diff --git a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java index 4b631265..cb726848 100755 --- a/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java +++ b/src/de/dhbwstuttgart/syntaxtree/FormalParameter.java @@ -5,34 +5,7 @@ package de.dhbwstuttgart.syntaxtree; // ino.module.FormalParameter.8561.import import java.util.Vector; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.syntaxtree.misc.DeclId; @@ -48,7 +21,7 @@ import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; // ino.class.FormalParameter.23391.declaration -public class FormalParameter extends SyntaxTreeNode implements ITypeReplacementListener, Typeable, TypeInsertable +public class FormalParameter extends SyntaxTreeNode implements Typeable, TypeInsertable // ino.end // ino.class.FormalParameter.23391.body { @@ -91,13 +64,6 @@ public class FormalParameter extends SyntaxTreeNode implements ITypeReplacementL // ino.end // ino.method.setType.23404.body { - if(this.type instanceof TypePlaceholder){ - ((TypePlaceholder)this.type).removeReplacementListener(this); - } - - if(t instanceof TypePlaceholder){ - ((TypePlaceholder)t).addReplacementListener(this); - } this.type = t; } // ino.end @@ -188,24 +154,6 @@ public class FormalParameter extends SyntaxTreeNode implements ITypeReplacementL } // ino.end - // ino.method.replaceType.23428.defdescription type=javadoc - /** - *
Author: J�rg B�uerle - * @param e - */ - // ino.end - // ino.method.replaceType.23428.definition - public void replaceType(CReplaceTypeEvent e) - // ino.end - // ino.method.replaceType.23428.body - { - inferencelog.debug("Ersetze Typ in FormalParameter \""+this.getIdentifier()+"\""); - if(type instanceof TypePlaceholder){ - ((TypePlaceholder)type).removeReplacementListener(this); - } - this.setType(e.getNewType()); - } - // ino.end // ino.method.getTypeLineNumber.23431.defdescription type=javadoc /** diff --git a/src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java b/src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java index 45f23959..115e60e3 100644 --- a/src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java +++ b/src/de/dhbwstuttgart/syntaxtree/GenericDeclarationList.java @@ -2,8 +2,8 @@ package de.dhbwstuttgart.syntaxtree; import java.util.Vector; +import de.dhbwstuttgart.parser.GenericVarDeclarationList; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.typeinference.parser.GenericVarDeclarationList; /** diff --git a/src/de/dhbwstuttgart/syntaxtree/Interface.java b/src/de/dhbwstuttgart/syntaxtree/Interface.java index 1502b881..2d98f3c5 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Interface.java +++ b/src/de/dhbwstuttgart/syntaxtree/Interface.java @@ -9,11 +9,11 @@ import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.core.AClassOrInterface; import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import mycompiler.mymodifier.Modifiers; /** * Ein Interface ist eine abstrakte Klasse, erbt daher von Class diff --git a/src/de/dhbwstuttgart/syntaxtree/InterfaceBody.java b/src/de/dhbwstuttgart/syntaxtree/InterfaceBody.java index 12bc5df1..69b9d6f4 100755 --- a/src/de/dhbwstuttgart/syntaxtree/InterfaceBody.java +++ b/src/de/dhbwstuttgart/syntaxtree/InterfaceBody.java @@ -7,8 +7,7 @@ import java.util.Vector; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.myexception.JVMCodeException; -import mycompiler.mymodifier.Modifiers; -// ino.end +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; // ino.class.InterfaceBody.23984.description type=javadoc /** diff --git a/src/de/dhbwstuttgart/syntaxtree/Method.java b/src/de/dhbwstuttgart/syntaxtree/Method.java index 47979102..a1044daf 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Method.java +++ b/src/de/dhbwstuttgart/syntaxtree/Method.java @@ -7,16 +7,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mymodifier.Modifiers; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; import de.dhbwstuttgart.bytecode.ClassFile; @@ -25,7 +15,9 @@ import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.myexception.SCMethodException; import de.dhbwstuttgart.myexception.SCStatementException; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.misc.DeclId; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.statement.Block; import de.dhbwstuttgart.syntaxtree.statement.Return; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -41,7 +33,6 @@ import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; @@ -204,14 +195,6 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable // ino.end // ino.method.setReturnType.23539.body { - if(this.returntype instanceof TypePlaceholder){ - ((TypePlaceholder)this.returntype).removeReplacementListener(this); - } - - if(type instanceof TypePlaceholder){ - ((TypePlaceholder)type).addReplacementListener(this); - } - // this.returntype = type; //auskommentiert von Andreas Stadelmeier (a10023) this.returntype = type; } // ino.end @@ -423,24 +406,6 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable } // ino.end - // ino.method.replaceType.23599.defdescription type=javadoc - /** - *
Author: Jrg Buerle - * @param e - */ - // ino.end - // ino.method.replaceType.23599.definition - public void replaceType(CReplaceTypeEvent e) - // ino.end - // ino.method.replaceType.23599.body - { - inferencelog.debug("Ersetze Typ in Method \""+this.get_Method_Name()+"()\"\n"); - if(returntype instanceof TypePlaceholder){ - ((TypePlaceholder)returntype).removeReplacementListener(this); - } - this.setReturnType(e.getNewType()); - } - // ino.end // ino.method.getTypeLineNumber.23602.defdescription type=javadoc /** diff --git a/src/de/dhbwstuttgart/syntaxtree/ParameterList.java b/src/de/dhbwstuttgart/syntaxtree/ParameterList.java index 78febc12..7db364cd 100755 --- a/src/de/dhbwstuttgart/syntaxtree/ParameterList.java +++ b/src/de/dhbwstuttgart/syntaxtree/ParameterList.java @@ -4,7 +4,6 @@ package de.dhbwstuttgart.syntaxtree; // ino.module.ParameterList.8565.import import java.util.Vector; -import mycompiler.mytype.*; import java.util.Iterator; diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index 6ed62634..c2fb4b18 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -10,15 +10,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mymodifier.Modifiers; -import mycompiler.mymodifier.Public; -import mycompiler.mytypereconstruction.CIntersectionType; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; import de.dhbwstuttgart.bytecode.ClassFile; @@ -28,8 +19,11 @@ import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.myexception.SCClassException; import de.dhbwstuttgart.myexception.SCException; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; +import de.dhbwstuttgart.syntaxtree.modifier.Public; import de.dhbwstuttgart.syntaxtree.type.BooleanType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; @@ -50,11 +44,8 @@ import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.unify.FC_TTO; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.myclass.*; -import mycompiler.*; import sun.reflect.generics.reflectiveObjects.NotImplementedException; import sun.reflect.generics.reflectiveObjects.TypeVariableImpl; @@ -1177,10 +1168,7 @@ public class SourceFile for(int j=0;j()); - CInstVarTypeAssumption instVar = new CInstVarTypeAssumption(className, fields[j].getName(), new RefType(fields[j].getType().getName(),-1), MyCompiler.NO_LINENUMBER,MyCompiler.NO_LINENUMBER,new Vector()); - //basicAssumptions.addFieldOrLocalVarAssumption(instVar); - parentClass.addField(new FieldDeclaration(fields[j].getName(),new RefType(fields[j].getType().getName(),-1))); + parentClass.addField(new FieldDeclaration(fields[j].getName(),new RefType(fields[j].getType().getName(),-1))); } } for(int j=0;j(),null); ParameterList paraList = new ParameterList(); for(int k=0;k())); } //basicAssumptions.addMethodIntersectionType(new CIntersectionType(constructor)); Method constructorMethod = de.dhbwstuttgart.syntaxtree.Method.createEmptyMethod(methodName, parentClass); diff --git a/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java index 8012781a..7142823c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/DeclId.java @@ -4,9 +4,6 @@ package de.dhbwstuttgart.syntaxtree.misc; // ino.module.DeclId.8558.import import java.util.Vector; -import mycompiler.mymodifier.Final; -import mycompiler.mymodifier.Modifiers; - import org.apache.log4j.Logger; // ino.end @@ -15,6 +12,7 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.bytecode.Attribute; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; @@ -23,6 +21,8 @@ import de.dhbwstuttgart.bytecode.SignatureInfo; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.Constant; +import de.dhbwstuttgart.syntaxtree.modifier.Final; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.statement.Assign; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.ExprStmt; diff --git a/src/de/dhbwstuttgart/syntaxtree/misc/Status.java b/src/de/dhbwstuttgart/syntaxtree/misc/Status.java index ea598693..e68b7d32 100755 --- a/src/de/dhbwstuttgart/syntaxtree/misc/Status.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/Status.java @@ -2,9 +2,6 @@ package de.dhbwstuttgart.syntaxtree.misc; // ino.end -// ino.module.Status.8566.import -import mycompiler.unused.Import; -// ino.end // ino.class.Status.23644.declaration public abstract class Status @@ -14,9 +11,6 @@ public abstract class Status // ino.attribute.userdef.23647.declaration protected UserDef userdef; // ino.end - // ino.attribute.imp.23650.declaration - protected Import imp; - // ino.end // ino.method.set_UserDef.23653.definition public void set_UserDef( UserDef userdef) @@ -26,13 +20,6 @@ public abstract class Status this.userdef = userdef; } // ino.end - // ino.method.set_Import.23656.definition - public void set_Import(Import imp) - // ino.end - // ino.method.set_Import.23656.body - { - this.imp = imp; - } - // ino.end + } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java index 937f9a03..78b68fb4 100755 --- a/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java @@ -7,11 +7,11 @@ import java.util.Vector; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; // ino.class.UsedId.23659.declaration diff --git a/src/mycompiler/mymodifier/Abstract.java b/src/de/dhbwstuttgart/syntaxtree/modifier/Abstract.java similarity index 93% rename from src/mycompiler/mymodifier/Abstract.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/Abstract.java index 69027ed7..0fbc63fd 100755 --- a/src/mycompiler/mymodifier/Abstract.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/Abstract.java @@ -1,5 +1,5 @@ // ino.module.Abstract.8585.package -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/mymodifier/Final.java b/src/de/dhbwstuttgart/syntaxtree/modifier/Final.java similarity index 93% rename from src/mycompiler/mymodifier/Final.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/Final.java index 8330eba5..03be2767 100755 --- a/src/mycompiler/mymodifier/Final.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/Final.java @@ -1,5 +1,5 @@ // ino.module.Final.8586.package -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/mymodifier/InterfaceModifier.java b/src/de/dhbwstuttgart/syntaxtree/modifier/InterfaceModifier.java similarity index 88% rename from src/mycompiler/mymodifier/InterfaceModifier.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/InterfaceModifier.java index 8de2bee1..b6fd3ece 100755 --- a/src/mycompiler/mymodifier/InterfaceModifier.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/InterfaceModifier.java @@ -1,7 +1,7 @@ /** * */ -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/mymodifier/Modifier.java b/src/de/dhbwstuttgart/syntaxtree/modifier/Modifier.java similarity index 93% rename from src/mycompiler/mymodifier/Modifier.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/Modifier.java index 1d72d4e7..22bcda47 100755 --- a/src/mycompiler/mymodifier/Modifier.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/Modifier.java @@ -1,5 +1,5 @@ // ino.module.Modifier.8587.package -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/mymodifier/Modifiers.java b/src/de/dhbwstuttgart/syntaxtree/modifier/Modifiers.java similarity index 98% rename from src/mycompiler/mymodifier/Modifiers.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/Modifiers.java index c51a0ccd..759f59cc 100755 --- a/src/mycompiler/mymodifier/Modifiers.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/Modifiers.java @@ -1,5 +1,5 @@ // ino.module.Modifiers.8588.package -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; // ino.end // ino.module.Modifiers.8588.import diff --git a/src/mycompiler/mymodifier/Private.java b/src/de/dhbwstuttgart/syntaxtree/modifier/Private.java similarity index 92% rename from src/mycompiler/mymodifier/Private.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/Private.java index 4b36125c..913b5dad 100755 --- a/src/mycompiler/mymodifier/Private.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/Private.java @@ -1,5 +1,5 @@ // ino.module.Private.8589.package -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/mymodifier/Protected.java b/src/de/dhbwstuttgart/syntaxtree/modifier/Protected.java similarity index 92% rename from src/mycompiler/mymodifier/Protected.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/Protected.java index c732b00f..bc6b6f23 100755 --- a/src/mycompiler/mymodifier/Protected.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/Protected.java @@ -1,5 +1,5 @@ // ino.module.Protected.8590.package -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/mymodifier/Public.java b/src/de/dhbwstuttgart/syntaxtree/modifier/Public.java similarity index 92% rename from src/mycompiler/mymodifier/Public.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/Public.java index 0236b80e..52ca21ff 100755 --- a/src/mycompiler/mymodifier/Public.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/Public.java @@ -1,5 +1,5 @@ // ino.module.Public.8591.package -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/mymodifier/Static.java b/src/de/dhbwstuttgart/syntaxtree/modifier/Static.java similarity index 92% rename from src/mycompiler/mymodifier/Static.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/Static.java index c5de6ead..18402b76 100755 --- a/src/mycompiler/mymodifier/Static.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/Static.java @@ -1,5 +1,5 @@ // ino.module.Static.8592.package -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/mycompiler/mymodifier/Super.java b/src/de/dhbwstuttgart/syntaxtree/modifier/Super.java similarity index 88% rename from src/mycompiler/mymodifier/Super.java rename to src/de/dhbwstuttgart/syntaxtree/modifier/Super.java index c12de826..3baa9d4e 100755 --- a/src/mycompiler/mymodifier/Super.java +++ b/src/de/dhbwstuttgart/syntaxtree/modifier/Super.java @@ -1,7 +1,7 @@ /** * */ -package mycompiler.mymodifier; +package de.dhbwstuttgart.syntaxtree.modifier; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java index c5d1e660..5dae26d7 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java @@ -22,11 +22,6 @@ import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java index 8c5b87bb..c8f58be3 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java @@ -16,11 +16,6 @@ import de.dhbwstuttgart.syntaxtree.statement.Null; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java index 17c73e23..33472b5b 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java @@ -26,11 +26,6 @@ import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java index 1ffa2147..47c8d887 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java @@ -16,11 +16,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; // ino.class.MulOp.24231.declaration public abstract class MulOp extends Operator diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java index 7f8d19cc..91b22924 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java @@ -16,14 +16,6 @@ import de.dhbwstuttgart.syntaxtree.statement.Null; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; - - - // ino.class.NotEqualOp.24241.declaration public class NotEqualOp extends RelOp diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java index 0a588a61..29304f01 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java @@ -26,12 +26,6 @@ import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; - diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java index 135f0ae4..ec22a5e2 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java @@ -19,12 +19,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; - // ino.class.RelOp.24299.declaration public abstract class RelOp extends Operator // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java index 224d2f56..941734b3 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java @@ -7,31 +7,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CMultiplyTuple; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CMultiplyTupleSet; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; - -// ino.end - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -39,6 +16,7 @@ import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.myexception.SCExcept; import de.dhbwstuttgart.myexception.SCStatementException; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -52,7 +30,6 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -257,11 +234,6 @@ public class Assign extends Expr } // ino.end - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr1.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - expr2.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } @Override public String getTypeInformation(){ diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java index ff127df9..53f8886d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java @@ -7,32 +7,8 @@ import java.util.HashMap; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -59,6 +35,7 @@ import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -265,12 +242,6 @@ public class Binary extends BinaryExpr { } // ino.end - - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr1.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - expr2.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java index 3ab3a23e..0a5796ae 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java @@ -7,31 +7,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; @@ -51,6 +28,7 @@ import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -185,43 +163,6 @@ public class Block extends Statement } // ino.end - - public void addOffsetsToAssumption(CTypeAssumption localAssumption, String NameVariable,boolean isMemberVariable) - { - for(Object vectorObjekt : this.statements) //durchlaufe alle Statements dieses Blocks - { - if(vectorObjekt instanceof Block) //Bei Block - { - Block b = (Block)vectorObjekt; - b.addOffsetsToAssumption(localAssumption,NameVariable,isMemberVariable);//rekursiver Aufruf - } - else - { - String Name_Superklasse = vectorObjekt.getClass().getSuperclass().getSimpleName(); - if(Name_Superklasse.equals("Statement")) //Bei Statement - { - Statement s = (Statement)vectorObjekt; - try{ - if(s.addOffsetsToStatement(localAssumption,NameVariable,isMemberVariable)==false) - {break;}} - catch(NullPointerException NPE){} - } - else if(Name_Superklasse.equals("Expr") || Name_Superklasse.equals("BinaryExpr") || Name_Superklasse.equals("UnaryExpr")) //Bei Expression - { - Expr e = (Expr)vectorObjekt; - try{ - e.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable);} - catch(NullPointerException NPE){} - } - } - } - } - - public boolean addOffsetsToStatement(CTypeAssumption localAssumption, String NameVariable, boolean isMemberVariable) - { - addOffsetsToAssumption(localAssumption,NameVariable,isMemberVariable); - return true; - } @Override @@ -256,9 +197,6 @@ public class Block extends Statement this.setType(tph); } } - if (this.type instanceof TypePlaceholder) { - ((TypePlaceholder)this.type).addReplacementListener(this); - } }else{ this.setType(new Void(0)); } @@ -281,11 +219,6 @@ public class Block extends Statement } */ - - public void replaceType(CReplaceTypeEvent e) { - super.replaceType(e); - } - @Override public String getTypeInformation(){ String ret = "\n"; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java index 19bc0716..b1b39e80 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java @@ -5,27 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -41,6 +21,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -141,51 +122,6 @@ public class BoolLiteral extends Literal // ino.end - // ino.method.TRStatement.25117.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25117.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - - // ino.method.TRExp.25120.defdescription type=javadoc - /** - * Workaround: �berschreibt Methode TRExp aus der Super-Klasse - * Literal, weil die Implementierung von Unify (noch) nicht mit - * Basetypes umgehen kann.
- * Anstatt den Basetype BooleanType zur�ckzugeben, wird ein - * RefType zur�ckgegeben.
- * Diese Methode kann sp�ter entfernt werden, sodass automatisch die Methode der - * Super-Klasse verwendet wird. - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRExp.25120.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25120.body - { - CTripleSet tripleSet = new CTripleSet(); - tripleSet.addElement(new CTriple(sigma, new RefType("java.lang.Boolean",getOffset()),V)); - return tripleSet; - } - // ino.end - - // ino.method.wandleRefTypeAttributes2GenericAttributes.25123.definition - public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) - // ino.end - // ino.method.wandleRefTypeAttributes2GenericAttributes.25123.body - { - } - // ino.end - @Override @@ -210,6 +146,16 @@ public class BoolLiteral extends Literal return ret; } + + + @Override + public void wandleRefTypeAttributes2GenericAttributes( + Vector paralist, + Vector genericMethodParameters) { + // TODO Auto-generated method stub + + } + } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java index 87832a22..681a0354 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java @@ -6,28 +6,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -43,6 +22,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -141,11 +121,6 @@ public class CastExpr extends UnaryExpr } // ino.end - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } - @Override diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java index f150db34..b8163af1 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CharLiteral.java @@ -4,29 +4,7 @@ package de.dhbwstuttgart.syntaxtree.statement; // ino.module.CharLiteral.8628.import import java.util.Hashtable; import java.util.Vector; - -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -42,6 +20,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -133,54 +112,6 @@ public class CharLiteral extends Literal } // ino.end - - // ino.method.TRStatement.25194.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25194.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - - // ino.method.TRExp.25197.defdescription type=javadoc - /** - * Workaround: �berschreibt Methode TRExp aus der Super-Klasse - * Literal, weil die Implementierung von Unify (noch) nicht mit - * Basetypes umgehen kann.
- * Anstatt den Basetype CharacterType zur�ckzugeben, wird ein - * RefType zur�ckgegeben.
- * Diese Methode kann sp�ter entfernt werden, sodass automatisch die Methode der - * Super-Klasse verwendet wird. - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRExp.25197.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25197.body - { - CTripleSet tripleSet = new CTripleSet(); - tripleSet.addElement(new CTriple(sigma, new RefType("java.lang.Character",getOffset()),V)); - return tripleSet; - } - // ino.end - - // ino.method.wandleRefTypeAttributes2GenericAttributes.25200.definition - public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) - // ino.end - // ino.method.wandleRefTypeAttributes2GenericAttributes.25200.body - { - } - // ino.end - - - @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { // TODO Auto-generated method stub @@ -198,5 +129,13 @@ public class CharLiteral extends Literal Vector ret = new Vector(); return ret; } + + + + @Override + public void wandleRefTypeAttributes2GenericAttributes( + Vector paralist, + Vector genericMethodParameters) { + } } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java index 85b0778a..903ee739 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java @@ -5,12 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; @@ -31,6 +25,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; // ino.end @@ -144,42 +139,6 @@ public class DoubleLiteral extends Literal } // ino.end - - // ino.method.TRStatement.25478.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25478.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - // ino.method.TRExp.25481.defdescription type=javadoc - /** - * Workaround: �berschreibt Methode TRExp aus der Super-Klasse - * Literal, weil die Implementierung von Unify (noch) nicht mit - * Basetypes umgehen kann.
- * Anstatt den Basetype IntegerType zur�ckzugeben, wird ein - * RefType zur�ckgegeben.
- * Diese Methode kann sp�ter entfernt werden, sodass automatisch die Methode der - * Super-Klasse verwendet wird. - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRExp.25481.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25481.body - { - CTripleSet tripleSet = new CTripleSet(); - tripleSet.addElement(new CTriple(sigma, new RefType("java.lang.Double",getOffset()),V)); - return tripleSet; - } - // ino.end // ino.method.toString.25484.defdescription type=javadoc /** diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java index 1967fe04..68d04cd7 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/EmptyStmt.java @@ -5,28 +5,8 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; @@ -39,6 +19,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -80,14 +61,6 @@ public class EmptyStmt extends Statement { } // ino.end - // ino.method.TRStatement.25219.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25219.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end // ino.method.wandleRefTypeAttributes2GenericAttributes.25222.definition public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) @@ -97,10 +70,6 @@ public class EmptyStmt extends Statement } // ino.end - public boolean addOffsetsToStatement(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - return true; - } @Override public ConstraintsSet TYPEStmt(TypeAssumptions assumptions) { @@ -108,12 +77,6 @@ public class EmptyStmt extends Statement return null; } - public void replaceType(CReplaceTypeEvent e) { - // TODO Auto-generated method stub - throw new NotImplementedException(); - } - - public int getTypeLineNumber() { throw new NotImplementedException(); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java b/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java index db241201..ba3d9563 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Expr.java @@ -15,17 +15,6 @@ import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.mytypereconstruction.CMultiplyTuple; -import mycompiler.mytypereconstruction.CSubstitution; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CMultiplyTupleSet; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -// ino.end - @@ -120,14 +109,5 @@ public abstract class Expr extends ExprStmt public ConstraintsSet TYPEStmt(TypeAssumptions assumptions){ throw new NotImplementedException(); //wird die TYPEStmt-Methode innerhalb einer Expr aufgerufen, dann ist etwas schief gelaufen. } - - - public abstract void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable); - - public boolean addOffsetsToStatement(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - return true; - } - } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java index 3788e586..370af348 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java @@ -6,18 +6,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; - import org.apache.log4j.Logger; -// ino.end - - - import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; @@ -25,7 +14,7 @@ import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.unify.Unify; // ino.class.ExprStmt.25265.declaration -public abstract class ExprStmt extends Statement implements ITypeReplacementListener +public abstract class ExprStmt extends Statement // ino.end // ino.class.ExprStmt.25265.body { diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java index 8ce6eb37..80bd8526 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/FloatLiteral.java @@ -5,12 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; - import org.apache.log4j.Logger; import de.dhbwstuttgart.bytecode.ClassFile; @@ -138,42 +132,7 @@ public class FloatLiteral extends Literal } // ino.end - - // ino.method.TRStatement.25478.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25478.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - // ino.method.TRExp.25481.defdescription type=javadoc - /** - * Workaround: �berschreibt Methode TRExp aus der Super-Klasse - * Literal, weil die Implementierung von Unify (noch) nicht mit - * Basetypes umgehen kann.
- * Anstatt den Basetype IntegerType zur�ckzugeben, wird ein - * RefType zur�ckgegeben.
- * Diese Methode kann sp�ter entfernt werden, sodass automatisch die Methode der - * Super-Klasse verwendet wird. - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRExp.25481.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25481.body - { - CTripleSet tripleSet = new CTripleSet(); - tripleSet.addElement(new CTriple(sigma, new RefType("java.lang.Float",getOffset()),V)); - return tripleSet; - } - // ino.end + // ino.method.toString.25484.defdescription type=javadoc /** diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java index 1400b35c..bd78a1fd 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java @@ -5,13 +5,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; @@ -104,24 +97,12 @@ public class ForStmt extends Statement body_Loop_block = statement; } - - public boolean addOffsetsToStatement(CTypeAssumption localAssumption, String NameVariable, boolean isMemberVariable) - { - head_Initializer_1.addOffsetsToStatement(localAssumption,NameVariable,isMemberVariable); - body_Loop_block.addOffsetsToStatement(localAssumption,NameVariable,isMemberVariable); - return true; - } @Override public ConstraintsSet TYPEStmt(TypeAssumptions assumptions) { // TODO Auto-generated method stub return null; } - - public void replaceType(CReplaceTypeEvent e) { - // TODO Auto-generated method stub - throw new NotImplementedException(); - } public int getTypeLineNumber() { throw new NotImplementedException(); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java index 8822fcb3..0cae62ad 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java @@ -7,32 +7,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSubstitution; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -255,116 +230,7 @@ public class IfStmt extends Statement - // ino.method.makeNewResult.25343.definition - private void makeNewResult(MUB Mub, CTriple triple, CTypeAssumptionSet V, CTripleSet returnSet) - throws CTypeReconstructionException - // ino.end - // ino.method.makeNewResult.25343.body - { - CSubstitutionSet unifier = new CSubstitutionSet(Mub.getUnifier()); - // -------------------------- - // Typannahmen bauen: - // -------------------------- - CTypeAssumptionSet V_substituted = V.deepCopy(); - V_substituted.sub(unifier); - // -------------------------- - // Substitutionen bauen: - // -------------------------- - CSubstitutionSet substSet = triple.getSubstitutions().deepCopy(); - substSet.applyUnifier(unifier); - substSet.unite(unifier); - // -------------------------- - // R�ckgabetyp bauen: - // -------------------------- - Iterator setMubIt = Mub.getMub().iterator(); - - while(setMubIt.hasNext()) { - Type retType = setMubIt.next(); - Type retType2 = substSet.applyThisSubstitutionSet(retType.clone()); - // Muesste eigentlich cloneAndApplyUnify machen PL 06-03-18 - // If(Rettype Instanceof TypePlaceholders){ - // Iterator Pairit = Unifier.Getiterator(); - // While(Pairit.Hasnext()){ - // Csubstitution Pair = Pairit.Next(); - // If(Pair.Gettypevar().Getname().Equals(Rettype.Getname())){ - // Rettype = Pair.Gettype(); - // Break; - // } - // } - // } - // -------------------------- - CTriple resultTriple = new CTriple(substSet, retType2, V_substituted); - //CSubstitutionSet CSubstUnifier = new CSubstitutionSet(unifier); - //CTriple resultTriple2 = retTriple.cloneAndApplyUnify(CSubstUnifier); - // -------------------------- - // Triple zu R�ckgabemenge hinzuf�gen - // -------------------------- - if(!returnSet.contains(resultTriple)){ - returnSet.addElement(resultTriple); - } - } - } - // ino.end - - // ino.method.applyUnifier.25346.definition - private void applyUnifier(Vector> unifierPossibilities, CTriple triple, CTypeAssumptionSet V, CTripleSet returnSet) - throws CTypeReconstructionException - // ino.end - // ino.method.applyUnifier.25346.body - { - // -------------------------- - // Wenn Unifier vorhanden, dann anwenden: - // -------------------------- - if(unifierPossibilities.size()!=0){ - // -------------------------- - // Alle m�glichen Unifier auf V_i,j anwenden: - // -------------------------- - for(int k=0; k pairIt = unifier.getIterator(); - while(pairIt.hasNext()){ - CSubstitution pair = pairIt.next(); - if(pair.getTypeVar().getName().equals(retType.getName())){ - retType = pair.getType(); - break; - } - } - } - // -------------------------- - CTriple resultTriple = new CTriple(substSet, retType, V_substituted); - // -------------------------- - // Triple zu R�ckgabemenge hinzuf�gen - // -------------------------- - if(!returnSet.contains(resultTriple)){ - returnSet.addElement(resultTriple); - } - } - } - // -------------------------- - // Ansonsten Fehlermeldung: - // -------------------------- - else { - throw new CTypeReconstructionException("IfStmt.TRStatement(): Block-Typen lassen sich nicht unifizieren.",this); - } - } - // ino.end // ino.method.wandleRefTypeAttributes2GenericAttributes.25349.definition public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) // ino.end @@ -379,15 +245,6 @@ public class IfStmt extends Statement } // ino.end - - public boolean addOffsetsToStatement(CTypeAssumption localAssumption, String NameVariable, boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - else_block.addOffsetsToStatement(localAssumption,NameVariable,isMemberVariable); - then_block.addOffsetsToStatement(localAssumption,NameVariable,isMemberVariable); - return true; - } - @Override @@ -408,11 +265,6 @@ public class IfStmt extends Statement return ret; } - public void replaceType(CReplaceTypeEvent e) { - // TODO Auto-generated method stub - throw new NotImplementedException(); - } - public int getTypeLineNumber() { throw new NotImplementedException(); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java index be25f6cf..f149e94e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java @@ -6,36 +6,7 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; - -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.typeassumptionkey.CInstVarKey; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; @@ -202,60 +173,9 @@ public class InstVar extends Expr } // ino.end - // ino.method.TRStatement.25429.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25429.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - // ino.method.handleInstVarAssum.25438.defdescription type=javadoc - /** - * Unifiziert den R�ckgabetyp des Receivers mit dem der gefundenen Klasse - *
Author: J�rg B�uerle - * @param triple Triple des Receivers - * @param thetaZero Typ der gefundenen Klasse - * @param thetaC Typ der InstanzVariable - * @param resultSet - * @param supportData - */ - // ino.end - // ino.method.handleInstVarAssum.25438.definition - private void handleInstVarAssum(CTriple triple, Type thetaZero, Type thetaC, CTripleSet resultSet, CSupportData supportData) - // ino.end - // ino.method.handleInstVarAssum.25438.body - { - // -------------------------- - // ReturnType mit Integer unifizieren: - // -------------------------- - Vector> unifierPossibilities = Unify.unify(triple.getResultType(), thetaZero, supportData.getFiniteClosure()); - // -------------------------- - // Wenn Unifier vorhanden, dann - // anwenden und Triple hinzuf�gen: - // -------------------------- - if(unifierPossibilities.size()!=0){ - // -------------------------- - // Subset bauen: - // -------------------------- - CTripleSet subSet = new CTripleSet(); - // -------------------------- - // Alle m�glichen Unifier anwenden: - // -------------------------- - for(int i=0; ischreibe Offset - localAssumption.addOffset(this.get_UsedId().getOffset()); - } - } - @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { ConstraintsSet ret = new ConstraintsSet(); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java index 5b8baa5f..2178ba46 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstanceOf.java @@ -6,25 +6,7 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; @@ -120,24 +102,6 @@ public class InstanceOf extends BinaryExpr } // ino.end - // ino.method.TRExp.25383.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25383.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - // ino.method.TRStatement.25386.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25386.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - // ino.method.wandleRefTypeAttributes2GenericAttributes.25389.definition public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) // ino.end @@ -145,11 +109,7 @@ public class InstanceOf extends BinaryExpr { } // ino.end - - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } + @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java index 7b7a0d39..f90970c4 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java @@ -5,28 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -42,6 +21,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -154,42 +134,6 @@ public class IntLiteral extends Literal } // ino.end - - // ino.method.TRStatement.25478.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25478.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - // ino.method.TRExp.25481.defdescription type=javadoc - /** - * Workaround: �berschreibt Methode TRExp aus der Super-Klasse - * Literal, weil die Implementierung von Unify (noch) nicht mit - * Basetypes umgehen kann.
- * Anstatt den Basetype IntegerType zur�ckzugeben, wird ein - * RefType zur�ckgegeben.
- * Diese Methode kann sp�ter entfernt werden, sodass automatisch die Methode der - * Super-Klasse verwendet wird. - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRExp.25481.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25481.body - { - CTripleSet tripleSet = new CTripleSet(); - tripleSet.addElement(new CTriple(sigma, new RefType("java.lang.Integer",getOffset()),V)); - return tripleSet; - } - // ino.end // ino.method.toString.25484.defdescription type=javadoc /** diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java index 89cbcd81..64891b30 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java @@ -29,13 +29,7 @@ import de.dhbwstuttgart.typeinference.Typeable; import de.dhbwstuttgart.typeinference.assumptions.ParameterAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; /** * @author A10023 - Andreas Stadelmeier @@ -117,13 +111,6 @@ public class LambdaExpression extends Expr{ } } - @Override - public boolean addOffsetsToStatement(CTypeAssumption localAssumption, - String NameVariable, boolean isMemberVariable) { - // TODO Auto-generated method stub - return false; - } - @Override public String get_Name() { // TODO Auto-generated method stub @@ -131,13 +118,6 @@ public class LambdaExpression extends Expr{ } - @Override - public void addOffsetsToExpression(CTypeAssumption localAssumption, - String NameVariable, boolean isMemberVariable) { - // TODO Auto-generated method stub - - } - /** * Spezifikation: diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java b/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java index a89ef6b5..f83c1c36 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java @@ -5,13 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement; // ino.module.Literal.8636.import import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.myexception.JVMCodeException; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -// ino.end +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; // ino.class.Literal.25490.declaration public abstract class Literal extends Expr @@ -55,26 +49,6 @@ public abstract class Literal extends Expr } // ino.end - // ino.method.TRExp.25497.defdescription type=javadoc - /** - * Implementierung des Algorithmus 5.40 von Martin Pl�micke - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRExp.25497.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25497.body - { - CTripleSet tripleSet = new CTripleSet(); - tripleSet.addElement(new CTriple(sigma, this.getType(),V)); - return tripleSet; - } - // ino.end // ino.method.ConstantCodegen.25500.defdescription type=javadoc /** @@ -92,9 +66,6 @@ public abstract class Literal extends Expr + " wurde nicht implementiert!"); } // ino.end - - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - } + } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java index bd83ce15..4f03ddae 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalOrFieldVar.java @@ -6,33 +6,7 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.typeassumptionkey.CInstVarKey; -import mycompiler.mytypereconstruction.typeassumptionkey.CLocalVarKey; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -54,6 +28,7 @@ import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -173,16 +148,6 @@ public class LocalOrFieldVar extends Expr } // ino.end - // ino.end - // ino.method.TRStatement.25531.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25531.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - // ino.method.toString.25534.defdescription type=javadoc /** *
Author: Martin Pl�micke @@ -207,14 +172,6 @@ public class LocalOrFieldVar extends Expr } // ino.end - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - if(this.get_UsedId().get_Name_1Element().equals(NameVariable)) - { - //wenn Variable mit gleichem Namen gefunden->schreibe Offset - localAssumption.addOffset(this.get_UsedId().getOffset()); - } - } @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java index eda8deef..94681236 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java @@ -6,41 +6,8 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.core.MyCompiler; @@ -66,6 +33,7 @@ import de.dhbwstuttgart.typeinference.assumptions.LocalVarAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -348,33 +316,6 @@ public class LocalVarDecl extends Statement implements TypeInsertable // ino.end - // ino.method.replaceType.25608.defdescription type=javadoc - /** - *
Author: J�rg B�uerle - * @param e - */ - // ino.end - // ino.method.replaceType.25608.definition - public void replaceType(CReplaceTypeEvent e) - // ino.end - // ino.method.replaceType.25608.body - { - if(e.getOldType().equals(this.getType())){ - inferencelog.debug("Ersetze Typ in LocalVarDecl \""+this.get_Name()+"\"\n"); - if(getType() instanceof TypePlaceholder){ - ((TypePlaceholder)getType()).removeReplacementListener(this); - } - this.setType(e.getNewType()); - } - if(e.getOldType().equals(this.getType())){ - inferencelog.debug("Ersetze Typ in LocalVarDecl \""+this.get_Name()+"\"\n"); - if(this.getType() instanceof TypePlaceholder){ - ((TypePlaceholder)this.getType()).removeReplacementListener(this); - } - this.setType(e.getNewType()); - } - } - // ino.end // ino.method.getTypeLineNumber.25611.defdescription type=javadoc /** @@ -391,36 +332,6 @@ public class LocalVarDecl extends Statement implements TypeInsertable } // ino.end - // ino.method.TRStatement.25614.defdescription type=javadoc - /** - * Implementierung des Algorithmus 5.24 von Martin Pl�micke - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRStatement.25614.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25614.body - { - CTripleSet resultSet = new CTripleSet(); - V = V.shallowCopy(); - CTypeAssumptionSet localSet = new CTypeAssumptionSet(); - CLocalVarTypeAssumption varAssum = new CLocalVarTypeAssumption(supportData.getCurrentClass(), supportData.getCurrentMethod(), supportData.getCurrentMethodParaCount(), supportData.getCurrentMethodOverloadedID(), supportData.getCurrentBlockId(), this.get_Name() ,this.getType(), this.getLineNumber(),this.getOffset(),new Vector()); - Class.isFirstLocalVarDecl=true; - - if(this.block != null) - this.block.addOffsetsToAssumption(varAssum,this.get_Name(),false);//hinzugef�gt hoth: 07.04.2006 - - localSet.addElement(varAssum); - V.unite(localSet); - resultSet.addElement(new CTriple(sigma, new Void(getOffset()), V)); - return resultSet; - } - // ino.end // ino.method.toString.25617.defdescription type=javadoc /** @@ -457,21 +368,6 @@ public class LocalVarDecl extends Statement implements TypeInsertable } // ino.end - public boolean addOffsetsToStatement(CTypeAssumption localAssumption, String NameVariable, boolean isMemberVariable) - { - isMemberVariable=true;//hoth 02.05.06 - if(isMemberVariable)//Wenn Objektvariable - { - if(this.get_Name().equals(NameVariable)) - { - if(Class.isFirstLocalVarDecl==false) - {return false;}//Wenn jetzt lokale Variable kommt, dann springe raus - else - {Class.isFirstLocalVarDecl=false;} - } - } - return true; - } /** * @author Andreas Stadelmeier, a10023 diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java index 0dca5340..ed134118 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LongLiteral.java @@ -5,12 +5,6 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; @@ -30,6 +24,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; // ino.end @@ -143,43 +138,6 @@ public class LongLiteral extends Literal } // ino.end - - // ino.method.TRStatement.25478.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25478.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - // ino.method.TRExp.25481.defdescription type=javadoc - /** - * Workaround: �berschreibt Methode TRExp aus der Super-Klasse - * Literal, weil die Implementierung von Unify (noch) nicht mit - * Basetypes umgehen kann.
- * Anstatt den Basetype IntegerType zur�ckzugeben, wird ein - * RefType zur�ckgegeben.
- * Diese Methode kann sp�ter entfernt werden, sodass automatisch die Methode der - * Super-Klasse verwendet wird. - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRExp.25481.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25481.body - { - CTripleSet tripleSet = new CTripleSet(); - tripleSet.addElement(new CTriple(sigma, new RefType("java.lang.Long",getOffset()),V)); - return tripleSet; - } - // ino.end - // ino.method.toString.25484.defdescription type=javadoc /** *
Author: Martin Pl�micke diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java index 113fb693..e635fdf4 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java @@ -2,79 +2,26 @@ package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.MethodCall.8639.import -import java.util.Enumeration; import java.util.Hashtable; -import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CIntersectionType; -import mycompiler.mytypereconstruction.CMultiplyTuple; -import mycompiler.mytypereconstruction.CSubstitution; -import mycompiler.mytypereconstruction.CSubstitutionGenVar; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CMultiplyTupleSet; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; -import de.dhbwstuttgart.bytecode.JVMCode; -import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; -import de.dhbwstuttgart.myexception.SCExcept; -import de.dhbwstuttgart.myexception.SCStatementException; -import de.dhbwstuttgart.syntaxtree.Class; -import de.dhbwstuttgart.syntaxtree.ClassBody; -import de.dhbwstuttgart.syntaxtree.FormalParameter; import de.dhbwstuttgart.syntaxtree.Method; -import de.dhbwstuttgart.syntaxtree.ParameterList; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; -import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.misc.UsedId; -import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; -import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Void; import de.dhbwstuttgart.typeinference.ConstraintsSet; -import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.Overloading; import de.dhbwstuttgart.typeinference.ResultSet; -import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; -import de.dhbwstuttgart.typeinference.unify.FC_TTO; -import de.dhbwstuttgart.typeinference.unify.Unify; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -93,16 +40,6 @@ public class MethodCall extends Expr } // ino.end - // ino.attribute.OK.25630.declaration - private static final int OK = 0; - // ino.end - // ino.attribute.UNIFY_ERROR.25633.declaration - private static final int UNIFY_ERROR = 1; - // ino.end - // ino.attribute.METHOD_NOT_FOUND_ERROR.25636.declaration - private static final int METHOD_NOT_FOUND_ERROR = 2; - // ino.end - // ino.attribute.receiver.25639.declaration /** @@ -112,34 +49,7 @@ public class MethodCall extends Expr // ino.end // ino.attribute.arglist.25642.declaration private ArgumentList arglist=new ArgumentList(); - // ino.end - private Vector exprtypes=new Vector(); //hier werden die Typen der �bergabewerten von sc_check eingetragen. - // ino.attribute.class_name.25645.declaration - private String class_name; //hier steht in welcher Klasse die Methode deklariert ist. - // ino.end - // ino.attribute.uebernachdurch.25651.declaration - private Hashtable uebernachdurch; - // ino.end - // ino.attribute.finde_method.25654.declaration - private Vector> finde_method=new Vector>(); - // ino.end - // ino.attribute.counter.25657.declaration - private int counter; - // ino.end - - // ino.attribute.methodsFittingMethodCall.25660.decldescription type=javadoc - /** - * Da der SemanticCheck nicht mehr ausgeführt wird, werden hier die bei der - * Typrekonstruktion gefundenen Methoden abgespeichert. Problem ist hier jedoch, - * dass der receiver in diesem Moment noch nicht fest steht. Deshalb wird je - * Receiver ein Methodcall abgelegt. Dieser kann dann mit bspw. - * methodsFittingMethodCAll.get("Vector") abgerufen werden. - */ - // ino.end - // ino.attribute.methodsFittingMethodCall.25660.declaration - private Hashtable methodsFittingMethodCall=new Hashtable(); - // ino.end // ino.attribute.parserlog.25663.declaration protected static Logger parserlog = Logger.getLogger("parser"); // ino.end @@ -223,408 +133,10 @@ public class MethodCall extends Expr } // ino.end - // ino.method.getMethodFittingMethodCallAndClassname.25705.defdescription type=javadoc - /** - * hoti 4.5.06 - * Diese Methode lädt die Methodeninfos einer Methode aus der Hashtable - * methodsfittingmethodcall in ein Method-Objekt - * anhand der angegeben klasse - * @see methodsFittingMethodCall - * @param className - * @return - * @throws JVMCodeException - */ - // ino.end - // ino.method.getMethodFittingMethodCallAndClassname.25705.definition - public Method getMethodFittingMethodCallAndClassname(String className) - throws JVMCodeException - // ino.end - // ino.method.getMethodFittingMethodCallAndClassname.25705.body - { - CMethodTypeAssumption assumption=methodsFittingMethodCall.get(className); - if(assumption==null){ - throw new JVMCodeException("Codegen: Fuer die Klasse "+className+" wurde die Methode "+usedid.get_Name_1Element()+" nicht gefunden"); - } - Vector paraAssumptions=assumption.getParaAssumptions(); - Type returnType=assumption.getAssumedType(); - Method meth=new Method(0); - Vector parameterVector=new Vector(); - ParameterList pl=new ParameterList(); - for(int i=0;i nichterkannte) kann kein Methodenaufruf ausgeführt werden - // Es muss sich also um einen RefType handeln. Ansonsten gibt es einen Fehler - - if(!(receiver.get_Expr().getType() instanceof RefType)){ - throw new JVMCodeException("Es kann nur auf ein RefType ein Methodenaufruf ausgeführt werden ("+receiver+"["+receiver.get_Expr().getType()+"])"); - } - - // HOTI 4.5.06 - // Es handelt sich also um einen RefType. Der Klassenname wird nun bezogen - String receiverClassName=((RefType)receiver.get_Expr().getType()).getTypeName(); - - // Die richtige Methode wird gesucht und gesetzt - Method called_method=getMethodFittingMethodCallAndClassname(receiverClassName); - - - Vector name_vector = get_Name_Vector(); - String local_name = receiver.get_Expr().get_Name(); - - // Richtiges Objekt auf den Stack legen - int index = code.get_indexOf_Var(local_name); - - if (index != -1 ) { // Lokale Variable - try { - JavaClassName local_type = code.get_TypeOf_Var(local_name) - .getName(); - code.add_code(JVMCode.nload_n(local_type.toString(), index)); - } catch (JVMCodeException e) { // out of nload_n - JavaClassName local_type = code.get_TypeOf_Var(local_name) - .getName(); - code.add_code(JVMCode.nload(local_type.toString())); - code.add_code_byte((byte) index); - } - } else { // FieldVariable - code.add_code(JVMCode.aload_0); - code.add_code(JVMCode.getfield); - code.add_code_short(classfile.add_field_ref(local_name, - class_name, JVMCode.get_codegen_Type(receiver.get_Type(), null))); - } - - String called_method_name = called_method.get_Method_Name(); - if (called_method_name == null) - called_method_name = (String) name_vector.lastElement(); - // feda 04.07.07 an dieser Stelle muss geschaut werden ob - // die Methode eine Static Methode ist. - // Wenn Static dann aload_0 weg und anstellen von - // code.add_code(JVMCode.invokevirtual); muss - // code.add_code(JVMCode.invokestatic); stehen. - - - if (arglist != null) - arglist.codegen(classfile, code, paralist); - code.add_code(JVMCode.invokevirtual); - code.add_code_short(classfile.add_method_ref(receiverClassName, - called_method_name, called_method - .get_codegen_Param_Type(paralist))); - } -// ino.end + - // ino.method.makeReceiver.25714.definition - private void makeReceiver() - // ino.end - // ino.method.makeReceiver.25714.body - { - usedid.get_Name().remove(usedid.get_Name().size()-1); //Methodenname loeschen - Iterator namen = usedid.get_Name().iterator(); - LocalOrFieldVar LOFV = new LocalOrFieldVar((String)namen.next(),getOffset()); - LOFV.setType(TypePlaceholder.fresh(this)); - receiver = new Receiver(LOFV); - while(namen.hasNext()) { - InstVar INSTVA = new InstVar(receiver.get_Expr(), (String)namen.next(),getOffset()); - INSTVA.setType(TypePlaceholder.fresh(this)); - receiver = new Receiver(INSTVA); - } - } - // ino.end - - - - - // ino.method.addMethodAndSuperclassMethodsToFittings.25726.defdescription type=javadoc - /** - * HOTI 4.5.06-15.5.06 - * Fügt diese Klasse mit deren Typannahme in den Vektor ein. - * Da aber auch die Subklassen alle die Methodenproperties haben - * können müssen die mit rein... - * @param classToAdd - * @param methodAssumCopy - * @param fc - */ - // ino.end - // ino.method.addMethodAndSuperclassMethodsToFittings.25726.definition - private void addMethodAndSuperclassMethodsToFittings(RefType classToAdd, CMethodTypeAssumption methodAssumCopy, FC_TTO fctto) - // ino.end - // ino.method.addMethodAndSuperclassMethodsToFittings.25726.body - { - methodsFittingMethodCall.put(classToAdd.getTypeName(),methodAssumCopy); - // Input: Klasse Vector - // Output: Alle Klassen <= Vector ... ohne Parameter - RefType cloneRT=classToAdd.clone(); - CSubstitutionSet sub=cloneRT.GenericTypeVar2TypePlaceholder(); - sub.applyThisSubstitutionSet(cloneRT); - Vector vec=sub.getVector(); - for(int i=0;i> test=Unify.instanceSmaller(pair,fctto); - for(int j=0;jhandleMethodAssum().
Author: J�rg B�uerle - * @param multiTuple - * @param possibleTypeComb - * @param returnSet - * @param className - * @param methodName - * @param paraCount - * @param methodsFittingMethodCall Hashtable in der jede erfolgreiche Methode - * abgelegt wird @param supportData - * @return Einen Error-Code: OK, UNIFY_ERROR oder - * METHOD_NOT_FOUND_ERROR - */ - // ino.end - // ino.method.searchAndHandleMethod.25729.definition - private int searchAndHandleMethod(CMultiplyTuple multiTuple, CTypeAssumptionSet V, CTripleSet returnSet, RefType classType, String methodName, int paraCount, CSupportData supportData, Hashtable methodsFittingMethodCall) - // ino.end - // ino.method.searchAndHandleMethod.25729.body - { - // -------------------------- - // Typannahme f�r Methode heraussuchen: - // -------------------------- - - String className; - if(classType instanceof RefType){ - className=((RefType)classType).getTypeName(); - }else{ - className=classType.getName().toString(); - } - - CMethodKey key = new CMethodKey( - className, - methodName, - paraCount - ); - - Vector methodAssums = V.getElements(key); - - - // Wenn die Methode nicht fuendig war: - - if(methodAssums.size()==0){ - return METHOD_NOT_FOUND_ERROR; - } - - // Fuendig: Alle Methoden, die "xxx" heißen und y Parameter haben sind nun in dem Vector drin - // Für alle soll jetzt geschaut werden - - int wellDoneFunctionCount=0; - - for(int item=0;item typeGenPara = supportData.getCurrentClassPara(); - - // Generics der Methode holen - // p.ex. E test(){...} - // ___________________ - Vector genericMethodParameters=methodAssum.getGenericMethodParameters(); - - // Klassengenerics verarbeiten - Vector typePara = null; - if (typeGenPara != null) { - typePara = new Vector(); - for( int i = 0; i < typeGenPara.size(); i++ ) - { - typePara.addElement(typeGenPara.elementAt(i)); - } - } - - // Methodengenerics verarbeiten - Vector additionalPairsToUnify=new Vector(); - - if (genericMethodParameters != null && genericMethodParameters.size()>0) { - - CSubstitutionSet sub = new CSubstitutionSet(); - - for( int i = 0; i < genericMethodParameters.size(); i++ ){ - - - if(genericMethodParameters.elementAt(i) instanceof BoundedGenericTypeVar){ - // Jede Bound als Paar zum Unifizieren vormerken - TypePlaceholder newTLV=TypePlaceholder.fresh(this); - BoundedGenericTypeVar bgtv=(BoundedGenericTypeVar)genericMethodParameters.elementAt(i); - for(int j=0;jAuthor: J�rg B�uerle - * @param multiTuple - * @param returnSet - * @param methodAssum - * @param className - * @param supportData - * @param additionalPairsToUnify - * @return Einen Error-Code: OK, UNIFY_ERROR oder - * METHOD_NOT_FOUND_ERROR - */ - // ino.end - // ino.method.handleMethodAssum.25732.definition - private static int handleMethodAssum(CMultiplyTuple multiTuple, Vector typePara, CTripleSet returnSet, CMethodTypeAssumption methodAssum, Type classType, CSupportData supportData, Vector additionalPairsToUnify) - // ino.end - // ino.method.handleMethodAssum.25732.body - { - // -------------------------- - // Typen unifizieren: - // -------------------------- - - // Vorerst Paare zum Unifizieren bilden - Vector pairsToUnify = createPairsToUnify(multiTuple, typePara, classType, methodAssum); - - // Vorgemerkte Paare - if(pairsToUnify!=null && additionalPairsToUnify!=null) - pairsToUnify.addAll(additionalPairsToUnify); - - // Die Paare endlich unifizieren - Vector> unifierPossibilities = Unify.unify(pairsToUnify, supportData.getFiniteClosure()); - // -------------------------- - // Wenn Unifier vorhanden, dann anwenden: - // -------------------------- - if(unifierPossibilities.size()!=0){ - // -------------------------- - // Subset bauen: - // -------------------------- - CTripleSet subSet = new CTripleSet(); - // -------------------------- - // Alle Unifer durchgehen: - // -------------------------- - for(int j=0; jAuthor: J�rg B�uerle - * @param multiTuple - * @param receiverClass - * @param methodAssum - * @return - */ - // ino.end - // ino.method.createPairsToUnify.25735.definition - private static Vector createPairsToUnify(CMultiplyTuple multiTuple, Vector typePara, Type receiverClass, CMethodTypeAssumption methodAssum) - // ino.end - // ino.method.createPairsToUnify.25735.body - { - Vector pairList = new Vector(); - Pair p = new Pair(multiTuple.getResultTypes().firstElement(), receiverClass); - pairList.addElement(p); - for(int i=1; iAuthor: Martin Pl�micke @@ -648,20 +160,7 @@ public class MethodCall extends Expr { } // ino.end - - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - if(this.get_Receiver()!=null) - { - this.get_Receiver().get_Expr().addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } - if(this.getArgumentList()!=null){ - for(Expr n : this.getArgumentList().expr) - { - n.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - }} - } - + /** * @author Andreas Stadelmeier, a10023 * @return der Name der Methode, welcher dieser MethodCall aufruft. @@ -738,6 +237,13 @@ public class MethodCall extends Expr public void parserPostProcessing(SyntaxTreeNode parent) { super.parserPostProcessing(parent); } + + @Override + public void codegen(ClassFile classfile, CodeAttribute code, Vector paralist) + throws JVMCodeException { + // TODO Auto-generated method stub + + } } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java index 2efdd2e8..6d9aa6f4 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java @@ -6,29 +6,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; @@ -46,6 +25,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -140,11 +120,6 @@ public class NegativeExpr extends UnaryExpr } // ino.end - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } - @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { // TODO Auto-generated method stub diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java index 3a921483..94e9af5c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewArray.java @@ -5,27 +5,8 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -39,6 +20,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -153,33 +135,7 @@ public class NewArray extends Expr } // ino.end - // ino.method.TRExp.25821.defdescription type=javadoc - /** - * Implementierung des Algorithmus 5.32 von Martin Pl�micke - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRExp.25821.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25821.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - // ino.method.TRStatement.25824.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25824.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end // ino.method.wandleRefTypeAttributes2GenericAttributes.25827.definition public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) // ino.end @@ -187,20 +143,6 @@ public class NewArray extends Expr { } // ino.end - - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - if(this.get_UsedId().get_Name_1Element().equals(NameVariable)) - { - //wenn Variable mit gleichem Namen gefunden->schreibe Offset - localAssumption.addOffset(this.get_UsedId().getOffset()); - } - if(this.expr!=null){ - for(Expr n : this.expr) - { - n.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - }} - } @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java index 3b6733a9..9e562ef0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java @@ -7,37 +7,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CMultiplyTuple; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CMultiplyTupleSet; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -64,6 +35,7 @@ import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.ConstructorAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -226,20 +198,6 @@ public class NewClass extends Expr } // ino.end - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - if(this.get_UsedId().get_Name_1Element().equals(NameVariable)) - { - //wenn Variable mit gleichem Namen gefunden->schreibe Offset - localAssumption.addOffset(this.get_UsedId().getOffset()); - } - if(this.getArgumentList()!=null){ - for(Expr n : this.getArgumentList().expr) - { - n.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - }} - } - @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { //TODO: Das hier noch vervollständigen diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java index c92bce5e..26a54659 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NotExpr.java @@ -6,31 +6,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; @@ -49,6 +25,7 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.OderConstraint; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -163,11 +140,6 @@ public class NotExpr extends UnaryExpr } // ino.end - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } - @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { ConstraintsSet ret = new ConstraintsSet(); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java index 3f81ed76..53e73917 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java @@ -5,28 +5,8 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -41,6 +21,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -94,24 +75,6 @@ public class Null extends Literal } // ino.end - // ino.method.TRStatement.25938.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25938.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - // ino.method.TRExp.25941.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25941.body - { - CTripleSet tripleSet = new CTripleSet(); - tripleSet.addElement(new CTriple(sigma, TypePlaceholder.fresh(this) ,V)); - return tripleSet; - } // ino.end // ino.method.wandleRefTypeAttributes2GenericAttributes.25944.definition public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java index e67d6a25..bea0c19d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PositivExpr.java @@ -5,27 +5,8 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; @@ -38,6 +19,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -113,23 +95,6 @@ public class PositivExpr extends UnaryExpr {} // ino.end - // ino.method.TRExp.25978.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.25978.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end - - // ino.method.TRStatement.25981.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.25981.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end // ino.method.wandleRefTypeAttributes2GenericAttributes.25984.definition public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) // ino.end @@ -138,10 +103,6 @@ public class PositivExpr extends UnaryExpr } // ino.end - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java index 9e22a4b1..0b97d2e7 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java @@ -6,29 +6,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -47,6 +26,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -174,11 +154,6 @@ public class PostDecExpr extends UnaryExpr { } // ino.end - - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java index badcceb1..5c96c4c6 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java @@ -6,32 +6,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -53,6 +28,7 @@ import de.dhbwstuttgart.typeinference.OderConstraint; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -181,11 +157,6 @@ public class PostIncExpr extends UnaryExpr { } // ino.end - - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java index 8ee14021..aeae83ae 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreDecExpr.java @@ -6,29 +6,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -47,6 +25,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -175,11 +154,6 @@ public class PreDecExpr extends UnaryExpr } // ino.end - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } - @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { // TODO Auto-generated method stub diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java index 546c7171..56d2f92c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PreIncExpr.java @@ -6,29 +6,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -47,6 +25,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -176,11 +155,6 @@ public class PreIncExpr extends UnaryExpr } // ino.end - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - } - @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { // TODO Auto-generated method stub diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Return.java b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java index 6400f0c0..d101cecd 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Return.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java @@ -5,28 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -45,6 +24,7 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -117,12 +97,6 @@ public class Return extends Statement { } // ino.end - - public boolean addOffsetsToStatement(CTypeAssumption localAssumption, String NameVariable, boolean isMemberVariable) - { - retexpr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - return true; - } @Override public ConstraintsSet TYPEStmt(TypeAssumptions assumptions) { @@ -133,11 +107,7 @@ public class Return extends Statement ret.add(new SingleConstraint(retexpr.getType(), this.getType())); return ret; } - - public void replaceType(CReplaceTypeEvent e) { - super.replaceType(e); - } - + public int getTypeLineNumber() { return 0; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java b/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java index 68519262..1d03d840 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Statement.java @@ -24,20 +24,11 @@ import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.Typeable; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -// ino.end - // ino.class.Statement.26184.declaration -public abstract class Statement extends SyntaxTreeNode implements IItemWithOffset, Typeable, ITypeReplacementListener +public abstract class Statement extends SyntaxTreeNode implements IItemWithOffset, Typeable // ino.end // ino.class.Statement.26184.body { @@ -91,8 +82,6 @@ public abstract class Statement extends SyntaxTreeNode implements IItemWithOffse public abstract void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters); // ino.end - public abstract boolean addOffsetsToStatement(CTypeAssumption localAssumption, String NameVariable, boolean isMemberVariable); - /** * @author AI10023 - Andreas Stadelmeier * Implementierung des Java 8 - Typinferenzalgorithmus von Martin Plümicke @@ -124,22 +113,8 @@ public abstract class Statement extends SyntaxTreeNode implements IItemWithOffse */ public void setType(Type t) { - if(this.getType() instanceof TypePlaceholder){ - ((TypePlaceholder)this.getType()).removeReplacementListener(this); - } - if(t instanceof TypePlaceholder){ - ((TypePlaceholder)t).addReplacementListener(this); - } this.type=t; } - - public void replaceType(CReplaceTypeEvent e) - { - if(getType() instanceof TypePlaceholder){ - ((TypePlaceholder)getType()).removeReplacementListener(this); - } - this.setType(e.getNewType()); - } public abstract JavaCodeResult printJavaCode(ResultSet resultSet); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java index 92cea66e..36df626d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/StringLiteral.java @@ -5,29 +5,8 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -44,6 +23,7 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -131,15 +111,6 @@ public class StringLiteral extends Literal } // ino.end - - // ino.method.TRStatement.26255.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.26255.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end // ino.method.wandleRefTypeAttributes2GenericAttributes.26258.definition public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/This.java b/src/de/dhbwstuttgart/syntaxtree/statement/This.java index d33e59ff..7733b5aa 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/This.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/This.java @@ -5,29 +5,7 @@ package de.dhbwstuttgart.syntaxtree.statement; import java.util.Hashtable; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -44,6 +22,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; @@ -127,43 +106,6 @@ public class This extends Expr { return null; } // ino.end - // ino.method.TRExp.26289.defdescription type=javadoc - /** - * Implementierung des Algorithmus 5.35 von Martin Pl�micke - *
Author: J�rg B�uerle - * @param sigma - * @param V - * @param supportData - * @return - */ - // ino.end - // ino.method.TRExp.26289.definition - public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRExp.26289.body - { - CTripleSet ret = new CTripleSet(); - RefType newType; - Type supportDataType=supportData.getCurrentClassType(); - if(supportDataType instanceof RefType){ - newType=(RefType)supportDataType; - }else{ - newType=new RefType(supportData.getCurrentClass(),getOffset()); - } - this.type=newType; - ret.addElement(new CTriple(sigma, newType,V)); - return ret; - } - // ino.end - - // ino.method.TRStatement.26292.definition - public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData) - // ino.end - // ino.method.TRStatement.26292.body - { - throw CTypeReconstructionException.createNotImplementedException(); - } - // ino.end // ino.method.wandleRefTypeAttributes2GenericAttributes.26295.definition public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) @@ -172,15 +114,6 @@ public class This extends Expr { } // ino.end - - public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable) - { - if(this.arglist.expr!=null){ - for(Expr n : this.arglist.expr) - { - n.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - }} - } @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java index 5176123a..2911adb3 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/WhileStmt.java @@ -7,31 +7,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSupportData; -import mycompiler.mytypereconstruction.CTriple; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTripleSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -54,6 +31,7 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import de.dhbwstuttgart.typeinference.unify.Unify; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -183,13 +161,6 @@ public class WhileStmt extends Statement } // ino.end - public boolean addOffsetsToStatement(CTypeAssumption localAssumption, String NameVariable, boolean isMemberVariable) - { - expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable); - loop_block.addOffsetsToStatement(localAssumption,NameVariable,isMemberVariable); - return true; - } - @Override public ConstraintsSet TYPEStmt(TypeAssumptions assumptions) { ConstraintsSet ret = new ConstraintsSet(); @@ -201,11 +172,6 @@ public class WhileStmt extends Statement return ret; } - public void replaceType(CReplaceTypeEvent e) { - // TODO Auto-generated method stub - throw new NotImplementedException(); - } - public int getTypeLineNumber() { throw new NotImplementedException(); } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/CRefTypeSet.java b/src/de/dhbwstuttgart/syntaxtree/type/CRefTypeSet.java index 9c909450..80c6d3ca 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/CRefTypeSet.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/CRefTypeSet.java @@ -3,7 +3,7 @@ package de.dhbwstuttgart.syntaxtree.type; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.set.CVectorSet; +import de.dhbwstuttgart.typeinference.unify.CVectorSet; public class CRefTypeSet extends CVectorSet { diff --git a/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java index fd24670e..d3bd6f3f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/FreshWildcardType.java @@ -2,9 +2,9 @@ package de.dhbwstuttgart.syntaxtree.type; import java.util.Vector; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; import sun.reflect.generics.reflectiveObjects.NotImplementedException; public class FreshWildcardType extends Type { diff --git a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java index 4af912eb..4560edd8 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java @@ -6,34 +6,14 @@ package de.dhbwstuttgart.syntaxtree.type; import java.util.HashMap; import java.util.Iterator; import java.util.Vector; -// ino.end - - - - - - - - - - - - - - - - - import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; // ino.class.GenericTypeVar.26505.description type=javadoc /** @@ -188,7 +168,7 @@ public class GenericTypeVar extends Type public TypePlaceholder getTypePlaceHolder() { if(!GenericTypeVar.tph.containsKey(this)){ - GenericTypeVar.tph.put(this, TypePlaceholder.fresh(this.getName().toString())); + GenericTypeVar.tph.put(this, TypePlaceholder.fresh(this.getName().toString(),this)); } return GenericTypeVar.tph.get(this); //if(this.tph == null)this.tph = TypePlaceholder.fresh(); diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Pair.java b/src/de/dhbwstuttgart/syntaxtree/type/Pair.java index 7ba5056c..81f84404 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Pair.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Pair.java @@ -6,7 +6,8 @@ import java.util.Hashtable; import java.util.Vector; // ino.end -import de.dhbwstuttgart.typeinference.parser.JavaClassName; + +import de.dhbwstuttgart.parser.JavaClassName; diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index bbf164e9..9bac8e69 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -8,38 +8,20 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.CSubstitutionGenVar; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; - import org.apache.log4j.Logger; -// ino.end - - - - - - - - - - - - - - - - import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.myexception.SCException; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionGenVar; +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import sun.reflect.generics.reflectiveObjects.NotImplementedException; @@ -208,7 +190,7 @@ public class RefType extends Type implements IMatchable { if (parameter.elementAt(i) instanceof GenericTypeVar) { - TypePlaceholder tlv = TypePlaceholder.fresh(); + TypePlaceholder tlv = TypePlaceholder.fresh(null); sub.addElement(new CSubstitutionGenVar((GenericTypeVar)parameter.elementAt(i), tlv)); parameter.set(i, tlv); } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Type.java b/src/de/dhbwstuttgart/syntaxtree/type/Type.java index 3573d308..8fab0c18 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Type.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Type.java @@ -7,19 +7,19 @@ import java.util.Vector; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; // ino.class.Type.26716.declaration -public class Type implements IItemWithOffset +public class Type extends SyntaxTreeNode implements IItemWithOffset // ino.end // ino.class.Type.26716.body { @@ -301,6 +301,11 @@ public class Type implements IItemWithOffset Vector ret = new Vector<>(); return ret; } + + @Override + public Vector getChildren() { + return new Vector<>(); + } } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java b/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java index d861b5ba..2e65d172 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/TypePlaceholder.java @@ -9,17 +9,13 @@ import java.util.Vector; import java.util.logging.Logger; import de.dhbwstuttgart.core.MyCompiler; +import de.dhbwstuttgart.parser.JavaClassName; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.replacementlistener.IReplaceTypeEventProvider; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; -// ino.end - // ino.class.TypePlaceholder.26780.description type=javadoc /** * Repr�sentiert einen Typparameter f�r einen vom Programmierer nicht angegeben @@ -31,7 +27,7 @@ import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListe */ // ino.end // ino.class.TypePlaceholder.26780.declaration -public class TypePlaceholder extends Type implements IReplaceTypeEventProvider +public class TypePlaceholder extends Type // ino.end // ino.class.TypePlaceholder.26780.body { @@ -41,10 +37,8 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider // ino.attribute.m_TypePlaceholdersRegistry.26788.declaration private static Hashtable m_TypePlaceholdersRegistry = new Hashtable(); // ino.end - - // ino.attribute.m_ReplacementListeners.26791.declaration - private Vector m_ReplacementListeners; - // ino.end + private SyntaxTreeNode parent; + // ino.method.TypePlaceholder.26794.defdescription type=javadoc /** @@ -55,13 +49,13 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider */ // ino.end // ino.method.TypePlaceholder.26794.definition - private TypePlaceholder(String typeName) + private TypePlaceholder(String typeName, SyntaxTreeNode parent) // ino.end // ino.method.TypePlaceholder.26794.body { super(-1); this.name = new JavaClassName(typeName); - m_ReplacementListeners = new Vector(); + this.parent = parent; } // ino.end @@ -83,36 +77,17 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider } // ino.end - // ino.method.fresh.26800.defdescription type=javadoc - /** - * Erzeugt eine neue TypePlaceholder mit einem eindeutigen Namen. Die - * erzeugte Instanz ist die einzig im Syntaxbaum existierende Instanz dieser - * Variablen.
Author: J�rg B�uerle - * @return Die TypePlaceholder - */ - // ino.end - // ino.method.fresh.26800.definition - public static TypePlaceholder fresh() - // ino.end - // ino.method.fresh.26800.body - { - TypePlaceholder typeVar = new TypePlaceholder(makeNewName()); - m_TypePlaceholdersRegistry.put(typeVar.getName(), typeVar); - return typeVar; - } - // ino.end - /** * Generiert einen neuen TPH mit einem bestimmten Namen. * Wird benötigt, wenn aus Generischen Variablen TPH generiert werden. * @param name * @return */ - public static TypePlaceholder fresh(String name) + public static TypePlaceholder fresh(String name, SyntaxTreeNode parent) // ino.end // ino.method.fresh.26800.body { - TypePlaceholder typeVar = new TypePlaceholder(name); + TypePlaceholder typeVar = new TypePlaceholder(name, parent); TypePlaceholder oldTPH = m_TypePlaceholdersRegistry.put(typeVar.getName(), typeVar); if(oldTPH != null){ oldTPH.name = new JavaClassName(makeNewName()); @@ -130,10 +105,9 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider * @param listener * @return */ - public static TypePlaceholder fresh(ITypeReplacementListener listener){ - TypePlaceholder ret = fresh(); - //System.out.println(""+ret+" -> "+listener); - ret.addReplacementListener(listener); + public static TypePlaceholder fresh(SyntaxTreeNode parent){ + TypePlaceholder ret= new TypePlaceholder(makeNewName(), parent); + m_TypePlaceholdersRegistry.put(ret.getName(), ret); return ret; } @@ -258,134 +232,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider } // ino.end - // ino.method.addReplacementListener.26815.defdescription type=javadoc - /** - *
Author: J�rg B�uerle - * @param listener - */ - // ino.end - // ino.method.addReplacementListener.26815.definition - public void addReplacementListener(ITypeReplacementListener listener) - // ino.end - // ino.method.addReplacementListener.26815.body - { - if(!this.containsListener(listener)){ - m_ReplacementListeners.addElement(listener); - } - } - // ino.end - // ino.method.containsListener.26818.defdescription type=javadoc - /** - *
Author: J�rg B�uerle - * @param listener - * @return - */ - // ino.end - // ino.method.containsListener.26818.definition - public boolean containsListener(ITypeReplacementListener listener) - // ino.end - // ino.method.containsListener.26818.body - { - return m_ReplacementListeners.contains(listener); - } - // ino.end - - // ino.method.removeReplacementListener.26821.defdescription type=javadoc - /** - *
Author: J�rg B�uerle - * @param listener - */ - // ino.end - // ino.method.removeReplacementListener.26821.definition - public void removeReplacementListener(ITypeReplacementListener listener) - // ino.end - // ino.method.removeReplacementListener.26821.body - { - m_ReplacementListeners.removeElement(listener); - } - // ino.end - - // ino.method.removeAllReplacementListeners.26824.defdescription type=javadoc - /** - *
Author: J�rg B�uerle - */ - // ino.end - // ino.method.removeAllReplacementListeners.26824.definition - public void removeAllReplacementListeners() - // ino.end - // ino.method.removeAllReplacementListeners.26824.body - { - m_ReplacementListeners.removeAllElements(); - } - // ino.end - - // ino.method.fireReplaceTypeEvent.26827.defdescription type=javadoc - /** - *
Author: J�rg B�uerle - * @param e - */ - // ino.end - // ino.method.fireReplaceTypeEvent.26827.definition - public void fireReplaceTypeEvent(CReplaceTypeEvent e) - // ino.end - // ino.method.fireReplaceTypeEvent.26827.body - { - for(int i=0; iAuthor: J�rg B�uerle - * @return - */ - // ino.end - // ino.method.getReplacementListeners.26830.definition - public Iterator getReplacementListeners() - // ino.end - // ino.method.getReplacementListeners.26830.body - { - return m_ReplacementListeners.iterator(); - } - // ino.end - - // ino.method.replaceWithType.26833.defdescription type=javadoc - /** - * Diese Methode geht alle TypeReplacmentListener durch und tauscht �ber deren - * Callback-Methode diesen Typ gegen den neuen aus. - *
Author: J�rg B�uerle - * @param newType - */ - // ino.end - // ino.method.replaceWithType.26833.definition - public void replaceWithType(Type newType) - // ino.end - // ino.method.replaceWithType.26833.body - { - this.fireReplaceTypeEvent(new CReplaceTypeEvent(this, newType)); - } - // ino.end - - // ino.method.getLineNumbers.26836.definition - public Vector getLineNumbers() - // ino.end - // ino.method.getLineNumbers.26836.body - { - Vector lineNumbers = new Vector(); - for(int i=0; i)m_ReplacementListeners.clone(); + TypePlaceholder dolly = new TypePlaceholder(name.toString(), this.parent); return dolly; } // ino.end @@ -467,7 +313,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider //backdoorvars werden registiert, weil am Ende beim execute //auf den CSubstitution nicht registrierte Variablen zu //Exceptions fuehrt - TypePlaceholder typeVar = new TypePlaceholder(makeNewName()); + TypePlaceholder typeVar = new TypePlaceholder(makeNewName(), null); m_TypePlaceholdersRegistry.put(typeVar.getName(), typeVar); return typeVar; @@ -517,7 +363,7 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider //backdoorvars werden registiert, weil am Ende beim execute //auf den CSubstitution nicht registrierte Variablen zu //Exceptions fuehrt - TypePlaceholder typeVar = new TypePlaceholder(name); + TypePlaceholder typeVar = new TypePlaceholder(name, null); m_TypePlaceholdersRegistry.put(typeVar.getName(), typeVar); return typeVar; @@ -554,12 +400,10 @@ public class TypePlaceholder extends Type implements IReplaceTypeEventProvider */ public Vector getTypeInsertPoints(ResultSet result) { Vector ret = new Vector(); - for(ITypeReplacementListener ti : this.m_ReplacementListeners){ - if(ti instanceof TypeInsertable){ - TypeInsertPoint toAdd = ((TypeInsertable) ti).createTypeInsertPoint(this, result); - if(toAdd != null)ret.add(toAdd); - //ret.add(new TypeInsertPoint(this, (TypeInsertable)ti, result.getTypeEqualTo(this), result)); - } + if(this.parent instanceof TypeInsertable){ + TypeInsertPoint toAdd = ((TypeInsertable) parent).createTypeInsertPoint(this, result); + if(toAdd != null)ret.add(toAdd); + //ret.add(new TypeInsertPoint(this, (TypeInsertable)ti, result.getTypeEqualTo(this), result)); } return ret; } diff --git a/src/de/dhbwstuttgart/typeinference/FunN.java b/src/de/dhbwstuttgart/typeinference/FunN.java index bf1ae84b..5a21d03d 100755 --- a/src/de/dhbwstuttgart/typeinference/FunN.java +++ b/src/de/dhbwstuttgart/typeinference/FunN.java @@ -4,6 +4,7 @@ package de.dhbwstuttgart.typeinference; import java.util.Iterator; import java.util.Vector; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Method; import de.dhbwstuttgart.syntaxtree.ParameterList; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; @@ -12,10 +13,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; -import mycompiler.mytypereconstruction.replacementlistener.CReplaceTypeEvent; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; /** * @see Spezifikation "Complete Typeinference in Java 8" von Martin Plümicke @@ -26,7 +23,7 @@ import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; * FunN ist ein RefType. Der RefType ist nicht mit einem FunNInterface verbunden. * */ -public class FunN extends RefType implements ITypeReplacementListener{ +public class FunN extends RefType { private Type R; private Vector T; @@ -89,16 +86,10 @@ public class FunN extends RefType implements ITypeReplacementListener{ protected void setT(Vector T){ this.T = T; calculateNewParalist(); - //ReplacementListener registrieren: - for(Type t : T)if(t instanceof TypePlaceholder)((TypePlaceholder)t).addReplacementListener(this); } protected void setR(Type R){ this.R = R; calculateNewParalist(); - //Sind die übergebenen Typen TypePlaceholder, so soll die FunN über TypReplacements informiert werden. - if(R instanceof TypePlaceholder){ - ((TypePlaceholder)R).addReplacementListener(this); - } } /* @@ -112,15 +103,7 @@ public class FunN extends RefType implements ITypeReplacementListener{ return ret; } */ - public void replaceType(CReplaceTypeEvent e) { - if(R.equals(e.getOldType()))this.setR(e.getNewType()); - for(Type t : T){ - if(t.equals(e.getOldType())){ - T.setElementAt(e.getNewType(),T.indexOf(t)); - this.setT(T); - } - } - } + public int getTypeLineNumber() { // TODO Auto-generated method stub diff --git a/src/de/dhbwstuttgart/typeinference/FunNInterface.java b/src/de/dhbwstuttgart/typeinference/FunNInterface.java index b19ddc02..ac64a8a3 100644 --- a/src/de/dhbwstuttgart/typeinference/FunNInterface.java +++ b/src/de/dhbwstuttgart/typeinference/FunNInterface.java @@ -9,7 +9,6 @@ import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.assumptions.ClassAssumption; import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; -import mycompiler.mytype.*; /** * Stellt das Interface FunN dar. diff --git a/src/de/dhbwstuttgart/typeinference/FunNMethod.java b/src/de/dhbwstuttgart/typeinference/FunNMethod.java index bb61be65..07b8acf8 100644 --- a/src/de/dhbwstuttgart/typeinference/FunNMethod.java +++ b/src/de/dhbwstuttgart/typeinference/FunNMethod.java @@ -9,8 +9,6 @@ import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; -import mycompiler.mytype.*; -import mycompiler.myclass.*; public class FunNMethod extends Method{ /** diff --git a/src/de/dhbwstuttgart/typeinference/Overloading.java b/src/de/dhbwstuttgart/typeinference/Overloading.java index c06421ec..b2d7dfae 100755 --- a/src/de/dhbwstuttgart/typeinference/Overloading.java +++ b/src/de/dhbwstuttgart/typeinference/Overloading.java @@ -10,8 +10,6 @@ import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; /** * diff --git a/src/de/dhbwstuttgart/typeinference/TypeInsertable.java b/src/de/dhbwstuttgart/typeinference/TypeInsertable.java index bd283a5e..39411208 100644 --- a/src/de/dhbwstuttgart/typeinference/TypeInsertable.java +++ b/src/de/dhbwstuttgart/typeinference/TypeInsertable.java @@ -3,9 +3,8 @@ package de.dhbwstuttgart.typeinference; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; -public interface TypeInsertable extends ITypeReplacementListener, Typeable, IItemWithOffset { +public interface TypeInsertable extends Typeable, IItemWithOffset { public int getOffset(); public void setOffset(int offset); diff --git a/src/de/dhbwstuttgart/typeinference/Typeable.java b/src/de/dhbwstuttgart/typeinference/Typeable.java index bfcc3559..72c902d3 100755 --- a/src/de/dhbwstuttgart/typeinference/Typeable.java +++ b/src/de/dhbwstuttgart/typeinference/Typeable.java @@ -1,7 +1,6 @@ package de.dhbwstuttgart.typeinference; import de.dhbwstuttgart.syntaxtree.type.Type; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; public interface Typeable { /** diff --git a/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java b/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java index 77eee759..fe0e79ea 100755 --- a/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java +++ b/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java @@ -16,13 +16,7 @@ import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; -import mycompiler.mytypereconstruction.typeassumptionkey.CMethodKey; -import mycompiler.mytypereconstruction.typeassumptionkey.CTypeAssumptionKey; -// ino.end +import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; // ino.class.CTypeReconstructionResult.27238.description type=javadoc /** diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/Assumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/Assumption.java index d95089ca..837dcfa4 100644 --- a/src/de/dhbwstuttgart/typeinference/assumptions/Assumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/Assumption.java @@ -1,11 +1,10 @@ package de.dhbwstuttgart.typeinference.assumptions; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.Typeable; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; -import mycompiler.mytype.*; public class Assumption { diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/ClassAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/ClassAssumption.java index 9327c6d5..785a049f 100644 --- a/src/de/dhbwstuttgart/typeinference/assumptions/ClassAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/ClassAssumption.java @@ -1,9 +1,6 @@ package de.dhbwstuttgart.typeinference.assumptions; import de.dhbwstuttgart.syntaxtree.Class; -import mycompiler.myclass.*; -import mycompiler.mytype.*; - /** * Nicht wirklich eine Assumption. * Wird benutzt um Typen von Variablen zu verifizieren. diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/FieldAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/FieldAssumption.java index 79b60d5c..11f7caa1 100644 --- a/src/de/dhbwstuttgart/typeinference/assumptions/FieldAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/FieldAssumption.java @@ -1,9 +1,9 @@ package de.dhbwstuttgart.typeinference.assumptions; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.Field; import de.dhbwstuttgart.syntaxtree.type.RefType; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; public class FieldAssumption extends Assumption { diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java index bd6c1399..3460bed9 100644 --- a/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/GenericVarAssumption.java @@ -1,10 +1,10 @@ package de.dhbwstuttgart.typeinference.assumptions; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.statement.LocalVarDecl; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; public class GenericVarAssumption extends Assumption{ diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java index 98c8a564..30645adb 100644 --- a/src/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java @@ -6,8 +6,6 @@ import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.FormalParameter; import de.dhbwstuttgart.syntaxtree.Method; import de.dhbwstuttgart.syntaxtree.type.Type; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; -import mycompiler.mytype.*; public class MethodAssumption extends FieldAssumption { diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index f7609191..c2f4382a 100755 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -4,6 +4,7 @@ import java.util.Iterator; import java.util.Vector; import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; @@ -13,14 +14,7 @@ import de.dhbwstuttgart.typeinference.FunN; import de.dhbwstuttgart.typeinference.FunNInterface; import de.dhbwstuttgart.typeinference.FunNMethod; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; import sun.reflect.generics.reflectiveObjects.NotImplementedException; -import mycompiler.mytypereconstruction.set.CTypeAssumptionSet; -import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CParaTypeAssumption; -import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption; /** * Eine Sammlung von TypeAssumptions. diff --git a/src/de/dhbwstuttgart/typeinference/exceptions/ParserError.java b/src/de/dhbwstuttgart/typeinference/exceptions/ParserError.java index 7d1d51ef..535c576a 100644 --- a/src/de/dhbwstuttgart/typeinference/exceptions/ParserError.java +++ b/src/de/dhbwstuttgart/typeinference/exceptions/ParserError.java @@ -1,6 +1,6 @@ package de.dhbwstuttgart.typeinference.exceptions; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; +import de.dhbwstuttgart.parser.JavaParser.yyException; public class ParserError extends TypeinferenceException{ diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java index ad644975..33593014 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java @@ -12,9 +12,6 @@ import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.exceptions.DebugException; -import mycompiler.myclass.*; -import mycompiler.mytype.*; -import mycompiler.mytypereconstruction.replacementlistener.ITypeReplacementListener; /** * Stellt eine Einsetzungsmöglichkeit für einen Typ an einem (Typeable)Punkt im Syntaxbaum dar. diff --git a/src/de/dhbwstuttgart/typeinference/unify/CSet.java b/src/de/dhbwstuttgart/typeinference/unify/CSet.java new file mode 100755 index 00000000..08af741d --- /dev/null +++ b/src/de/dhbwstuttgart/typeinference/unify/CSet.java @@ -0,0 +1,72 @@ +// ino.module.CSet.8698.package +package de.dhbwstuttgart.typeinference.unify; +// ino.end + +// ino.module.CSet.8698.import +import java.util.Iterator; +// ino.end + +// ino.class.CSet.27435.description type=javadoc +/** + * + * @author Jrg Buerle + * @version $date + */ +// ino.end +// ino.class.CSet.27435.declaration +public abstract class CSet implements Iterable +// ino.end +// ino.class.CSet.27435.body +{ + // ino.method.addElement.27438.declaration + public abstract void addElement(E element); + // ino.end + // ino.method.removeElement.27441.declaration + public abstract void removeElement(E element); + // ino.end + // ino.method.unite.27444.declaration + public abstract void unite(CSet anotherSet); + // ino.end + // ino.method.subtract.27447.declaration + public abstract void subtract(CSet anotherSet); + // ino.end + // ino.method.shallowCopy.27450.declaration + public abstract CSet shallowCopy(); + // ino.end + // ino.method.deepCopy.27453.declaration + public abstract CSet deepCopy(); + // ino.end + // ino.method.contains.27456.declaration + public abstract boolean contains(E element); + // ino.end + // ino.method.getCardinality.27459.declaration + public abstract int getCardinality(); + // ino.end + // ino.method.getIterator.27462.declaration + public abstract Iterator getIterator(); + // ino.end + // ino.method.equals.27465.declaration + public abstract boolean equals(Object obj); + // ino.end + + // ino.method.toString.27468.definition + public String toString() + // ino.end + // ino.method.toString.27468.body + { + StringBuffer sb = new StringBuffer(); + sb.append("Set {\n"); + Iterator it = this.getIterator(); + while(it.hasNext()){ + sb.append(it.next().toString()); + sb.append(",\n"); + } + if(this.getCardinality()>0){ + sb.delete(sb.length()-2, sb.length()-1); + } + sb.append("}"); + return sb.toString(); + } + // ino.end +} +// ino.end diff --git a/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java b/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java new file mode 100755 index 00000000..f0cca4e8 --- /dev/null +++ b/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java @@ -0,0 +1,252 @@ +// ino.module.CSubstitution.8685.package +package de.dhbwstuttgart.typeinference.unify; +// ino.end + +// ino.module.CSubstitution.8685.import +import java.util.Iterator; +import java.util.Vector; + +import org.apache.log4j.Logger; +// ino.end + + + + + + + + +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; + +// ino.class.CSubstitution.27003.description type=javadoc +/** + * Implementierung einer Typsubstitution. Bildet eine zu ersetzende + * TypePlaceholder auf einen Substitutions-Typ ab. Instanzen dieser + * Klasse werden in der Regel aus + * Pair-Objekten erzeugt. + * @author J�rg B�uerle + * @version $Date: 2006/07/10 11:27:04 $ + */ +// ino.end +// ino.class.CSubstitution.27003.declaration +public class CSubstitution +// ino.end +// ino.class.CSubstitution.27003.body +{ + // ino.attribute.m_TypeVar.27006.declaration + private TypePlaceholder m_TypeVar = null; + // ino.end + // ino.attribute.m_Type.27009.declaration + protected Type m_Type = null; + // ino.end + // ino.attribute.inferencelog.27012.declaration + protected static Logger inferencelog = Logger.getLogger("inference"); + // ino.end + // ino.method.CSubstitution.27015.definition + public CSubstitution() + // ino.end + // ino.method.CSubstitution.27015.body + { + this(null, null); + } + // ino.end + + // ino.method.CSubstitution.27018.definition + public CSubstitution(TypePlaceholder typeVar, Type type) + // ino.end + // ino.method.CSubstitution.27018.body + { + m_TypeVar = typeVar; + m_Type = type; + } + // ino.end + + // ino.method.CSubstitution.27021.definition + public CSubstitution(Pair unifier) + throws CTypeReconstructionException + // ino.end + // ino.method.CSubstitution.27021.body + { + if(!(unifier.TA1 instanceof TypePlaceholder)){ + throw new CTypeReconstructionException("Unifier enth�lt keinen Typeplaceholder",unifier.TA1); + } + m_TypeVar = (TypePlaceholder)unifier.TA1; + m_Type = unifier.TA2; + } + // ino.end + + + // ino.method.getType.27024.defdescription type=javadoc + /** + * Author: J�rg B�uerle
+ * @return Returns the Type. + */ + // ino.end + // ino.method.getType.27024.definition + public Type getType() + // ino.end + // ino.method.getType.27024.body + { + return m_Type; + } + // ino.end + + // ino.method.setType.27027.defdescription type=javadoc + /** + * Author: J�rg B�uerle
+ * @param type The Type to set. + */ + // ino.end + // ino.method.setType.27027.definition + public void setType(Type type) + // ino.end + // ino.method.setType.27027.body + { + m_Type = type; + } + // ino.end + + // ino.method.getTypeVar.27030.defdescription type=javadoc + /** + * Author: J�rg B�uerle
+ * @return Returns the TypeVar. + */ + // ino.end + // ino.method.getTypeVar.27030.definition + public Type getTypeVar() + // ino.end + // ino.method.getTypeVar.27030.body + { + return this.m_TypeVar; + } + // ino.end + + // ino.method.setTypeVar.27033.defdescription type=javadoc + /** + * Author: J�rg B�uerle
+ * @param typeVar The TypeVar to set. + */ + // ino.end + // ino.method.setTypeVar.27033.definition + public void setTypeVar(TypePlaceholder typeVar) + // ino.end + // ino.method.setTypeVar.27033.body + { + m_TypeVar = typeVar; + } + // ino.end + + // ino.method.equals.27036.definition + public boolean equals(Object obj) + // ino.end + // ino.method.equals.27036.body + { + if(obj instanceof CSubstitution){ + CSubstitution sub = (CSubstitution)obj; + boolean ret = true; + ret &= (m_TypeVar.equals(sub.m_TypeVar)); + ret &= (m_Type.equals(sub.m_Type)); + return ret; + } + else{ + return false; + } + } + // ino.end + + // ino.method.toString.27039.definition + public String toString() + // ino.end + // ino.method.toString.27039.body + { + //return m_TypeVar.getName() +" --> "+m_Type.getName(); + return m_TypeVar.toString() +" --> "+m_Type.toString(); + } + // ino.end + + // ino.method.clone.27042.definition + public CSubstitution clone() + // ino.end + // ino.method.clone.27042.body + { + CSubstitution copy = new CSubstitution(m_TypeVar.clone(), m_Type.clone()); + return copy; + } + // ino.end + + + // ino.method.applyUnifier.27048.defdescription type=javadoc + /** + * Wendet den Unifier auf die rechte Seite dieser Substitution an. + *
Author: J�rg B�uerle + * @param unifier + */ + // ino.end + // ino.method.applyUnifier.27048.definition + public void applyUnifier(CSubstitutionSet unifier) + // ino.end + // ino.method.applyUnifier.27048.body + { + Iterator pairIt = unifier.getIterator(); + while(pairIt.hasNext()){ + CSubstitution subst = (CSubstitution)pairIt.next(); + + //korrigiert PL 05-07-31 das erste duerfte doch richtig sein. + //subst.setType(this.applySubstitution(subst.getType(), subst)); + this.setType(this.applySubstitution(this.getType(), subst)); + } + + } + // ino.end + + // ino.method.applySubstitution.27051.defdescription type=javadoc + /** + * Wendet die �bergebene Substitution rekursiv auf den �bergebenen Typ an. + *
Author: J�rg B�uerle + * @param type Der zu untersuchende Typ + * @param unifierSub Die anzuwendende Substitution + * @return Den ermittelnden Typ + */ + // ino.end + // ino.method.applySubstitution.27051.definition + private Type applySubstitution(Type type, CSubstitution unifierSub) + // ino.end + // ino.method.applySubstitution.27051.body + { + if(type instanceof TypePlaceholder){ + if(type.equals(unifierSub.getTypeVar())){ + return unifierSub.getType(); + } + } + else if(type instanceof GenericTypeVar){ + if(type.equals(unifierSub.getTypeVar())){ + return unifierSub.getType(); + } + } + else if(type instanceof RefType){ + Vector paras = ((RefType)type).get_ParaList(); + if(paras != null){ + for(int i=0; iTypePlaceholder auf einen Substitutions-Typ ab. Instanzen dieser + * Klasse werden in der Regel aus + * Pair-Objekten erzeugt. + * @author Martin Pl�micke + * @version $Date: 2006/06/13 10:37:32 $ + */ +// ino.end +// ino.class.CSubstitutionGenVar.27057.declaration +public class CSubstitutionGenVar extends CSubstitution +// ino.end +// ino.class.CSubstitutionGenVar.27057.body +{ + // ino.attribute.m_TypeVar.27061.declaration + private GenericTypeVar m_TypeVar = null; + // ino.end + + // ino.method.CSubstitutionGenVar.27064.definition + public CSubstitutionGenVar() + // ino.end + // ino.method.CSubstitutionGenVar.27064.body + { + this(null, null); + } + // ino.end + + // ino.method.CSubstitutionGenVar.27067.definition + public CSubstitutionGenVar(GenericTypeVar typeVar, Type type) + // ino.end + // ino.method.CSubstitutionGenVar.27067.body + { + m_TypeVar = typeVar; + m_Type = type; + } + // ino.end + + // ino.method.getTypeVar.27070.defdescription type=javadoc + /** + * Author: J�rg B�uerle
+ * @return Returns the TypeVar. + */ + // ino.end + // ino.method.getTypeVar.27070.definition + public Type getTypeVar() + // ino.end + // ino.method.getTypeVar.27070.body + { + return this.m_TypeVar; + } + // ino.end + + // ino.method.toString.27073.definition + public String toString() + // ino.end + // ino.method.toString.27073.body + { + return this.m_TypeVar.getName() +" --> "+this.m_Type.getName(); + } + // ino.end +} +// ino.end diff --git a/src/de/dhbwstuttgart/typeinference/unify/CSubstitutionSet.java b/src/de/dhbwstuttgart/typeinference/unify/CSubstitutionSet.java new file mode 100755 index 00000000..889d080b --- /dev/null +++ b/src/de/dhbwstuttgart/typeinference/unify/CSubstitutionSet.java @@ -0,0 +1,111 @@ +// ino.module.CSubstitutionSet.8699.package +package de.dhbwstuttgart.typeinference.unify; +// ino.end + +// ino.module.CSubstitutionSet.8699.import +import java.util.Iterator; +import java.util.Vector; + +import de.dhbwstuttgart.myexception.CTypeReconstructionException; +import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; + +// ino.class.CSubstitutionSet.27471.description type=javadoc +/** + * @author J�rg B�uerle + * @version $Date: 2013/03/27 18:29:34 $ + */ +// ino.end +// ino.class.CSubstitutionSet.27471.declaration +public class CSubstitutionSet extends CVectorSet +// ino.end +// ino.class.CSubstitutionSet.27471.body +{ + // ino.method.CSubstitutionSet.27475.definition + public CSubstitutionSet() + // ino.end + // ino.method.CSubstitutionSet.27475.body + { + super(); + } + // ino.end + + // ino.method.CSubstitutionSet.27478.definition + public CSubstitutionSet(Vector unifiers) + throws CTypeReconstructionException + // ino.end + // ino.method.CSubstitutionSet.27478.body + { + super(); + for(int i=0; i substIter = this.getIterator(); + while(substIter.hasNext()){ + copy.addElement(substIter.next().clone()); + } + return copy; + } + // ino.end + + // ino.method.applyUnifier.27487.defdescription type=javadoc + /** + * Wendet den Unifier auf die rechten Seiten alle Substitutionen an. + *
Author: J�rg B�uerle + * @param unifier + */ + // ino.end + // ino.method.applyUnifier.27487.definition + public void applyUnifier(CSubstitutionSet unifier) + // ino.end + // ino.method.applyUnifier.27487.body + { + Iterator substIt = this.getIterator(); + + while(substIt.hasNext()){ + substIt.next().applyUnifier(unifier); + } + } + // ino.end + + // ino.method.applyThisSubstitutionSet.27490.definition + public Type applyThisSubstitutionSet(Type type) + // ino.end + // ino.method.applyThisSubstitutionSet.27490.body + { + Iterator substIt = this.getIterator(); + Type ty = type; + + while(substIt.hasNext()) { + ty = substIt.next().applyThisSubstitution(ty); + } + return ty; + } + // ino.end + + + public Iterator iterator() { + return this.getIterator(); + } +} +// ino.end diff --git a/src/de/dhbwstuttgart/typeinference/unify/CVectorSet.java b/src/de/dhbwstuttgart/typeinference/unify/CVectorSet.java new file mode 100755 index 00000000..ed35951a --- /dev/null +++ b/src/de/dhbwstuttgart/typeinference/unify/CVectorSet.java @@ -0,0 +1,165 @@ +// ino.module.CVectorSet.8702.package +package de.dhbwstuttgart.typeinference.unify; +// ino.end + +// ino.module.CVectorSet.8702.import +import java.util.Iterator; +import java.util.Vector; +// ino.end + +// ino.class.CVectorSet.27519.description type=javadoc +/** + * @author J�rg B�uerle + * @version $Date: 2013/02/07 05:08:51 $ + */ +// ino.end +// ino.class.CVectorSet.27519.declaration +public abstract class CVectorSet extends CSet +// ino.end +// ino.class.CVectorSet.27519.body +{ + // ino.attribute.m_Elements.27523.declaration + private Vector m_Elements = null; + // ino.end + + // ino.method.CVectorSet.27526.definition + public CVectorSet() + // ino.end + // ino.method.CVectorSet.27526.body + { + m_Elements = new Vector(); + } + // ino.end + + // ino.method.addElement.27529.definition + public void addElement(E element) + // ino.end + // ino.method.addElement.27529.body + { + m_Elements.addElement(element); + } + // ino.end + + // ino.method.removeElement.27532.definition + public void removeElement(E element) + // ino.end + // ino.method.removeElement.27532.body + { + m_Elements.addElement(element); + } + // ino.end + + public void addAll( CVectorSet set ) + { + for( int i=0;i getIterator() + // ino.end + // ino.method.getIterator.27535.body + { + return m_Elements.iterator(); + } + // ino.end + + // ino.method.getVector.27538.definition + public Vector getVector() + // ino.end + // ino.method.getVector.27538.body + { + return m_Elements; + } + // ino.end + + // ino.method.setVector.27541.definition + public void setVector(Vector elements) + // ino.end + // ino.method.setVector.27541.body + { + m_Elements = elements; + } + // ino.end + + /** + * Fügt ein CVectorSet an! + * Es handelt sich um eine Vereinigung (es werden keine bereits vorhandenen Elemente übernommen) + * @param anotherSet Das hinzuzufügende CVectorSet (CSet wird ignoriert) + */ + // ino.method.unite.27544.definition + public void unite(CSet anotherSet) + // ino.end + // ino.method.unite.27544.body + { + if(!(anotherSet instanceof CVectorSet)){ + return; + } + CVectorSet vectorSet = (CVectorSet)anotherSet; + + // Elemente der anderen Menge hinzuf�gen: + Iterator it = vectorSet.getIterator(); + while(it.hasNext()){ + E elem = it.next(); + if(!m_Elements.contains(elem)){ + m_Elements.addElement(elem); + } + } + //m_Elements.addAll(vectorSet.m_Elements); + } + // ino.end + + // ino.method.subtract.27547.definition + public void subtract(CSet anotherSet) + // ino.end + // ino.method.subtract.27547.body + { + if(!(anotherSet instanceof CVectorSet)){ + return; + } + CVectorSet vectorSet = (CVectorSet)anotherSet; + + // Elemente der anderen Menge entfernen: + m_Elements.removeAll(vectorSet.m_Elements); + } + // ino.end + + // ino.method.contains.27550.definition + public boolean contains(E element) + // ino.end + // ino.method.contains.27550.body + { + return m_Elements.contains(element); + } + // ino.end + + // ino.method.equals.27553.definition + public boolean equals(Object obj) + // ino.end + // ino.method.equals.27553.body + { + if(obj instanceof CVectorSet){ + CVectorSet tripSet= (CVectorSet)obj; + boolean ret = true; + ret &= (m_Elements.containsAll(tripSet.m_Elements)); + ret &= (tripSet.m_Elements.containsAll(m_Elements)); + return ret; + } + else{ + return false; + } + } + // ino.end + + // ino.method.getCardinality.27556.definition + public int getCardinality() + // ino.end + // ino.method.getCardinality.27556.body + { + return m_Elements.size(); + } + // ino.end +} +// ino.end diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index 5f0ca048..6ac56413 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -8,14 +8,13 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import mycompiler.mytypereconstruction.set.CSubstitutionSet; - import org.apache.log4j.Logger; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.MatchException; import de.dhbwstuttgart.myexception.SCException; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.CRefTypeSet; @@ -32,7 +31,6 @@ import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.WildcardType; import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; -import de.dhbwstuttgart.typeinference.parser.JavaClassName; // ino.end diff --git a/src/myJvmDisassembler/.cvsignore b/src/myJvmDisassembler/.cvsignore deleted file mode 100755 index 24602276..00000000 --- a/src/myJvmDisassembler/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -jvmDisassebler.class -*~* -*.class diff --git a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOLD_2.java b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOLD_2.java index c5dc6b91..a5a5417f 100755 --- a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOLD_2.java +++ b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOLD_2.java @@ -9,9 +9,9 @@ import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.unify.CSubstitution; import junit.framework.TestCase; import mycompiler.mytypereconstruction.CIntersectionType; -import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; diff --git a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOld.java b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOld.java index 59ca47f7..72876e78 100755 --- a/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOld.java +++ b/test/mycompiler/test/notUsedAnymore/AbstractInferenceTestOld.java @@ -12,9 +12,9 @@ import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.unify.CSubstitution; import junit.framework.TestCase; import mycompiler.mytypereconstruction.CIntersectionType; -import mycompiler.mytypereconstruction.CSubstitution; import mycompiler.mytypereconstruction.typeassumption.CInstVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CLocalVarTypeAssumption; import mycompiler.mytypereconstruction.typeassumption.CMethodTypeAssumption; diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java index f4a62459..adc2c858 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java @@ -3,7 +3,6 @@ package mycompiler.test.unittest.typeReconstructionTest; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.mymodifier.Modifiers; import org.apache.log4j.Logger; import org.apache.log4j.xml.DOMConfigurator; @@ -13,6 +12,7 @@ import de.dhbwstuttgart.syntaxtree.ClassBody; import de.dhbwstuttgart.syntaxtree.Interface; import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java index 76154140..850ac75d 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java @@ -4,7 +4,6 @@ package mycompiler.test.unittest.typeReconstructionTest; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.mymodifier.Modifiers; import org.apache.log4j.Logger; import org.apache.log4j.xml.DOMConfigurator; @@ -17,6 +16,7 @@ import de.dhbwstuttgart.syntaxtree.ClassBody; import de.dhbwstuttgart.syntaxtree.Interface; import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java index c6fc5538..93a78a82 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java @@ -3,7 +3,6 @@ package mycompiler.test.unittest.typeReconstructionTest; import java.util.Vector; import junit.framework.TestCase; -import mycompiler.mymodifier.Modifiers; import org.apache.log4j.xml.DOMConfigurator; import org.junit.After; @@ -15,6 +14,7 @@ import de.dhbwstuttgart.syntaxtree.ClassBody; import de.dhbwstuttgart.syntaxtree.Interface; import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; diff --git a/test/plugindevelopment/InsertSingleTypeTest.java b/test/plugindevelopment/InsertSingleTypeTest.java index ce73fefc..56c735f6 100644 --- a/test/plugindevelopment/InsertSingleTypeTest.java +++ b/test/plugindevelopment/InsertSingleTypeTest.java @@ -12,8 +12,8 @@ import org.junit.Test; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import junit.framework.TestCase; diff --git a/test/plugindevelopment/MartinTestCases/Tester.java b/test/plugindevelopment/MartinTestCases/Tester.java index cd5cbebb..a63eeaf7 100644 --- a/test/plugindevelopment/MartinTestCases/Tester.java +++ b/test/plugindevelopment/MartinTestCases/Tester.java @@ -8,8 +8,8 @@ import org.junit.Test; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import plugindevelopment.TypeInsertTester; import plugindevelopment.TypeInsertTests.MultipleTypesInsertTester; diff --git a/test/plugindevelopment/TRMEqualTest.java b/test/plugindevelopment/TRMEqualTest.java index 65475cec..1c669911 100644 --- a/test/plugindevelopment/TRMEqualTest.java +++ b/test/plugindevelopment/TRMEqualTest.java @@ -11,6 +11,7 @@ import org.junit.Test; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; @@ -20,7 +21,6 @@ import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import junit.framework.TestCase; diff --git a/test/plugindevelopment/TypeInsertSetEqualTest.java b/test/plugindevelopment/TypeInsertSetEqualTest.java index ade51473..0f993a54 100644 --- a/test/plugindevelopment/TypeInsertSetEqualTest.java +++ b/test/plugindevelopment/TypeInsertSetEqualTest.java @@ -10,8 +10,8 @@ import org.junit.Test; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; public class TypeInsertSetEqualTest { diff --git a/test/plugindevelopment/TypeInsertTester.java b/test/plugindevelopment/TypeInsertTester.java index a0e79f99..34c35bf6 100644 --- a/test/plugindevelopment/TypeInsertTester.java +++ b/test/plugindevelopment/TypeInsertTester.java @@ -19,8 +19,8 @@ import org.apache.log4j.SimpleLayout; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import junit.framework.TestCase; diff --git a/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java b/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java index 64233edd..20c32a91 100644 --- a/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java +++ b/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java @@ -6,8 +6,8 @@ import java.util.Vector; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import plugindevelopment.TypeInsertTester; diff --git a/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.java b/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.java index 18cb01a7..7e4cd1eb 100644 --- a/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.java +++ b/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.java @@ -10,8 +10,8 @@ import org.junit.Test; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; public class OverloadingInsertTest { diff --git a/test/syntaxTree/NodeEqualTest.java b/test/syntaxTree/NodeEqualTest.java index 0b4c2073..010cdf8c 100644 --- a/test/syntaxTree/NodeEqualTest.java +++ b/test/syntaxTree/NodeEqualTest.java @@ -8,9 +8,9 @@ import org.junit.Test; import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; +import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; -import de.dhbwstuttgart.typeinference.parser.JavaParser.yyException; import junit.framework.TestCase; public class NodeEqualTest extends TestCase{ From 6858092ef1c4b5926f936fc60c5882e5be7e1c5b Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Mon, 8 Sep 2014 15:12:47 +0200 Subject: [PATCH 27/31] =?UTF-8?q?Einf=C3=BChrung=20von=20ConstraintType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/de/dhbwstuttgart/core/MyCompiler.java | 2 +- src/de/dhbwstuttgart/parser/JavaLexer.lex | 2 +- src/de/dhbwstuttgart/parser/JavaParser.java | 691 ++++++++---------- src/de/dhbwstuttgart/parser/JavaParser.jay | 114 +-- src/de/dhbwstuttgart/syntaxtree/Class.java | 1 - .../syntaxtree/FieldDeclaration.java | 7 +- src/de/dhbwstuttgart/syntaxtree/Method.java | 6 +- .../dhbwstuttgart/syntaxtree/SourceFile.java | 18 +- .../syntaxtree/SyntaxTreeNode.java | 5 +- .../dhbwstuttgart/syntaxtree/misc/UsedId.java | 2 +- .../syntaxtree/operator/AddOp.java | 7 +- .../syntaxtree/operator/AndOp.java | 3 + .../syntaxtree/operator/DivideOp.java | 3 +- .../syntaxtree/operator/EqualOp.java | 5 +- .../syntaxtree/operator/GreaterEquOp.java | 1 + .../syntaxtree/operator/LogOp.java | 7 +- .../syntaxtree/operator/MulOp.java | 7 +- .../syntaxtree/operator/NotEqualOp.java | 2 +- .../syntaxtree/operator/Operator.java | 13 +- .../syntaxtree/operator/RelOp.java | 7 +- .../syntaxtree/statement/Assign.java | 6 +- .../syntaxtree/statement/Binary.java | 15 +- .../syntaxtree/statement/Block.java | 7 +- .../syntaxtree/statement/BoolLiteral.java | 4 +- .../syntaxtree/statement/DoubleLiteral.java | 2 +- .../syntaxtree/statement/ExprStmt.java | 3 +- .../syntaxtree/statement/ForStmt.java | 3 +- .../syntaxtree/statement/IfStmt.java | 9 +- .../syntaxtree/statement/InstVar.java | 7 +- .../syntaxtree/statement/IntLiteral.java | 2 +- .../statement/LambdaExpression.java | 2 +- .../syntaxtree/statement/LocalVarDecl.java | 6 +- .../syntaxtree/statement/NegativeExpr.java | 4 +- .../syntaxtree/statement/NewClass.java | 4 +- .../syntaxtree/statement/NotExpr.java | 5 +- .../syntaxtree/statement/PostDecExpr.java | 4 +- .../syntaxtree/statement/PostIncExpr.java | 3 +- .../syntaxtree/statement/PreDecExpr.java | 3 +- .../syntaxtree/statement/PreIncExpr.java | 3 +- .../syntaxtree/statement/Return.java | 2 +- .../syntaxtree/statement/Statement.java | 2 +- .../syntaxtree/statement/StringLiteral.java | 3 +- .../syntaxtree/statement/UnaryExpr.java | 4 +- .../syntaxtree/statement/WhileStmt.java | 6 +- .../syntaxtree/type/BaseType.java | 6 +- .../type/BoundedGenericTypeVar.java | 5 +- .../syntaxtree/type/GenericTypeVar.java | 5 + .../syntaxtree/type/RefType.java | 15 +- .../dhbwstuttgart/syntaxtree/type/Type.java | 16 +- .../dhbwstuttgart/syntaxtree/type/Void.java | 6 +- .../typeinference/ConstraintPair.java | 15 + .../typeinference/ConstraintType.java | 22 + .../typeinference/ConstraintsSet.java | 2 - .../typeinference/FunNInterface.java | 18 +- .../typeinference/OderConstraint.java | 13 +- .../typeinference/Overloading.java | 9 +- .../type => typeinference}/Pair.java | 9 +- .../typeinference/ResultSet.java | 1 - .../typeinference/SingleConstraint.java | 23 +- .../typeinference/TypeinferenceResultSet.java | 1 - .../typeinference/UndConstraint.java | 3 +- .../assumptions/TypeAssumptions.java | 13 +- .../exceptions/TypeinferenceException.java | 3 +- .../GenericTypeInsertPoint.java | 2 +- .../typedeployment/TypeInsertSet.java | 2 +- .../typeinference/unify/CSubstitution.java | 3 +- .../typeinference/unify/CSubstitutionSet.java | 2 +- .../typeinference/unify/FC_TTO.java | 6 +- .../typeinference/unify/MUB.java | 2 +- .../typeinference/unify/Unify.java | 4 +- .../typeReconstructionTest/TrMakeFCTest.java | 2 +- .../TrSubUnifyTest.java | 4 +- .../typeReconstructionTest/TrUnifyTest.java | 4 +- test/plugindevelopment/TRMEqualTest.java | 4 +- test/plugindevelopment/TypeInsertTester.java | 1 - .../TypeInsertTests/OverloadingInMethod.jav | 10 + .../TypeInsertTests/OverloadingInMethod.java | 19 + tools/AntParserBuilderWindows.xml | 2 +- tools/RunJay.sh | 2 +- 79 files changed, 628 insertions(+), 638 deletions(-) create mode 100644 src/de/dhbwstuttgart/typeinference/ConstraintPair.java create mode 100644 src/de/dhbwstuttgart/typeinference/ConstraintType.java rename src/de/dhbwstuttgart/{syntaxtree/type => typeinference}/Pair.java (96%) create mode 100644 test/plugindevelopment/TypeInsertTests/OverloadingInMethod.jav create mode 100644 test/plugindevelopment/TypeInsertTests/OverloadingInMethod.java diff --git a/src/de/dhbwstuttgart/core/MyCompiler.java b/src/de/dhbwstuttgart/core/MyCompiler.java index 2eb043b0..dd384b93 100755 --- a/src/de/dhbwstuttgart/core/MyCompiler.java +++ b/src/de/dhbwstuttgart/core/MyCompiler.java @@ -37,11 +37,11 @@ import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.IMatchable; import de.dhbwstuttgart.syntaxtree.type.ITypeContainer; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.FunNInterface; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; diff --git a/src/de/dhbwstuttgart/parser/JavaLexer.lex b/src/de/dhbwstuttgart/parser/JavaLexer.lex index cae5b2ce..60f3806e 100755 --- a/src/de/dhbwstuttgart/parser/JavaLexer.lex +++ b/src/de/dhbwstuttgart/parser/JavaLexer.lex @@ -7,7 +7,7 @@ ********************************************/ // user code: -package mycompiler.myparser; +package de.dhbwstuttgart.parser; %% diff --git a/src/de/dhbwstuttgart/parser/JavaParser.java b/src/de/dhbwstuttgart/parser/JavaParser.java index 188af602..82e4457c 100644 --- a/src/de/dhbwstuttgart/parser/JavaParser.java +++ b/src/de/dhbwstuttgart/parser/JavaParser.java @@ -1,6 +1,6 @@ // created by jay 0.7 (c) 1998 Axel.Schreiner@informatik.uni-osnabrueck.de - // line 2 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" /* Backup von JavaParser.jay 10.April 17 Uhr @@ -8,104 +8,23 @@ Backup von JavaParser.jay 10.April 17 Uhr package de.dhbwstuttgart.parser; -import java.util.Vector; - import de.dhbwstuttgart.core.AClassOrInterface; import de.dhbwstuttgart.syntaxtree.Class; -import de.dhbwstuttgart.syntaxtree.ClassBody; -import de.dhbwstuttgart.syntaxtree.Constant; -import de.dhbwstuttgart.syntaxtree.Constructor; -import de.dhbwstuttgart.syntaxtree.ExceptionList; -import de.dhbwstuttgart.syntaxtree.Field; -import de.dhbwstuttgart.syntaxtree.FieldDeclaration; -import de.dhbwstuttgart.syntaxtree.FormalParameter; -import de.dhbwstuttgart.syntaxtree.GenericDeclarationList; import de.dhbwstuttgart.syntaxtree.ImportDeclarations; import de.dhbwstuttgart.syntaxtree.Interface; -import de.dhbwstuttgart.syntaxtree.InterfaceBody; -import de.dhbwstuttgart.syntaxtree.Method; -import de.dhbwstuttgart.syntaxtree.ParameterList; import de.dhbwstuttgart.syntaxtree.SourceFile; -import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.misc.UsedId; -import de.dhbwstuttgart.syntaxtree.modifier.Abstract; -import de.dhbwstuttgart.syntaxtree.modifier.Final; -import de.dhbwstuttgart.syntaxtree.modifier.Modifier; -import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; -import de.dhbwstuttgart.syntaxtree.modifier.Private; -import de.dhbwstuttgart.syntaxtree.modifier.Protected; -import de.dhbwstuttgart.syntaxtree.modifier.Public; -import de.dhbwstuttgart.syntaxtree.modifier.Static; -import de.dhbwstuttgart.syntaxtree.operator.AndOp; -import de.dhbwstuttgart.syntaxtree.operator.DivideOp; -import de.dhbwstuttgart.syntaxtree.operator.EqualOp; -import de.dhbwstuttgart.syntaxtree.operator.GreaterEquOp; -import de.dhbwstuttgart.syntaxtree.operator.GreaterOp; -import de.dhbwstuttgart.syntaxtree.operator.LessEquOp; -import de.dhbwstuttgart.syntaxtree.operator.LessOp; -import de.dhbwstuttgart.syntaxtree.operator.MinusOp; -import de.dhbwstuttgart.syntaxtree.operator.ModuloOp; -import de.dhbwstuttgart.syntaxtree.operator.NotEqualOp; -import de.dhbwstuttgart.syntaxtree.operator.Operator; -import de.dhbwstuttgart.syntaxtree.operator.OrOp; -import de.dhbwstuttgart.syntaxtree.operator.PlusOp; -import de.dhbwstuttgart.syntaxtree.operator.TimesOp; -import de.dhbwstuttgart.syntaxtree.statement.ArgumentList; -import de.dhbwstuttgart.syntaxtree.statement.Assign; -import de.dhbwstuttgart.syntaxtree.statement.Binary; -import de.dhbwstuttgart.syntaxtree.statement.Block; -import de.dhbwstuttgart.syntaxtree.statement.BoolLiteral; -import de.dhbwstuttgart.syntaxtree.statement.CastExpr; -import de.dhbwstuttgart.syntaxtree.statement.CharLiteral; -import de.dhbwstuttgart.syntaxtree.statement.DoubleLiteral; -import de.dhbwstuttgart.syntaxtree.statement.EmptyStmt; -import de.dhbwstuttgart.syntaxtree.statement.Expr; -import de.dhbwstuttgart.syntaxtree.statement.ExprStmt; -import de.dhbwstuttgart.syntaxtree.statement.FloatLiteral; -import de.dhbwstuttgart.syntaxtree.statement.ForStmt; -import de.dhbwstuttgart.syntaxtree.statement.IfStmt; -import de.dhbwstuttgart.syntaxtree.statement.InstVar; -import de.dhbwstuttgart.syntaxtree.statement.InstanceOf; -import de.dhbwstuttgart.syntaxtree.statement.IntLiteral; -import de.dhbwstuttgart.syntaxtree.statement.LambdaExpression; -import de.dhbwstuttgart.syntaxtree.statement.Literal; -import de.dhbwstuttgart.syntaxtree.statement.LocalOrFieldVar; -import de.dhbwstuttgart.syntaxtree.statement.LocalVarDecl; -import de.dhbwstuttgart.syntaxtree.statement.LongLiteral; -import de.dhbwstuttgart.syntaxtree.statement.MethodCall; -import de.dhbwstuttgart.syntaxtree.statement.NegativeExpr; -import de.dhbwstuttgart.syntaxtree.statement.NewClass; -import de.dhbwstuttgart.syntaxtree.statement.NotExpr; -import de.dhbwstuttgart.syntaxtree.statement.Null; -import de.dhbwstuttgart.syntaxtree.statement.PositivExpr; -import de.dhbwstuttgart.syntaxtree.statement.PostDecExpr; -import de.dhbwstuttgart.syntaxtree.statement.PostIncExpr; -import de.dhbwstuttgart.syntaxtree.statement.PreDecExpr; -import de.dhbwstuttgart.syntaxtree.statement.PreIncExpr; -import de.dhbwstuttgart.syntaxtree.statement.Receiver; -import de.dhbwstuttgart.syntaxtree.statement.Return; -import de.dhbwstuttgart.syntaxtree.statement.Statement; -import de.dhbwstuttgart.syntaxtree.statement.StringLiteral; -import de.dhbwstuttgart.syntaxtree.statement.This; -import de.dhbwstuttgart.syntaxtree.statement.UnaryMinus; -import de.dhbwstuttgart.syntaxtree.statement.UnaryNot; -import de.dhbwstuttgart.syntaxtree.statement.UnaryPlus; -import de.dhbwstuttgart.syntaxtree.statement.WhileStmt; -import de.dhbwstuttgart.syntaxtree.type.BaseType; -import de.dhbwstuttgart.syntaxtree.type.BooleanType; -import de.dhbwstuttgart.syntaxtree.type.BoundedGenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.CharacterType; -import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; -import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.IntegerType; -import de.dhbwstuttgart.syntaxtree.type.Pair; -import de.dhbwstuttgart.syntaxtree.type.ParaList; -import de.dhbwstuttgart.syntaxtree.type.RefType; -import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; -import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Void; -import de.dhbwstuttgart.syntaxtree.type.WildcardType; +import de.dhbwstuttgart.*; +import de.dhbwstuttgart.syntaxtree.*; +import de.dhbwstuttgart.syntaxtree.misc.*; +import de.dhbwstuttgart.syntaxtree.modifier.*; +import de.dhbwstuttgart.syntaxtree.operator.*; +import de.dhbwstuttgart.syntaxtree.type.*; +import de.dhbwstuttgart.syntaxtree.statement.*; +import java.util.Vector; public class JavaParser{ public Vector path = new Vector(); @@ -129,7 +48,7 @@ void initUsedIdsToCheck() { //LUAR 07-05-29 Anfang für Wildcard Test public Vector testPair = new Vector(); //LUAR 07-05-29 Ende - // line 132 "-" + // line 52 "-" // %token constants //{ //ergaenzt PL 23.01.01 wieder entfernt 21.12.01 public static final int ABSTRACT = 257; @@ -763,20 +682,20 @@ public Vector testPair = new Vector(); yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]); switch (yyN) { case 1: - // line 327 "./../src/mycompiler/myparser/JavaParser.jay" + // line 247 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((SourceFile)yyVals[0+yyTop]); } break; case 2: - // line 331 "./../src/mycompiler/myparser/JavaParser.jay" + // line 251 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((SourceFile)yyVals[0+yyTop]).addImports(((ImportDeclarations)yyVals[-1+yyTop])); yyVal=((SourceFile)yyVals[0+yyTop]); } break; case 3: - // line 336 "./../src/mycompiler/myparser/JavaParser.jay" + // line 256 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Package*/ ((SourceFile)yyVals[0+yyTop]).setPackageName(((UsedId)yyVals[-2+yyTop])); @@ -785,7 +704,7 @@ case 3: } break; case 4: - // line 343 "./../src/mycompiler/myparser/JavaParser.jay" + // line 263 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Package*/ ((SourceFile)yyVals[0+yyTop]).setPackageName(((UsedId)yyVals[-1+yyTop])); @@ -793,21 +712,21 @@ case 4: } break; case 5: - // line 349 "./../src/mycompiler/myparser/JavaParser.jay" + // line 269 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { this.testPair.add(new Pair(((Type)yyVals[-2+yyTop]),((Type)yyVals[-1+yyTop]))); yyVal=((SourceFile)yyVals[0+yyTop]); } break; case 6: - // line 355 "./../src/mycompiler/myparser/JavaParser.jay" + // line 275 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Package*/ yyVal = ((UsedId)yyVals[-1+yyTop]); } break; case 7: - // line 361 "./../src/mycompiler/myparser/JavaParser.jay" + // line 281 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ImportDeclarations declarations=new ImportDeclarations(); declarations.addElement(((UsedId)yyVals[0+yyTop])); @@ -815,20 +734,20 @@ case 7: } break; case 8: - // line 367 "./../src/mycompiler/myparser/JavaParser.jay" + // line 287 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ImportDeclarations)yyVals[-1+yyTop]).addElement(((UsedId)yyVals[0+yyTop])); yyVal=((ImportDeclarations)yyVals[-1+yyTop]); } break; case 9: - // line 373 "./../src/mycompiler/myparser/JavaParser.jay" + // line 293 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((UsedId)yyVals[-1+yyTop]); } break; case 10: - // line 378 "./../src/mycompiler/myparser/JavaParser.jay" + // line 298 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { SourceFile Scfile = new SourceFile(); Scfile.addElement(((AClassOrInterface)yyVals[0+yyTop])); @@ -836,39 +755,39 @@ case 10: } break; case 11: - // line 384 "./../src/mycompiler/myparser/JavaParser.jay" + // line 304 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((SourceFile)yyVals[-1+yyTop]).addElement(((AClassOrInterface)yyVals[0+yyTop])); yyVal=((SourceFile)yyVals[-1+yyTop]); } break; case 12: - // line 390 "./../src/mycompiler/myparser/JavaParser.jay" + // line 310 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((UsedId)yyVals[0+yyTop]); } break; case 13: - // line 394 "./../src/mycompiler/myparser/JavaParser.jay" + // line 314 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((UsedId)yyVals[0+yyTop]); } break; case 14: - // line 399 "./../src/mycompiler/myparser/JavaParser.jay" + // line 319 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Class)yyVals[0+yyTop]); } break; case 15: - // line 403 "./../src/mycompiler/myparser/JavaParser.jay" + // line 323 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ yyVal=((Interface)yyVals[0+yyTop]); } break; case 16: - // line 410 "./../src/mycompiler/myparser/JavaParser.jay" + // line 330 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((UsedId)yyVals[-2+yyTop]).set_Name(((Token)yyVals[0+yyTop]).getLexem()); ((UsedId)yyVals[-2+yyTop]).setOffset(((UsedId)yyVals[-2+yyTop]).getOffset()); @@ -876,7 +795,7 @@ case 16: } break; case 17: - // line 417 "./../src/mycompiler/myparser/JavaParser.jay" + // line 337 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((UsedId)yyVals[-2+yyTop]).set_Name(((Token)yyVals[0+yyTop]).getLexem()); ((UsedId)yyVals[-2+yyTop]).setOffset(((UsedId)yyVals[-2+yyTop]).getOffset()); @@ -884,7 +803,7 @@ case 17: } break; case 18: - // line 423 "./../src/mycompiler/myparser/JavaParser.jay" + // line 343 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((UsedId)yyVals[-2+yyTop]).set_Name("*"); ((UsedId)yyVals[-2+yyTop]).setOffset(((UsedId)yyVals[-2+yyTop]).getOffset()); @@ -892,7 +811,7 @@ case 18: } break; case 19: - // line 431 "./../src/mycompiler/myparser/JavaParser.jay" + // line 351 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { UsedId UI = new UsedId(((Token)yyVals[0+yyTop]).getOffset()); UI.set_Name( ((Token)yyVals[0+yyTop]).getLexem() ); @@ -901,7 +820,7 @@ case 19: } break; case 20: - // line 439 "./../src/mycompiler/myparser/JavaParser.jay" + // line 359 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Um das hier uebersichtlicher zu halten,*/ /* gibt es einen allumfassenden Konstruktor fuer Class*/ @@ -920,7 +839,7 @@ case 20: } break; case 21: - // line 456 "./../src/mycompiler/myparser/JavaParser.jay" + // line 376 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-1+yyTop]).getName(), ((Modifiers)yyVals[-3+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes,usedIdsToCheck, null, null, ((ClassAndParameter)yyVals[-1+yyTop]).getParaVector(), ((Token)yyVals[-2+yyTop]).getOffset()); this.initContainedTypes(); @@ -928,7 +847,7 @@ case 21: } break; case 22: - // line 462 "./../src/mycompiler/myparser/JavaParser.jay" + // line 382 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes,usedIdsToCheck, ((UsedId)yyVals[-1+yyTop]), null, ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -936,7 +855,7 @@ case 22: } break; case 23: - // line 468 "./../src/mycompiler/myparser/JavaParser.jay" + // line 388 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, usedIdsToCheck, ((UsedId)yyVals[-1+yyTop]), null, ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -944,7 +863,7 @@ case 23: } break; case 24: - // line 475 "./../src/mycompiler/myparser/JavaParser.jay" + // line 395 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes, usedIdsToCheck, null, ((InterfaceList)yyVals[-1+yyTop]).getVector(), ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -952,7 +871,7 @@ case 24: } break; case 25: - // line 481 "./../src/mycompiler/myparser/JavaParser.jay" + // line 401 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, usedIdsToCheck, null, ((InterfaceList)yyVals[-1+yyTop]).getVector(), ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -960,7 +879,7 @@ case 25: } break; case 26: - // line 487 "./../src/mycompiler/myparser/JavaParser.jay" + // line 407 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-3+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes,usedIdsToCheck, ((UsedId)yyVals[-2+yyTop]), ((InterfaceList)yyVals[-1+yyTop]).getVector(), ((ClassAndParameter)yyVals[-3+yyTop]).getParaVector(), ((Token)yyVals[-4+yyTop]).getOffset()); this.initContainedTypes(); @@ -968,7 +887,7 @@ case 26: } break; case 27: - // line 493 "./../src/mycompiler/myparser/JavaParser.jay" + // line 413 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-3+yyTop]).getName(), ((Modifiers)yyVals[-5+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, usedIdsToCheck, ((UsedId)yyVals[-2+yyTop]), ((InterfaceList)yyVals[-1+yyTop]).getVector(), ((ClassAndParameter)yyVals[-3+yyTop]).getParaVector(), ((Token)yyVals[-4+yyTop]).getOffset()); this.initContainedTypes(); @@ -976,7 +895,7 @@ case 27: } break; case 28: - // line 500 "./../src/mycompiler/myparser/JavaParser.jay" + // line 420 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* HOTI*/ /* Verbindet den Namen eines Interfaces mit einer optionalen Parameterliste*/ @@ -984,13 +903,13 @@ case 28: } break; case 29: - // line 506 "./../src/mycompiler/myparser/JavaParser.jay" + // line 426 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new InterfaceAndParameter(((Token)yyVals[-3+yyTop]).getLexem(), ((ParaList)yyVals[-1+yyTop])); } break; case 30: - // line 511 "./../src/mycompiler/myparser/JavaParser.jay" + // line 431 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Hilfskonstrukt, um die Grammatik ueberschaubar zu halten*/ /* Verbindet den Namen einer Klasse mit einer optionalen Parameterliste*/ @@ -998,13 +917,13 @@ case 30: } break; case 31: - // line 517 "./../src/mycompiler/myparser/JavaParser.jay" + // line 437 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new ClassAndParameter(((Token)yyVals[-3+yyTop]).getLexem(), ((ParaList)yyVals[-1+yyTop])); } break; case 32: - // line 522 "./../src/mycompiler/myparser/JavaParser.jay" + // line 442 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ Interface ic = new Interface(((InterfaceAndParameter)yyVals[-1+yyTop]).getName(), ((Token)yyVals[-2+yyTop]).getOffset()); @@ -1016,7 +935,7 @@ case 32: } break; case 33: - // line 532 "./../src/mycompiler/myparser/JavaParser.jay" + // line 452 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Interface ic = new Interface(((InterfaceAndParameter)yyVals[-1+yyTop]).getName(), ((Modifiers)yyVals[-3+yyTop]), ((Token)yyVals[-2+yyTop]).getOffset()); ic.setInterfaceBody(((InterfaceBody)yyVals[0+yyTop])); @@ -1027,7 +946,7 @@ case 33: } break; case 34: - // line 541 "./../src/mycompiler/myparser/JavaParser.jay" + // line 461 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Interface ic = new Interface(((InterfaceAndParameter)yyVals[-2+yyTop]).getName(), ((Token)yyVals[-3+yyTop]).getOffset()); ic.setParaList(((InterfaceAndParameter)yyVals[-2+yyTop]).getParaVector()); @@ -1039,7 +958,7 @@ case 34: } break; case 35: - // line 551 "./../src/mycompiler/myparser/JavaParser.jay" + // line 471 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Interface ic = new Interface(((InterfaceAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((Token)yyVals[-3+yyTop]).getOffset()); ic.setParaList(((InterfaceAndParameter)yyVals[-2+yyTop]).getParaVector()); @@ -1051,12 +970,12 @@ case 35: } break; case 36: - // line 562 "./../src/mycompiler/myparser/JavaParser.jay" + // line 482 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParaList pl = new ParaList(); /* #JB# 05.04.2005 */ /* ########################################################### */ - pl.getParalist().addElement(new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(), ((Token)yyVals[0+yyTop]).getOffset())); + pl.getParalist().addElement(new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(),null, ((Token)yyVals[0+yyTop]).getOffset())); /*pl.getParalist().addElement( new TypePlaceholder($1.getLexem()) );*/ /* ########################################################### */ org.apache.log4j.Logger.getLogger("parser").debug( "IDENTIFIER --> Paralist f�r " + ((Token)yyVals[0+yyTop]).getLexem() + " TV"); @@ -1064,7 +983,7 @@ case 36: } break; case 37: - // line 573 "./../src/mycompiler/myparser/JavaParser.jay" + // line 493 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParaList pl = new ParaList(); RefType t = new RefType( ((Token)yyVals[-3+yyTop]).getLexem(),((Token)yyVals[-3+yyTop]).getOffset() ); @@ -1075,7 +994,7 @@ case 37: } break; case 38: - // line 582 "./../src/mycompiler/myparser/JavaParser.jay" + // line 502 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParaList pl = new ParaList(); pl.getParalist().addElement(((WildcardType)yyVals[0+yyTop])); @@ -1083,12 +1002,12 @@ case 38: } break; case 39: - // line 588 "./../src/mycompiler/myparser/JavaParser.jay" + // line 508 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* #JB# 05.04.2005 */ /* ########################################################### */ - ((ParaList)yyVals[-2+yyTop]).getParalist().addElement(new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(),((Token)yyVals[0+yyTop]).getOffset())); + ((ParaList)yyVals[-2+yyTop]).getParalist().addElement(new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(), null,((Token)yyVals[0+yyTop]).getOffset())); /*$1.getParalist().addElement(new TypePlaceholder($3.getLexem()));*/ /* ########################################################### */ org.apache.log4j.Logger.getLogger("parser").debug( "paralist ',' IDENTIFIER --> Paralist f�r " + ((Token)yyVals[0+yyTop]).getLexem() + ": TV"); @@ -1097,7 +1016,7 @@ case 39: } break; case 40: - // line 601 "./../src/mycompiler/myparser/JavaParser.jay" + // line 521 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { RefType t = new RefType( ((Token)yyVals[-3+yyTop]).getLexem() ,((Token)yyVals[-3+yyTop]).getOffset() ); t.set_ParaList( ((ParaList)yyVals[-1+yyTop]).get_ParaList() ); @@ -1107,14 +1026,14 @@ case 40: } break; case 41: - // line 609 "./../src/mycompiler/myparser/JavaParser.jay" + // line 529 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ParaList)yyVals[-2+yyTop]).getParalist().addElement(((WildcardType)yyVals[0+yyTop])); yyVal=((ParaList)yyVals[-2+yyTop]); } break; case 42: - // line 615 "./../src/mycompiler/myparser/JavaParser.jay" + // line 535 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*Luar 29.11.06 Offset auf -1, da keine Angabe vorhanden*/ WildcardType wc = new WildcardType(-1); @@ -1122,34 +1041,34 @@ case 42: } break; case 43: - // line 621 "./../src/mycompiler/myparser/JavaParser.jay" + // line 541 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ExtendsWildcardType ewc = new ExtendsWildcardType(((Token)yyVals[-1+yyTop]).getOffset(),((RefType)yyVals[0+yyTop])); yyVal = ewc; } break; case 44: - // line 626 "./../src/mycompiler/myparser/JavaParser.jay" + // line 546 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { SuperWildcardType swc = new SuperWildcardType(((Token)yyVals[-1+yyTop]).getOffset(),((RefType)yyVals[0+yyTop])); yyVal = swc; } break; case 45: - // line 632 "./../src/mycompiler/myparser/JavaParser.jay" + // line 552 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ClassBody CB = new ClassBody(); yyVal = CB; } break; case 46: - // line 638 "./../src/mycompiler/myparser/JavaParser.jay" + // line 558 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((ClassBody)yyVals[-1+yyTop]); } break; case 47: - // line 643 "./../src/mycompiler/myparser/JavaParser.jay" + // line 563 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Modifiers Mod = new Modifiers(); Mod.addModifier(((Modifier)yyVals[0+yyTop])); @@ -1157,20 +1076,20 @@ case 47: } break; case 48: - // line 649 "./../src/mycompiler/myparser/JavaParser.jay" + // line 569 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Modifiers)yyVals[-1+yyTop]).addModifier(((Modifier)yyVals[0+yyTop])); yyVal = ((Modifiers)yyVals[-1+yyTop]); } break; case 49: - // line 655 "./../src/mycompiler/myparser/JavaParser.jay" + // line 575 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((UsedId)yyVals[0+yyTop]); } break; case 50: - // line 660 "./../src/mycompiler/myparser/JavaParser.jay" + // line 580 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ InterfaceList il = new InterfaceList(); @@ -1179,27 +1098,27 @@ case 50: } break; case 51: - // line 667 "./../src/mycompiler/myparser/JavaParser.jay" + // line 587 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((InterfaceList)yyVals[-2+yyTop]).addInterface(((UsedId)yyVals[0+yyTop])); yyVal = ((InterfaceList)yyVals[-2+yyTop]); } break; case 52: - // line 673 "./../src/mycompiler/myparser/JavaParser.jay" + // line 593 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ yyVal = new InterfaceBody(); } break; case 53: - // line 678 "./../src/mycompiler/myparser/JavaParser.jay" + // line 598 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((InterfaceBody)yyVals[-1+yyTop]); } break; case 54: - // line 685 "./../src/mycompiler/myparser/JavaParser.jay" + // line 605 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ InterfaceList il = new InterfaceList(); @@ -1208,14 +1127,14 @@ case 54: } break; case 55: - // line 692 "./../src/mycompiler/myparser/JavaParser.jay" + // line 612 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((InterfaceList)yyVals[-2+yyTop]).addInterface(((UsedId)yyVals[0+yyTop])); yyVal = ((InterfaceList)yyVals[-2+yyTop]); } break; case 56: - // line 699 "./../src/mycompiler/myparser/JavaParser.jay" + // line 619 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ClassBody CB = new ClassBody(); CB.addField( ((Field)yyVals[0+yyTop]) ); @@ -1223,55 +1142,55 @@ case 56: } break; case 57: - // line 705 "./../src/mycompiler/myparser/JavaParser.jay" + // line 625 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ClassBody)yyVals[-1+yyTop]).addField(((Field)yyVals[0+yyTop])); yyVal = ((ClassBody)yyVals[-1+yyTop]); } break; case 58: - // line 712 "./../src/mycompiler/myparser/JavaParser.jay" + // line 632 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Public Pub = new Public(); yyVal=Pub; } break; case 59: - // line 717 "./../src/mycompiler/myparser/JavaParser.jay" + // line 637 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Protected Pro = new Protected(); yyVal=Pro; } break; case 60: - // line 722 "./../src/mycompiler/myparser/JavaParser.jay" + // line 642 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Private Pri = new Private(); yyVal=Pri; } break; case 61: - // line 727 "./../src/mycompiler/myparser/JavaParser.jay" + // line 647 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Static Sta = new Static(); yyVal=Sta; } break; case 62: - // line 732 "./../src/mycompiler/myparser/JavaParser.jay" + // line 652 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Abstract Abs = new Abstract(); yyVal=Abs; } break; case 63: - // line 737 "./../src/mycompiler/myparser/JavaParser.jay" + // line 657 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Final fin = new Final(); yyVal = fin; } break; case 64: - // line 743 "./../src/mycompiler/myparser/JavaParser.jay" + // line 663 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*PL 05-07-30 eingefuegt containedTypes ANFANG*/ RefType RT = new RefType(-1); @@ -1286,7 +1205,7 @@ case 64: } break; case 65: - // line 758 "./../src/mycompiler/myparser/JavaParser.jay" + // line 678 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ InterfaceBody ib = new InterfaceBody(); @@ -1295,39 +1214,39 @@ case 65: } break; case 66: - // line 765 "./../src/mycompiler/myparser/JavaParser.jay" + // line 685 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((InterfaceBody)yyVals[-1+yyTop]).addElement(((Field)yyVals[0+yyTop])); yyVal = ((InterfaceBody)yyVals[-1+yyTop]); } break; case 67: - // line 771 "./../src/mycompiler/myparser/JavaParser.jay" + // line 691 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interfaces*/ yyVal = ((UsedId)yyVals[0+yyTop]); } break; case 68: - // line 777 "./../src/mycompiler/myparser/JavaParser.jay" + // line 697 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Field)yyVals[0+yyTop]); } break; case 69: - // line 782 "./../src/mycompiler/myparser/JavaParser.jay" + // line 702 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Method)yyVals[0+yyTop]); } break; case 70: - // line 786 "./../src/mycompiler/myparser/JavaParser.jay" + // line 706 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Field)yyVals[0+yyTop]); } break; case 71: - // line 792 "./../src/mycompiler/myparser/JavaParser.jay" + // line 712 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { if (((Vector)yyVals[0+yyTop]) != null) { /*$1.set_ParaList($2.get_ParaList());*/ @@ -1339,7 +1258,7 @@ case 71: } break; case 72: - // line 803 "./../src/mycompiler/myparser/JavaParser.jay" + // line 723 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Vector tl = new Vector(); tl.add(((Type)yyVals[0+yyTop])); @@ -1347,21 +1266,21 @@ case 72: } break; case 73: - // line 809 "./../src/mycompiler/myparser/JavaParser.jay" + // line 729 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Vector)yyVals[-2+yyTop]).add(((Type)yyVals[0+yyTop])); yyVal=((Vector)yyVals[-2+yyTop]); } break; case 74: - // line 814 "./../src/mycompiler/myparser/JavaParser.jay" + // line 734 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Vector)yyVals[-2+yyTop]).add(((WildcardType)yyVals[0+yyTop])); yyVal=((Vector)yyVals[-2+yyTop]); } break; case 75: - // line 819 "./../src/mycompiler/myparser/JavaParser.jay" + // line 739 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Vector tl = new Vector(); tl.add(((WildcardType)yyVals[0+yyTop])); @@ -1369,42 +1288,42 @@ case 75: } break; case 76: - // line 827 "./../src/mycompiler/myparser/JavaParser.jay" + // line 747 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = null; } break; case 77: - // line 829 "./../src/mycompiler/myparser/JavaParser.jay" + // line 749 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((Vector)yyVals[-1+yyTop]); } break; case 78: - // line 834 "./../src/mycompiler/myparser/JavaParser.jay" + // line 754 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interfaces, Spezialform Konstantendef.*/ yyVal = ((Constant)yyVals[0+yyTop]); } break; case 79: - // line 839 "./../src/mycompiler/myparser/JavaParser.jay" + // line 759 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((Method)yyVals[0+yyTop]); } break; case 80: - // line 844 "./../src/mycompiler/myparser/JavaParser.jay" + // line 764 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Field)yyVals[0+yyTop]); } break; case 81: - // line 848 "./../src/mycompiler/myparser/JavaParser.jay" + // line 768 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Method)yyVals[0+yyTop]); } break; case 82: - // line 853 "./../src/mycompiler/myparser/JavaParser.jay" + // line 773 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Method STAT = new Method(((Token)yyVals[-1+yyTop]).getOffset()); DeclId DST = new DeclId(); @@ -1419,14 +1338,14 @@ case 82: } break; case 83: - // line 867 "./../src/mycompiler/myparser/JavaParser.jay" + // line 787 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Constructor)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); yyVal = ((Constructor)yyVals[-1+yyTop]); } break; case 84: - // line 872 "./../src/mycompiler/myparser/JavaParser.jay" + // line 792 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Constructor)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); ((Constructor)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); @@ -1434,7 +1353,7 @@ case 84: } break; case 85: - // line 879 "./../src/mycompiler/myparser/JavaParser.jay" + // line 799 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ Constant c = new Constant(((Token)yyVals[-3+yyTop]).getLexem(), ((Modifiers)yyVals[-5+yyTop])); @@ -1444,14 +1363,14 @@ case 85: } break; case 86: - // line 888 "./../src/mycompiler/myparser/JavaParser.jay" + // line 808 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ yyVal = ((Method)yyVals[-1+yyTop]); } break; case 87: - // line 913 "./../src/mycompiler/myparser/JavaParser.jay" + // line 833 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FieldDeclaration ret = new FieldDeclaration(((DeclId)yyVals[-2+yyTop]).getOffset()); ret.set_DeclId(((DeclId)yyVals[-2+yyTop])); @@ -1460,7 +1379,7 @@ case 87: } break; case 88: - // line 920 "./../src/mycompiler/myparser/JavaParser.jay" + // line 840 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FieldDeclaration ret = new FieldDeclaration(((DeclId)yyVals[0+yyTop]).getOffset()); ret.set_DeclId(((DeclId)yyVals[0+yyTop])); @@ -1468,27 +1387,27 @@ case 88: } break; case 89: - // line 927 "./../src/mycompiler/myparser/JavaParser.jay" + // line 847 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { GenericDeclarationList ret = new GenericDeclarationList(((GenericVarDeclarationList)yyVals[-1+yyTop]).getElements(),((GenericVarDeclarationList)yyVals[-1+yyTop]).getEndOffset()); yyVal = ret; } break; case 90: - // line 934 "./../src/mycompiler/myparser/JavaParser.jay" + // line 854 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; case 91: - // line 938 "./../src/mycompiler/myparser/JavaParser.jay" + // line 858 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; case 92: - // line 943 "./../src/mycompiler/myparser/JavaParser.jay" + // line 863 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {/*angefügt von Andreas Stadelmeier*/ ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); ((FieldDeclaration)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); @@ -1496,13 +1415,13 @@ case 92: } break; case 93: - // line 950 "./../src/mycompiler/myparser/JavaParser.jay" + // line 870 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; case 94: - // line 955 "./../src/mycompiler/myparser/JavaParser.jay" + // line 875 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + ((Type)yyVals[-2+yyTop])); ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); @@ -1510,7 +1429,7 @@ case 94: } break; case 95: - // line 962 "./../src/mycompiler/myparser/JavaParser.jay" + // line 882 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); for(int i=0;i<(((FieldDeclaration)yyVals[-1+yyTop]).getDeclIdVector().size());i++) @@ -1521,27 +1440,27 @@ case 95: } break; case 96: - // line 972 "./../src/mycompiler/myparser/JavaParser.jay" + // line 892 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); yyVal=((Method)yyVals[-1+yyTop]); } break; case 97: - // line 979 "./../src/mycompiler/myparser/JavaParser.jay" + // line 899 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block Bl = new Block(); yyVal=Bl; } break; case 98: - // line 985 "./../src/mycompiler/myparser/JavaParser.jay" + // line 905 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[-1+yyTop]); } break; case 99: - // line 990 "./../src/mycompiler/myparser/JavaParser.jay" + // line 910 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Constructor CON = new Constructor(null); /*TODO: Der Parser kann sowieso nicht zwischen einem Konstruktor und einer Methode unterscheiden. Das hier kann wegfallen...*/ DeclId DIDCon = new DeclId(); @@ -1551,7 +1470,7 @@ case 99: } break; case 100: - // line 998 "./../src/mycompiler/myparser/JavaParser.jay" + // line 918 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Constructor CONpara = new Constructor(null); DeclId DIconpara = new DeclId(); @@ -1562,14 +1481,14 @@ case 100: } break; case 101: - // line 1008 "./../src/mycompiler/myparser/JavaParser.jay" + // line 928 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block CBL = new Block(); yyVal=CBL; } break; case 102: - // line 1013 "./../src/mycompiler/myparser/JavaParser.jay" + // line 933 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block CBLexpl = new Block(); CBLexpl.set_Statement(((Statement)yyVals[-1+yyTop])); @@ -1577,13 +1496,13 @@ case 102: } break; case 103: - // line 1019 "./../src/mycompiler/myparser/JavaParser.jay" + // line 939 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[-1+yyTop]); } break; case 104: - // line 1023 "./../src/mycompiler/myparser/JavaParser.jay" + // line 943 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block CBes = new Block(); CBes.set_Statement(((Statement)yyVals[-2+yyTop])); @@ -1595,7 +1514,7 @@ case 104: } break; case 105: - // line 1034 "./../src/mycompiler/myparser/JavaParser.jay" + // line 954 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ExceptionList EL = new ExceptionList(); EL.set_addElem(((RefType)yyVals[0+yyTop])); @@ -1603,13 +1522,13 @@ case 105: } break; case 106: - // line 1041 "./../src/mycompiler/myparser/JavaParser.jay" + // line 961 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((GenericTypeVar)yyVals[0+yyTop]); } break; case 107: - // line 1046 "./../src/mycompiler/myparser/JavaParser.jay" + // line 966 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParaList p = new ParaList(); p.add_ParaList(((GenericTypeVar)yyVals[0+yyTop])); @@ -1617,28 +1536,28 @@ case 107: } break; case 108: - // line 1052 "./../src/mycompiler/myparser/JavaParser.jay" + // line 972 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ParaList)yyVals[-2+yyTop]).add_ParaList(((GenericTypeVar)yyVals[0+yyTop])); yyVal=((ParaList)yyVals[-2+yyTop]); } break; case 109: - // line 1059 "./../src/mycompiler/myparser/JavaParser.jay" + // line 979 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - yyVal=new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(),((Token)yyVals[0+yyTop]).getOffset()); + yyVal=new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(),null,((Token)yyVals[0+yyTop]).getOffset()); } break; case 110: - // line 1063 "./../src/mycompiler/myparser/JavaParser.jay" + // line 983 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - BoundedGenericTypeVar gtv=new BoundedGenericTypeVar(((Token)yyVals[-2+yyTop]).getLexem(), ((BoundedClassIdentifierList)yyVals[0+yyTop]), ((Token)yyVals[-2+yyTop]).getOffset() ,((BoundedClassIdentifierList)yyVals[0+yyTop]).getEndOffset()); + BoundedGenericTypeVar gtv=new BoundedGenericTypeVar(((Token)yyVals[-2+yyTop]).getLexem(), ((BoundedClassIdentifierList)yyVals[0+yyTop]),null, ((Token)yyVals[-2+yyTop]).getOffset() ,((BoundedClassIdentifierList)yyVals[0+yyTop]).getEndOffset()); /*gtv.setBounds($3);*/ yyVal=gtv; } break; case 111: - // line 1070 "./../src/mycompiler/myparser/JavaParser.jay" + // line 990 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Vector vec=new Vector(); vec.addElement(((RefType)yyVals[0+yyTop])); @@ -1647,7 +1566,7 @@ case 111: } break; case 112: - // line 1077 "./../src/mycompiler/myparser/JavaParser.jay" + // line 997 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((BoundedClassIdentifierList)yyVals[-2+yyTop]).addElement(((RefType)yyVals[0+yyTop])); ((BoundedClassIdentifierList)yyVals[-2+yyTop]).addOffsetOff(((RefType)yyVals[0+yyTop])); @@ -1656,7 +1575,7 @@ case 112: } break; case 113: - // line 1085 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1005 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { GenericVarDeclarationList vec=new GenericVarDeclarationList(); vec.addElement(((GenericTypeVar)yyVals[0+yyTop])); @@ -1664,14 +1583,14 @@ case 113: } break; case 114: - // line 1091 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1011 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((GenericVarDeclarationList)yyVals[-2+yyTop]).addElement(((GenericTypeVar)yyVals[0+yyTop])); yyVal=((GenericVarDeclarationList)yyVals[-2+yyTop]); } break; case 115: - // line 1099 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1019 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-2+yyTop])); @@ -1679,14 +1598,14 @@ case 115: } break; case 116: - // line 1105 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1025 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); yyVal=((Method)yyVals[0+yyTop]); } break; case 117: - // line 1110 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1030 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); @@ -1694,7 +1613,7 @@ case 117: } break; case 118: - // line 1116 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1036 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-2+yyTop])); @@ -1703,7 +1622,7 @@ case 118: } break; case 119: - // line 1123 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1043 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); @@ -1711,7 +1630,7 @@ case 119: } break; case 120: - // line 1129 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1049 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); @@ -1720,7 +1639,7 @@ case 120: } break; case 121: - // line 1136 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1056 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); @@ -1729,7 +1648,7 @@ case 121: } break; case 122: - // line 1143 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1063 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-4+yyTop])); ((Method)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); @@ -1739,7 +1658,7 @@ case 122: } break; case 123: - // line 1151 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1071 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void Voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).setType(Voit); @@ -1747,7 +1666,7 @@ case 123: } break; case 124: - // line 1157 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1077 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); @@ -1756,7 +1675,7 @@ case 124: } break; case 125: - // line 1164 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1084 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voyt = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).setType(voyt); @@ -1765,7 +1684,7 @@ case 125: } break; case 126: - // line 1171 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1091 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voyd = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); @@ -1775,7 +1694,7 @@ case 126: } break; case 127: - // line 1179 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1099 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void Voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).setType(Voit); @@ -1784,7 +1703,7 @@ case 127: } break; case 128: - // line 1186 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1106 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voit = new Void(((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); @@ -1794,7 +1713,7 @@ case 128: } break; case 129: - // line 1194 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1114 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voyt = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).setType(voyt); @@ -1804,7 +1723,7 @@ case 129: } break; case 130: - // line 1202 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1122 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voyd = new Void(((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-4+yyTop])); @@ -1815,14 +1734,14 @@ case 130: } break; case 131: - // line 1212 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1132 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $1.setType(TypePlaceholder.fresh()); */ yyVal=((Method)yyVals[0+yyTop]); } break; case 132: - // line 1217 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1137 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $4.setType(TypePlaceholder.fresh());*/ ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-1+yyTop])); @@ -1830,7 +1749,7 @@ case 132: } break; case 133: - // line 1224 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1144 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-1+yyTop])); /*auskommentiert von Andreas Stadelmeier (a10023) $2.setType(TypePlaceholder.fresh());*/ @@ -1838,7 +1757,7 @@ case 133: } break; case 134: - // line 1230 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1150 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $1.setType(TypePlaceholder.fresh());*/ ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); @@ -1846,7 +1765,7 @@ case 134: } break; case 135: - // line 1236 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1156 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); /*auskommentiert von Andreas Stadelmeier (a10023) $2.setType(TypePlaceholder.fresh());*/ @@ -1855,31 +1774,31 @@ case 135: } break; case 136: - // line 1245 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1165 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; case 137: - // line 1249 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1169 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((BaseType)yyVals[-2+yyTop]).setArray(true); } break; case 138: - // line 1253 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1173 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((RefType)yyVals[0+yyTop]); } break; case 139: - // line 1257 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1177 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((RefType)yyVals[-2+yyTop]).setArray(true); } break; case 140: - // line 1261 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1181 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FieldDeclaration IVD = new FieldDeclaration(((DeclId)yyVals[0+yyTop]).getOffset()); IVD.getDeclIdVector().addElement( ((DeclId)yyVals[0+yyTop]) ); @@ -1888,20 +1807,20 @@ case 140: } break; case 141: - // line 1268 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1188 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((FieldDeclaration)yyVals[-2+yyTop]).getDeclIdVector().addElement(((DeclId)yyVals[0+yyTop])); yyVal=((FieldDeclaration)yyVals[-2+yyTop]); } break; case 142: - // line 1274 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1194 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; case 143: - // line 1279 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1199 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block Blstat = new Block(); Blstat.set_Statement(((Statement)yyVals[0+yyTop])); @@ -1909,14 +1828,14 @@ case 143: } break; case 144: - // line 1286 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1206 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Block)yyVals[-1+yyTop]).set_Statement(((Statement)yyVals[0+yyTop])); yyVal=((Block)yyVals[-1+yyTop]); } break; case 145: - // line 1292 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1212 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParameterList PL = new ParameterList(); PL.set_AddParameter(((FormalParameter)yyVals[0+yyTop])); @@ -1924,21 +1843,21 @@ case 145: } break; case 146: - // line 1298 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1218 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ParameterList)yyVals[-2+yyTop]).set_AddParameter(((FormalParameter)yyVals[0+yyTop])); yyVal = ((ParameterList)yyVals[-2+yyTop]); } break; case 147: - // line 1304 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1224 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { This THCON = new This(((Token)yyVals[-3+yyTop]).getOffset(),((Token)yyVals[-3+yyTop]).getLexem().length()); yyVal=THCON; } break; case 148: - // line 1309 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1229 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { This THCONargl = new This(((Token)yyVals[-4+yyTop]).getOffset(),((Token)yyVals[-4+yyTop]).getLexem().length()); THCONargl.set_ArgumentList(((ArgumentList)yyVals[-2+yyTop])); @@ -1946,7 +1865,7 @@ case 148: } break; case 149: - // line 1318 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1238 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { RefType RT = new RefType(-1); RT.set_UsedId(((UsedId)yyVals[0+yyTop])); @@ -1955,7 +1874,7 @@ case 149: } break; case 150: - // line 1325 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1245 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((RefType)yyVals[-2+yyTop]).set_UsedId(((UsedId)yyVals[0+yyTop])); ((RefType)yyVals[-2+yyTop]).setName(((RefType)yyVals[-2+yyTop]).get_UsedId().get_Name_1Element()); @@ -1963,7 +1882,7 @@ case 150: } break; case 151: - // line 1332 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1252 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Method met = new Method(((Token)yyVals[-2+yyTop]).getOffset()); /* #JB# 10.04.2005 */ @@ -1978,7 +1897,7 @@ case 151: } break; case 152: - // line 1345 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1265 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Method met_para = new Method(((Token)yyVals[-3+yyTop]).getOffset()); /* #JB# 10.04.2005 */ @@ -1994,7 +1913,7 @@ case 152: } break; case 153: - // line 1360 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1280 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { BooleanType BT = new BooleanType(); /* #JB# 05.04.2005 */ @@ -2005,13 +1924,13 @@ case 153: } break; case 154: - // line 1369 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1289 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; case 155: - // line 1374 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1294 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { if (((Vector)yyVals[0+yyTop]) != null) { /*$1.set_ParaList($2.get_ParaList());*/ @@ -2023,7 +1942,7 @@ case 155: RefType RT = new RefType(uid.getOffset()); RT.set_ParaList(uid.get_RealParaList()); - RT.setName(uid.getQualifiedName().toString()); + RT.setName(uid.getQualifiedName()); /*PL 05-07-30 eingefuegt containedTypes ANFANG*/ @@ -2034,7 +1953,7 @@ case 155: } break; case 156: - // line 1396 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1316 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("T->Parser->referenctype: " + ((UsedId)yyVals[0+yyTop])); RefType RT = new RefType(((UsedId)yyVals[0+yyTop]).getOffset()); @@ -2043,7 +1962,7 @@ case 156: /*RT.set_UsedId($1); */ /*RT.setName(RT.get_UsedId().get_Name_1Element());*/ RT.set_ParaList(((UsedId)yyVals[0+yyTop]).get_RealParaList()); - RT.setName(((UsedId)yyVals[0+yyTop]).getQualifiedName().toString()); + RT.setName(((UsedId)yyVals[0+yyTop]).getQualifiedName()); /*PL 05-07-30 eingefuegt containedTypes ANFANG*/ @@ -2054,25 +1973,25 @@ case 156: } break; case 157: - // line 1418 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1338 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((DeclId)yyVals[0+yyTop]); } break; case 158: - // line 1439 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1359 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((LocalVarDecl)yyVals[0+yyTop]); } break; case 159: - // line 1443 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1363 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; case 160: - // line 1448 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1368 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FormalParameter FP = new FormalParameter(((DeclId)yyVals[0+yyTop])); FP.setType(((Type)yyVals[-1+yyTop])); @@ -2081,7 +2000,7 @@ case 160: } break; case 161: - // line 1473 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1393 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + ((DeclId)yyVals[0+yyTop]).name); @@ -2101,7 +2020,7 @@ case 161: } break; case 162: - // line 1492 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1412 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ArgumentList AL = new ArgumentList(); AL.expr.addElement(((Expr)yyVals[0+yyTop])); @@ -2109,20 +2028,20 @@ case 162: } break; case 163: - // line 1498 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1418 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ArgumentList)yyVals[-2+yyTop]).expr.addElement(((Expr)yyVals[0+yyTop])); yyVal=((ArgumentList)yyVals[-2+yyTop]); } break; case 164: - // line 1504 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1424 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; case 165: - // line 1509 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1429 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { DeclId DI = new DeclId(); /* #JB# 10.04.2005 */ @@ -2135,61 +2054,61 @@ case 165: } break; case 166: - // line 1521 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1441 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 167: - // line 1526 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1446 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((LocalVarDecl)yyVals[-1+yyTop]); } break; case 168: - // line 1531 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1451 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; case 169: - // line 1535 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1455 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; case 170: - // line 1539 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1459 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; case 171: - // line 1543 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1463 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((WhileStmt)yyVals[0+yyTop]); } break; case 172: - // line 1547 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1467 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((ForStmt)yyVals[0+yyTop]); } break; case 173: - // line 1552 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1472 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 174: - // line 1556 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1476 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((NewClass)yyVals[0+yyTop]); } break; case 175: - // line 1561 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1481 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { IntegerType IT = new IntegerType(); /* #JB# 05.04.2005 */ @@ -2200,7 +2119,7 @@ case 175: } break; case 176: - // line 1570 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1490 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { CharacterType CT = new CharacterType(); /* #JB# 05.04.2005 */ @@ -2211,7 +2130,7 @@ case 176: } break; case 177: - // line 1580 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1500 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); LocalVarDecl LVD = new LocalVarDecl(((Type)yyVals[-1+yyTop]).getOffset(),((Type)yyVals[-1+yyTop]).getVariableLength()); @@ -2221,7 +2140,7 @@ case 177: } break; case 178: - // line 1591 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1511 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!"); LocalVarDecl LVD = new LocalVarDecl(((FieldDeclaration)yyVals[0+yyTop]).getOffset(),((FieldDeclaration)yyVals[0+yyTop]).getVariableLength()); @@ -2231,31 +2150,31 @@ case 178: } break; case 179: - // line 1601 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1521 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; case 180: - // line 1605 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1525 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((EmptyStmt)yyVals[0+yyTop]); } break; case 181: - // line 1609 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1529 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((ExprStmt)yyVals[0+yyTop]); } break; case 182: - // line 1613 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1533 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Return)yyVals[0+yyTop]); } break; case 183: - // line 1618 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1538 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { IfStmt Ifst = new IfStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Ifst.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2264,7 +2183,7 @@ case 183: } break; case 184: - // line 1626 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1546 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { IfStmt IfstElst = new IfStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); IfstElst.set_Expr(((Expr)yyVals[-4+yyTop])); @@ -2274,7 +2193,7 @@ case 184: } break; case 185: - // line 1635 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1555 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { WhileStmt Whlst = new WhileStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Whlst.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2283,7 +2202,7 @@ case 185: } break; case 186: - // line 1646 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1566 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-6+yyTop]).getOffset(),((Expr)yyVals[-6+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-6+yyTop])); @@ -2296,7 +2215,7 @@ case 186: } break; case 187: - // line 1658 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1578 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-5+yyTop])); @@ -2308,7 +2227,7 @@ case 187: } break; case 188: - // line 1669 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1589 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-5+yyTop])); @@ -2320,7 +2239,7 @@ case 188: } break; case 189: - // line 1680 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1600 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); Fst.set_head_Condition(((Expr)yyVals[-4+yyTop])); @@ -2332,7 +2251,7 @@ case 189: } break; case 190: - // line 1691 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1611 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-4+yyTop])); @@ -2343,7 +2262,7 @@ case 190: } break; case 191: - // line 1701 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1621 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-3+yyTop]).getOffset(),((Expr)yyVals[-3+yyTop]).getVariableLength()); Fst.set_head_Condition(((Expr)yyVals[-3+yyTop])); @@ -2354,7 +2273,7 @@ case 191: } break; case 192: - // line 1711 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1631 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Fst.set_head_Loop_expr(((Expr)yyVals[-2+yyTop])); @@ -2365,7 +2284,7 @@ case 192: } break; case 193: - // line 1721 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1641 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Statement)yyVals[0+yyTop]).getOffset(),((Statement)yyVals[0+yyTop]).getVariableLength()); Fst.set_body_Loop_block(((Statement)yyVals[0+yyTop])); @@ -2375,40 +2294,40 @@ case 193: } break; case 194: - // line 1730 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1650 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("conditionalexpression"); yyVal=((Expr)yyVals[0+yyTop]); } break; case 195: - // line 1735 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1655 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Assign)yyVals[0+yyTop]); } break; case 196: - // line 1741 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1661 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { EmptyStmt Empst = new EmptyStmt(); yyVal=Empst; } break; case 197: - // line 1747 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1667 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[-1+yyTop]); } break; case 198: - // line 1752 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1672 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Return ret = new Return(-1,-1); yyVal= ret; } break; case 199: - // line 1757 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1677 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Return retexp = new Return(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); retexp.set_ReturnExpr(((Expr)yyVals[-1+yyTop])); @@ -2416,31 +2335,31 @@ case 199: } break; case 200: - // line 1764 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1684 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; case 201: - // line 1768 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1688 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; case 202: - // line 1772 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1692 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((WhileStmt)yyVals[0+yyTop]); } break; case 203: - // line 1777 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1697 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 204: - // line 1783 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1703 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n"); Assign Ass = new Assign(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2467,7 +2386,7 @@ case 204: } break; case 205: - // line 1808 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1728 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Assign Ass =new Assign(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); LocalOrFieldVar LOFV = new LocalOrFieldVar(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2491,43 +2410,43 @@ case 205: } break; case 206: - // line 1831 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1751 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Assign)yyVals[0+yyTop]); } break; case 207: - // line 1835 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1755 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 208: - // line 1839 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1759 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 209: - // line 1843 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1763 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 210: - // line 1847 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1767 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 211: - // line 1851 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1771 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((MethodCall)yyVals[0+yyTop]); } break; case 212: - // line 1862 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1782 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { IfStmt IfElno = new IfStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); IfElno.set_Expr(((Expr)yyVals[-4+yyTop])); @@ -2537,7 +2456,7 @@ case 212: } break; case 213: - // line 1871 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1791 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { WhileStmt Whstno = new WhileStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Whstno.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2546,13 +2465,13 @@ case 213: } break; case 214: - // line 1879 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1799 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 215: - // line 1883 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1803 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary LogOr = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); OrOp OrO = new OrOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2564,19 +2483,19 @@ case 215: } break; case 216: - // line 1896 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1816 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=null; } break; case 217: - // line 1901 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1821 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; case 218: - // line 1905 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1825 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*Lambdabody kann auch nur aus einer Expression bestehen. In diesem Fall wird ein Block erstellt, welcher als einziges Statement ein return statment mit der expression hat.*/ /*Bsp.: Aus der Expression |var=="hallo"| wird: |{return var=="hallo";}|*/ @@ -2587,19 +2506,19 @@ case 218: } break; case 219: - // line 1915 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1835 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=null; } break; case 220: - // line 1919 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1839 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((ParameterList)yyVals[-1+yyTop]); } break; case 221: - // line 1924 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1844 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { LambdaExpression lambda = new LambdaExpression(/*((ParameSterList)$2).getOffset(),((ParameterList)$2).getVariableLength()*/0,0); if(((ParameterList)yyVals[-2+yyTop])!=null)lambda.setParameterList(((ParameterList)yyVals[-2+yyTop])); @@ -2608,54 +2527,54 @@ case 221: } break; case 222: - // line 1943 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1863 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((UsedId)yyVals[0+yyTop]); } break; case 223: - // line 1948 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1868 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=null; } break; case 224: - // line 1952 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1872 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { TimesOp TEO = new TimesOp(-1,-1); yyVal=TEO; } break; case 225: - // line 1957 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1877 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { DivideOp DEO = new DivideOp(-1,-1); yyVal=DEO; } break; case 226: - // line 1962 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1882 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ModuloOp MEO = new ModuloOp(-1,-1); yyVal=MEO; } break; case 227: - // line 1967 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1887 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PlusOp PEO = new PlusOp(-1,-1); yyVal=PEO; } break; case 228: - // line 1972 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1892 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { MinusOp MEO = new MinusOp(-1,-1); yyVal=MEO; } break; case 229: - // line 1984 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1904 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PreIncExpr PRINC = new PreIncExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); PRINC.set_Expr(((Expr)yyVals[0+yyTop])); @@ -2663,7 +2582,7 @@ case 229: } break; case 230: - // line 1991 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1911 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PreDecExpr PRDEC = new PreDecExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); PRDEC.set_Expr(((Expr)yyVals[0+yyTop])); @@ -2671,7 +2590,7 @@ case 230: } break; case 231: - // line 1998 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1918 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PostIncExpr PIE = new PostIncExpr(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); PIE.set_Expr(((Expr)yyVals[-1+yyTop])); @@ -2679,7 +2598,7 @@ case 231: } break; case 232: - // line 2005 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1925 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PostDecExpr PDE = new PostDecExpr(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); PDE.set_Expr(((Expr)yyVals[-1+yyTop])); @@ -2687,7 +2606,7 @@ case 232: } break; case 233: - // line 2013 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1933 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M1"); MethodCall MC = new MethodCall(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2719,7 +2638,7 @@ case 233: } break; case 234: - // line 2043 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1963 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M2"); MethodCall MCarg = new MethodCall(((UsedId)yyVals[-3+yyTop]).getOffset(),((UsedId)yyVals[-3+yyTop]).getVariableLength()); @@ -2752,7 +2671,7 @@ case 234: } break; case 235: - // line 2074 "./../src/mycompiler/myparser/JavaParser.jay" + // line 1994 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M3"); MethodCall MCpr = new MethodCall(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); @@ -2773,7 +2692,7 @@ case 235: } break; case 236: - // line 2093 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2013 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { org.apache.log4j.Logger.getLogger("parser").debug("M4"); MethodCall MCPA = new MethodCall(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); @@ -2795,7 +2714,7 @@ case 236: } break; case 237: - // line 2116 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2036 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { NewClass NC = new NewClass(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); NC.set_UsedId(((UsedId)yyVals[-2+yyTop])); @@ -2805,7 +2724,7 @@ case 237: } break; case 238: - // line 2124 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2044 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { NewClass NCarg = new NewClass(((UsedId)yyVals[-3+yyTop]).getOffset(),((UsedId)yyVals[-3+yyTop]).getVariableLength()); NCarg.set_UsedId(((UsedId)yyVals[-3+yyTop])); @@ -2816,13 +2735,13 @@ case 238: } break; case 239: - // line 2134 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2054 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 240: - // line 2138 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2058 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary And = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); AndOp AndO = new AndOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2834,19 +2753,19 @@ case 240: } break; case 241: - // line 2154 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2074 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 242: - // line 2158 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2078 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 243: - // line 2162 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2082 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PositivExpr POSEX=new PositivExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryPlus UP= new UnaryPlus(); @@ -2856,7 +2775,7 @@ case 243: } break; case 244: - // line 2170 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2090 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { NegativeExpr NEGEX=new NegativeExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryMinus UM=new UnaryMinus(); @@ -2866,19 +2785,19 @@ case 244: } break; case 245: - // line 2178 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2098 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 246: - // line 2183 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2103 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 247: - // line 2187 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2107 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { if (((UsedId)yyVals[0+yyTop]).get_Name().size() > 1) { @@ -2898,37 +2817,37 @@ case 247: } break; case 248: - // line 2205 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2125 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 249: - // line 2209 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2129 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 250: - // line 2214 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2134 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 251: - // line 2219 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2139 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 253: - // line 2225 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2145 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Literal)yyVals[0+yyTop]); } break; case 254: - // line 2229 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2149 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { This T = new This(((Token)yyVals[0+yyTop]).getOffset(),((Token)yyVals[0+yyTop]).getLexem().length()); UsedId UT = new UsedId(((Token)yyVals[0+yyTop]).getOffset()); @@ -2938,23 +2857,23 @@ case 254: } break; case 255: - // line 2250 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2170 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((MethodCall)yyVals[0+yyTop]); } break; case 256: - // line 2254 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2174 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 257: - // line 2259 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2179 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {yyVal=((Expr)yyVals[0+yyTop]);} break; case 258: - // line 2261 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2181 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {NotExpr NE=new NotExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryNot UN=new UnaryNot(); NE.set_UnaryNot(UN); @@ -2963,36 +2882,36 @@ case 258: } break; case 259: - // line 2267 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2187 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {yyVal=((CastExpr)yyVals[0+yyTop]);} break; case 260: - // line 2269 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2189 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {yyVal=((Expr)yyVals[0+yyTop]);} break; case 262: - // line 2274 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2194 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {IntLiteral IL = new IntLiteral(); IL.set_Int(((Token)yyVals[0+yyTop]).String2Int()); yyVal = IL; } break; case 263: - // line 2279 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2199 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {BoolLiteral BL = new BoolLiteral(); BL.set_Bool(((Token)yyVals[0+yyTop]).String2Bool()); yyVal = BL; } break; case 264: - // line 2283 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2203 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {CharLiteral CL = new CharLiteral(); CL.set_Char(((Token)yyVals[0+yyTop]).CharInString()); yyVal=CL; } break; case 265: - // line 2288 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2208 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { StringLiteral ST = new StringLiteral(); ST.set_String(((Token)yyVals[0+yyTop]).get_String()); @@ -3000,14 +2919,14 @@ case 265: } break; case 266: - // line 2293 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2213 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { LongLiteral LL = new LongLiteral(); LL.set_Long(((Token)yyVals[0+yyTop]).String2Long()); yyVal = LL; } break; case 267: - // line 2297 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2217 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FloatLiteral FL = new FloatLiteral(); FL.set_Float(((Token)yyVals[0+yyTop]).String2Float()); @@ -3015,7 +2934,7 @@ case 267: } break; case 268: - // line 2302 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2222 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { DoubleLiteral DL = new DoubleLiteral(); DL.set_Double(((Token)yyVals[0+yyTop]).String2Double()); @@ -3023,14 +2942,14 @@ case 268: } break; case 269: - // line 2308 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2228 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Null NN = new Null(); yyVal=NN; } break; case 270: - // line 2314 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2234 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { CastExpr CaEx=new CastExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); CaEx.set_Type(((BaseType)yyVals[-2+yyTop])); @@ -3039,24 +2958,24 @@ case 270: } break; case 271: - // line 2323 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2243 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 272: - // line 2327 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2247 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { } break; case 273: - // line 2331 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2251 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 274: - // line 2335 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2255 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary EQ = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); EqualOp EO = new EqualOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3068,7 +2987,7 @@ case 274: } break; case 275: - // line 2345 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2265 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary NEQ = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); NotEqualOp NEO = new NotEqualOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3080,13 +2999,13 @@ case 275: } break; case 276: - // line 2356 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2276 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 277: - // line 2360 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2280 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary LO = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); LessOp LOO = new LessOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3098,7 +3017,7 @@ case 277: } break; case 278: - // line 2370 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2290 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary GO = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); GreaterOp GOO = new GreaterOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3110,7 +3029,7 @@ case 278: } break; case 279: - // line 2380 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2300 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary LE = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); LessEquOp LEO = new LessEquOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3122,7 +3041,7 @@ case 279: } break; case 280: - // line 2390 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2310 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary GE = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); GreaterEquOp GEO = new GreaterEquOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3134,7 +3053,7 @@ case 280: } break; case 281: - // line 2400 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2320 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { InstanceOf ISO=new InstanceOf(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); ISO.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -3143,19 +3062,19 @@ case 281: } break; case 282: - // line 2408 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2328 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 283: - // line 2413 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2333 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 284: - // line 2417 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2337 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary AD = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); PlusOp PO = new PlusOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3167,7 +3086,7 @@ case 284: } break; case 285: - // line 2427 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2347 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary MI = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); MinusOp MO = new MinusOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3179,13 +3098,13 @@ case 285: } break; case 286: - // line 2438 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2358 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 287: - // line 2442 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2362 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary ML = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); TimesOp TO = new TimesOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3197,7 +3116,7 @@ case 287: } break; case 288: - // line 2452 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2372 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary DV = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); DivideOp DO = new DivideOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3209,7 +3128,7 @@ case 288: } break; case 289: - // line 2462 "./../src/mycompiler/myparser/JavaParser.jay" + // line 2382 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary MD = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); ModuloOp MO = new ModuloOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3220,7 +3139,7 @@ case 289: yyVal =MD; } break; - // line 3223 "-" + // line 3143 "-" } yyTop -= yyLen[yyN]; yyState = yyStates[yyTop]; diff --git a/src/de/dhbwstuttgart/parser/JavaParser.jay b/src/de/dhbwstuttgart/parser/JavaParser.jay index 703c7505..f4490d4f 100755 --- a/src/de/dhbwstuttgart/parser/JavaParser.jay +++ b/src/de/dhbwstuttgart/parser/JavaParser.jay @@ -4,105 +4,25 @@ Backup von JavaParser.jay 10.April 17 Uhr */ -package mycompiler.myparser; +package de.dhbwstuttgart.parser; -import mycompiler.myclass.FieldDeclaration; -import mycompiler.myclass.GenericDeclarationList; -import mycompiler.myclass.Field; +import de.dhbwstuttgart.core.AClassOrInterface; +import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.ImportDeclarations; +import de.dhbwstuttgart.syntaxtree.Interface; +import de.dhbwstuttgart.syntaxtree.SourceFile; +import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.typeinference.Pair; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.*; +import de.dhbwstuttgart.syntaxtree.*; +import de.dhbwstuttgart.syntaxtree.misc.*; +import de.dhbwstuttgart.syntaxtree.modifier.*; +import de.dhbwstuttgart.syntaxtree.operator.*; +import de.dhbwstuttgart.syntaxtree.type.*; +import de.dhbwstuttgart.syntaxtree.statement.*; import java.util.Vector; -import mycompiler.SourceFile; -import mycompiler.AClassOrInterface; -import mycompiler.myclass.Class; -import mycompiler.myclass.ClassBody; -import mycompiler.myclass.Constructor; -import mycompiler.myclass.Constant; -import mycompiler.myclass.ImportDeclarations; -import mycompiler.myclass.DeclId; -import mycompiler.myclass.ExceptionList; -import mycompiler.myclass.FormalParameter; -import mycompiler.myclass.Method; -import mycompiler.myclass.ParameterList; -import mycompiler.myclass.UsedId; -import mycompiler.myinterface.Interface; -import mycompiler.myinterface.InterfaceBody; -import mycompiler.mymodifier.Abstract; -import mycompiler.mymodifier.Final; -import mycompiler.mymodifier.Modifier; -import mycompiler.mymodifier.Modifiers; -import mycompiler.mymodifier.Private; -import mycompiler.mymodifier.Protected; -import mycompiler.mymodifier.Public; -import mycompiler.mymodifier.Static; -import mycompiler.myoperator.AndOp; -import mycompiler.myoperator.DivideOp; -import mycompiler.myoperator.EqualOp; -import mycompiler.myoperator.GreaterEquOp; -import mycompiler.myoperator.GreaterOp; -import mycompiler.myoperator.LessEquOp; -import mycompiler.myoperator.LessOp; -import mycompiler.myoperator.MinusOp; -import mycompiler.myoperator.ModuloOp; -import mycompiler.myoperator.NotEqualOp; -import mycompiler.myoperator.Operator; -import mycompiler.myoperator.OrOp; -import mycompiler.myoperator.PlusOp; -import mycompiler.myoperator.TimesOp; -import mycompiler.mystatement.ArgumentList; -import mycompiler.mystatement.Assign; -import mycompiler.mystatement.Binary; -import mycompiler.mystatement.Block; -import mycompiler.mystatement.BoolLiteral; -import mycompiler.mystatement.FloatLiteral; -import mycompiler.mystatement.DoubleLiteral; -import mycompiler.mystatement.LongLiteral; -import mycompiler.mystatement.CastExpr; -import mycompiler.mystatement.CharLiteral; -import mycompiler.mystatement.EmptyStmt; -import mycompiler.mystatement.Expr; -import mycompiler.mystatement.ExprStmt; -import mycompiler.mystatement.IfStmt; -import mycompiler.mystatement.InstanceOf; -import mycompiler.mystatement.IntLiteral; -import mycompiler.mystatement.Literal; -import mycompiler.mystatement.InstVar; -import mycompiler.mystatement.LocalOrFieldVar; -import mycompiler.mystatement.LocalVarDecl; -import mycompiler.mystatement.MethodCall; -import mycompiler.mystatement.NegativeExpr; -import mycompiler.mystatement.NewClass; -import mycompiler.mystatement.NotExpr; -import mycompiler.mystatement.Null; -import mycompiler.mystatement.PositivExpr; -import mycompiler.mystatement.PostDecExpr; -import mycompiler.mystatement.PostIncExpr; -import mycompiler.mystatement.PreDecExpr; -import mycompiler.mystatement.PreIncExpr; -import mycompiler.mystatement.Receiver; -import mycompiler.mystatement.Return; -import mycompiler.mystatement.Statement; -import mycompiler.mystatement.StringLiteral; -import mycompiler.mystatement.This; -import mycompiler.mystatement.UnaryMinus; -import mycompiler.mystatement.UnaryNot; -import mycompiler.mystatement.UnaryPlus; -import mycompiler.mystatement.WhileStmt; -import mycompiler.mystatement.ForStmt; -import mycompiler.mystatement.LambdaExpression; -import mycompiler.mytype.BaseType; -import mycompiler.mytype.BooleanType; -import mycompiler.mytype.CharacterType; -import mycompiler.mytype.GenericTypeVar; -import mycompiler.mytype.BoundedGenericTypeVar; -import mycompiler.mytype.IntegerType; -import mycompiler.mytype.ParaList; -import mycompiler.mytype.RefType; -import mycompiler.mytype.Type; -import mycompiler.mytype.TypePlaceholder; -import mycompiler.mytype.Void; -import mycompiler.mytype.WildcardType; -import mycompiler.mytype.ExtendsWildcardType; -import mycompiler.mytype.SuperWildcardType; -import mycompiler.mytype.Pair; public class JavaParser{ public Vector path = new Vector(); diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 9a7b8ffc..d8a66302 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -20,7 +20,6 @@ import de.dhbwstuttgart.syntaxtree.statement.Block; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Statement; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; import de.dhbwstuttgart.syntaxtree.type.Type; diff --git a/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java index 087689c9..4f2e5a4d 100644 --- a/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java +++ b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java @@ -10,6 +10,7 @@ import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.OderConstraint; @@ -136,7 +137,7 @@ public class FieldDeclaration extends Field{ */ //TypeCheck, falls es sich um einen RefType handelt: - this.getType().checkType(localAssumptions, this); + ConstraintType thisType = this.getType().TYPE(localAssumptions, this); /* if(this.getType()!=null && (this.getType() instanceof RefType)){ Type replaceType = null; @@ -146,13 +147,13 @@ public class FieldDeclaration extends Field{ } */ - SingleConstraint c1 = new SingleConstraint(this.getType(), this.getType()); + SingleConstraint c1 = new SingleConstraint(thisType, thisType); ret.add(c1); //Damit die TypVariable des Felds in den Constraints auftaucht if(this.wert!=null){ //Falls bei der Deklaration ein Wert zugewiesen wird, verhält sich das Constraintserzeugen wie bei dem Assign-Statement: ret.add(this.wert.TYPEExpr(localAssumptions)); - ret.add(new SingleConstraint(this.wert.getType(), this.getType())); + ret.add(new SingleConstraint(this.wert.getType().TYPE(localAssumptions,this), thisType)); } return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/Method.java b/src/de/dhbwstuttgart/syntaxtree/Method.java index a1044daf..777b8be4 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Method.java +++ b/src/de/dhbwstuttgart/syntaxtree/Method.java @@ -527,7 +527,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable } //TypeCheck, falls es sich um einen RefType handelt: - this.returntype = this.returntype.checkType(localAss, this); + this.returntype = this.returntype.TYPE(localAss, this).getType(); /* if(this.returntype!=null && (this.returntype instanceof RefType)&& !(this.returntype instanceof mycompiler.mytype.Void)){//Sonderfall der Methode: Ihr Typ darf Void definiert werden. @@ -540,7 +540,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable //Die Parameter zu den Assumptions hinzufügen: if(this.parameterlist!=null)for(FormalParameter param : this.parameterlist){ - param.setType(param.getType().checkType(localAss, this)); + param.setType(param.getType().TYPE(localAss, this).getType()); /* if(param.getType() instanceof RefType) { @@ -556,7 +556,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable } ret.add(this.block.TYPEStmt(localAss)); //eine Verknüpfung mit der Type Assumption aus dem Assumption Set und dem ermittelten Typ der Methode: - ret.add(new SingleConstraint(this.block.getType(), this.returntype)); + ret.add(new SingleConstraint(this.block.getType().TYPE(localAss, this), this.returntype.TYPE(localAss, this))); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index c2fb4b18..69ede18c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -26,7 +26,6 @@ import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.modifier.Public; import de.dhbwstuttgart.syntaxtree.type.BooleanType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; @@ -35,6 +34,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.FunN; import de.dhbwstuttgart.typeinference.FunNInterface; import de.dhbwstuttgart.typeinference.FunNMethod; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.UndConstraint; @@ -1631,5 +1631,21 @@ public class SourceFile //this.filename = filename; } + + + @Override + public int getOffset() { + // TODO Auto-generated method stub + return 0; + } + + + + @Override + public int getVariableLength() { + // TODO Auto-generated method stub + return 0; + } + } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java b/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java index 15c8a373..7e621eeb 100644 --- a/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java +++ b/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java @@ -2,10 +2,11 @@ package de.dhbwstuttgart.syntaxtree; import java.util.Vector; +import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.exceptions.DebugException; @@ -14,7 +15,7 @@ import de.dhbwstuttgart.typeinference.typedeployment.GenericTypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; -public abstract class SyntaxTreeNode{ +public abstract class SyntaxTreeNode implements IItemWithOffset{ protected SyntaxTreeNode parent; diff --git a/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java index 78b68fb4..4670605d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java +++ b/src/de/dhbwstuttgart/syntaxtree/misc/UsedId.java @@ -312,7 +312,7 @@ public class UsedId implements IItemWithOffset // ino.end public JavaCodeResult printJavaCode(ResultSet resultSet) { - if(this.name.size()>1)throw new TypeinferenceException("Es kann maximal nur eine Superklasse pro Klasse geben", this); + if(this.name.size()>1)throw new TypeinferenceException("Es kann maximal nur eine Superklasse pro Klasse geben", null); JavaCodeResult ret = new JavaCodeResult(this.getQualifiedName().toString()); if(this.paralist != null){ ret.attach( "<" ); diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java index 5dae26d7..2769dd90 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/AddOp.java @@ -14,10 +14,11 @@ import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.type.IntegerType; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; @@ -59,8 +60,8 @@ public abstract class AddOp extends Operator } @Override - public HashMap getReturnTypes(TypeAssumptions ass) { - HashMap ret = new HashMap(); + public HashMap getReturnTypes(TypeAssumptions ass) { + HashMap ret = new HashMap(); ret.put(ass.getTypeFor(new RefType("java.lang.Integer",-1), this), ass.getTypeFor(new RefType("java.lang.Integer",-1),this)); ret.put(ass.getTypeFor(new RefType("java.lang.Double",-1), this), ass.getTypeFor(new RefType("java.lang.Double",-1),this)); ret.put(ass.getTypeFor(new RefType("java.lang.Float",-1), this), ass.getTypeFor(new RefType("java.lang.Float",-1),this)); diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/AndOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/AndOp.java index 85081d7a..9afe711c 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/AndOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/AndOp.java @@ -1,6 +1,9 @@ // ino.module.AndOp.8595.package package de.dhbwstuttgart.syntaxtree.operator; +import java.util.Vector; + +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.type.BooleanType; import de.dhbwstuttgart.syntaxtree.type.IntegerType; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java index c09b2b6b..e5ebac5e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/DivideOp.java @@ -8,6 +8,7 @@ import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; @@ -41,7 +42,7 @@ public class DivideOp extends MulOp code.add_code(JVMCode.ndiv(expr1.getTypeName())); } // ino.end - + } diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java index c8f58be3..99198400 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/EqualOp.java @@ -10,11 +10,12 @@ import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Null; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -75,6 +76,8 @@ public class EqualOp extends RelOp else code.add_code(JVMCode.if_ncmpeq(type)); } // ino.end + + } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java index 2027d865..1577b463 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/GreaterEquOp.java @@ -8,6 +8,7 @@ import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java index 33472b5b..511cc9b7 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/LogOp.java @@ -18,10 +18,11 @@ import de.dhbwstuttgart.syntaxtree.statement.NotExpr; import de.dhbwstuttgart.syntaxtree.statement.Null; import de.dhbwstuttgart.syntaxtree.statement.Statement; import de.dhbwstuttgart.syntaxtree.type.BooleanType; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.ConstraintsSet; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; @@ -229,8 +230,8 @@ public abstract class LogOp extends Operator } @Override - public HashMap getReturnTypes(TypeAssumptions ass) { - HashMap ret = new HashMap(); + public HashMap getReturnTypes(TypeAssumptions ass) { + HashMap ret = new HashMap<>(); ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Boolean",-1), this)); return ret; diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java index 47c8d887..f28819ad 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/MulOp.java @@ -10,9 +10,10 @@ import java.util.Vector; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.syntaxtree.statement.Binary; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintType; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -40,8 +41,8 @@ public abstract class MulOp extends Operator } @Override - public HashMap getReturnTypes(TypeAssumptions ass) { - HashMap ret = new HashMap(); + public HashMap getReturnTypes(TypeAssumptions ass) { + HashMap ret = new HashMap<>(); ret.put(ass.getTypeFor(new RefType("java.lang.Integer",-1), this), ass.getTypeFor(new RefType("java.lang.Integer",-1), this)); ret.put(ass.getTypeFor(new RefType("java.lang.Double",-1), this), ass.getTypeFor(new RefType("java.lang.Double",-1), this)); ret.put(ass.getTypeFor(new RefType("java.lang.Float",-1), this), ass.getTypeFor(new RefType("java.lang.Float",-1), this)); diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java index 91b22924..c95f341a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/NotEqualOp.java @@ -13,8 +13,8 @@ import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.Null; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.unify.Unify; // ino.class.NotEqualOp.24241.declaration diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java index 29304f01..5f8aef61 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/Operator.java @@ -13,14 +13,16 @@ import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.statement.Binary; import de.dhbwstuttgart.syntaxtree.statement.Expr; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.UndConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; @@ -30,7 +32,7 @@ import de.dhbwstuttgart.typeinference.unify.Unify; // ino.class.Operator.24257.declaration -public abstract class Operator implements IItemWithOffset +public abstract class Operator extends SyntaxTreeNode // ino.end // ino.class.Operator.24257.body { @@ -120,7 +122,12 @@ public abstract class Operator implements IItemWithOffset * @param ass * @return */ - public abstract HashMap getReturnTypes(TypeAssumptions ass); + public abstract HashMap getReturnTypes(TypeAssumptions ass); + + @Override + public Vector getChildren() { + return new Vector<>(); + } } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java index ec22a5e2..0c75a359 100755 --- a/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java +++ b/src/de/dhbwstuttgart/syntaxtree/operator/RelOp.java @@ -13,9 +13,10 @@ import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.syntaxtree.statement.Binary; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.ConstraintType; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.unify.Unify; @@ -51,8 +52,8 @@ public abstract class RelOp extends Operator } @Override - public HashMap getReturnTypes(TypeAssumptions ass) { - HashMap ret = new HashMap(); + public HashMap getReturnTypes(TypeAssumptions ass) { + HashMap ret = new HashMap<>(); ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Integer",-1), this)); ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Double",-1), this)); ret.put(ass.getTypeFor(new RefType("java.lang.Boolean",-1), this), ass.getTypeFor(new RefType("java.lang.Float",-1), this)); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java index 941734b3..e10cded5 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java @@ -20,13 +20,13 @@ import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Void; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; @@ -189,8 +189,8 @@ public class Assign extends Expr ret.add(expr2.TYPEExpr(assumptions)); //this.setTypeVariable( TypePlaceholder.fresh(this)); this.setType(TypePlaceholder.fresh(this)); - ret.add(new SingleConstraint(expr2.getType(), expr1.getType())); //expr2.type <. expr1.type - ret.add(new SingleConstraint(expr1.getType(), this.getType())); + ret.add(new SingleConstraint(expr2.getType().TYPE(assumptions, this), expr1.getType().TYPE(assumptions, this))); //expr2.type <. expr1.type + ret.add(new SingleConstraint(expr1.getType().TYPE(assumptions, this), this.getType().TYPE(assumptions, this))); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java index 53f8886d..3e4785ef 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Binary.java @@ -7,8 +7,8 @@ import java.util.HashMap; import java.util.Hashtable; import java.util.Vector; - import org.apache.log4j.Logger; + import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -24,13 +24,14 @@ import de.dhbwstuttgart.syntaxtree.operator.MulOp; import de.dhbwstuttgart.syntaxtree.operator.Operator; import de.dhbwstuttgart.syntaxtree.operator.RelOp; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.UndConstraint; @@ -259,12 +260,12 @@ public class Binary extends BinaryExpr */ if(this.getType()==null)this.set_Type(TypePlaceholder.fresh(this)); OderConstraint oderCons = new OderConstraint(); - HashMap rMap = this.op.getReturnTypes(assumptions); - for(Type rT : rMap.keySet()){ + HashMap rMap = this.op.getReturnTypes(assumptions); + for(ConstraintType rT : rMap.keySet()){ UndConstraint c = new UndConstraint(); - c.addConstraint(this.getType(),rT); - c.addConstraint(this.expr1.getType(), rMap.get(rT)); - c.addConstraint(this.expr2.getType(), rMap.get(rT)); + c.addConstraint(this.getType().TYPE(assumptions, this),rT); + c.addConstraint(this.expr1.getType().TYPE(assumptions, this), rMap.get(rT)); + c.addConstraint(this.expr2.getType().TYPE(assumptions, this), rMap.get(rT)); oderCons.addConstraint(c); } ret.add(oderCons); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java index 0a5796ae..5ae6bba8 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Block.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Block.java @@ -7,8 +7,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; - import org.apache.log4j.Logger; + import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; @@ -21,6 +21,7 @@ import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.Void; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.JavaCodeResult; @@ -192,8 +193,8 @@ public class Block extends Statement } else { TypePlaceholder tph = TypePlaceholder.fresh(this); - ret.add(new SingleConstraint(this.getType(), tph)); - ret.add(new SingleConstraint(stmt.getType(), tph)); + ret.add(new SingleConstraint(this.getType().TYPE(assumptions, this), new ConstraintType(tph))); + ret.add(new SingleConstraint(stmt.getType().TYPE(assumptions, this), new ConstraintType(tph))); this.setType(tph); } } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java index b1b39e80..39c4b6fa 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/BoolLiteral.java @@ -126,12 +126,10 @@ public class BoolLiteral extends Literal @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { - this.type = assumptions.getTypeFor(new RefType("java.lang.Boolean",-1), this); + this.type = assumptions.getTypeFor(new RefType("java.lang.Boolean",-1), this).getType(); return new ConstraintsSet(); } - - @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { if(Bool)return new JavaCodeResult("true"); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java index 903ee739..97fc7406 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/DoubleLiteral.java @@ -164,7 +164,7 @@ public class DoubleLiteral extends Literal @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { - this.setType(assumptions.getTypeFor(new RefType("Double",this.getOffset()), this)); + this.setType(assumptions.getTypeFor(new RefType("Double",this.getOffset()), this).getType()); return new ConstraintsSet(); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java index 370af348..14451efd 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ExprStmt.java @@ -7,10 +7,11 @@ import java.util.Iterator; import java.util.Vector; import org.apache.log4j.Logger; + import de.dhbwstuttgart.core.MyCompiler; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.unify.Unify; // ino.class.ExprStmt.25265.declaration diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java index bd78a1fd..3f02f401 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/ForStmt.java @@ -5,7 +5,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; - import org.apache.log4j.Logger; import de.dhbwstuttgart.bytecode.ClassFile; @@ -21,11 +20,11 @@ import de.dhbwstuttgart.syntaxtree.operator.LogOp; import de.dhbwstuttgart.syntaxtree.operator.Operator; import de.dhbwstuttgart.syntaxtree.operator.RelOp; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java index 0cae62ad..fe0a1436 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IfStmt.java @@ -8,6 +8,7 @@ import java.util.Iterator; import java.util.Vector; import org.apache.log4j.Logger; + import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.JVMCode; @@ -22,7 +23,6 @@ import de.dhbwstuttgart.syntaxtree.operator.Operator; import de.dhbwstuttgart.syntaxtree.operator.RelOp; import de.dhbwstuttgart.syntaxtree.type.BooleanType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; @@ -30,6 +30,7 @@ import de.dhbwstuttgart.syntaxtree.type.Void; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; @@ -256,10 +257,10 @@ public class IfStmt extends Statement ret.add(this.then_block.TYPEStmt(assumptions)); if(else_block!=null){ ret.add(this.else_block.TYPEStmt(assumptions)); - if(!(else_block.getType() instanceof Void))ret.add(new SingleConstraint(else_block.getType(),this.getType())); + if(!(else_block.getType() instanceof Void))ret.add(new SingleConstraint(else_block.getType().TYPE(assumptions, this),this.getType().TYPE(assumptions, this))); } - ret.add(new SingleConstraint(expr.getType(),assumptions.getTypeFor(new RefType("Boolean",0), this))); //(expressionDesIfStmt)<.boolean - if(!(then_block.getType() instanceof Void))ret.add(new SingleConstraint(then_block.getType(),this.getType())); + ret.add(new SingleConstraint(expr.getType().TYPE(assumptions, this),assumptions.getTypeFor(new RefType("Boolean",0), this))); //(expressionDesIfStmt)<.boolean + if(!(then_block.getType() instanceof Void))ret.add(new SingleConstraint(then_block.getType().TYPE(assumptions, this),this.getType().TYPE(assumptions, this))); if(then_block.getType() instanceof Void && (else_block == null || else_block.getType() instanceof Void))this.setType(new Void(this.getOffset())); return ret; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java index f149e94e..c78108ba 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/InstVar.java @@ -6,6 +6,7 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; + import org.apache.log4j.Logger; import de.dhbwstuttgart.bytecode.ClassFile; @@ -17,7 +18,6 @@ import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; @@ -25,6 +25,7 @@ import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.FreshTypeVariable; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.OderConstraint; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.UndConstraint; @@ -211,8 +212,8 @@ public class InstVar extends Expr OderConstraint oderConstraint = new OderConstraint(); for(FieldAssumption fa : assumptions.getFieldVars(this.get_Name())){ UndConstraint undConstraint = new UndConstraint(); - undConstraint.addConstraint(fa.getAssumedType(),this.getType()); - undConstraint.addConstraint(this.expr.getType(),fa.getParentClass().getType()); + undConstraint.addConstraint(fa.getAssumedType().TYPE(assumptions, this),this.getType().TYPE(assumptions, this)); + undConstraint.addConstraint(this.expr.getType().TYPE(assumptions, this),fa.getParentClass().getType().TYPE(assumptions, this)); oderConstraint.addConstraint(undConstraint); } ret.add(oderConstraint); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java index f90970c4..c06c6d67 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/IntLiteral.java @@ -161,7 +161,7 @@ public class IntLiteral extends Literal public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { ConstraintsSet ret = new ConstraintsSet(); //this.setType(new IntegerType()); - this.set_Type(assumptions.getTypeFor(new RefType("java.lang.Integer",-1), this)); + this.set_Type(assumptions.getTypeFor(new RefType("java.lang.Integer",-1), this).getType()); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java index 64891b30..b65fad8e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java @@ -149,7 +149,7 @@ public class LambdaExpression extends Expr{ this.setType(TypePlaceholder.fresh(this)); //ArgumentAssumptions + assumptions ergeben die Assumptions für die Statements innerhalb des Lambda-Bodys: ret.add(method_body.TYPEStmt(ArgumentAssumptions.add(assumptions))); //Es gibt die LambdaExpression nur mit einem Block als Method Body, nicht mit einer einzelnen Expression - ret.add(new SingleConstraint(new FunN(method_body.getType(), paramTypes),this.getType())); + ret.add(new SingleConstraint(new FunN(method_body.getType(), paramTypes).TYPE(assumptions, this),this.getType().TYPE(assumptions, this))); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java index 94681236..048cab24 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java @@ -379,13 +379,11 @@ public class LocalVarDecl extends Statement implements TypeInsertable ConstraintsSet ret = new ConstraintsSet(); if((this.getType() instanceof RefType)){ Type replaceType = null; - replaceType = assumptions.getTypeFor((RefType)this.getType(), this); - if(replaceType == null) - throw new TypeinferenceException("Der Typ "+this.getType().getName()+" ist nicht korrekt",this); + replaceType = assumptions.getTypeFor((RefType)this.getType(), this).getType(); this.setType(replaceType); } assumptions.addAssumption(new LocalVarAssumption(this, this.getType())); //Bevor der Typ auf Void gesetzt wird. - ret.add(new SingleConstraint(this.getType(), this.getType())); + ret.add(new SingleConstraint(this.getType().TYPE(assumptions, this), this.getType().TYPE(assumptions, this))); //assumptions.remove(null); // falls Variable mit diesem Namen bereits vorhanden. this.setReturnType(new Void(0)); //Return typ einer Variablendeklaration ist Void return ret; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java index 6d9aa6f4..c83cfe5a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NegativeExpr.java @@ -6,8 +6,8 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; - import org.apache.log4j.Logger; + import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; @@ -17,12 +17,12 @@ import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.Void; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java index 9e562ef0..4269bc31 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/NewClass.java @@ -219,13 +219,13 @@ public class NewClass extends Expr for(int i=0; i parameterList = new Vector<>(); + Vector parameterList = new Vector<>(); + Vector parameterList2 = new Vector<>(); if(this.parameter!=null)for(Type param : this.parameter){ - parameterList.add(param.checkType(ass, parent)); + ConstraintType ct = param.TYPE(ass, parent); + parameterList.add(ct); + parameterList2.add(ct.getType()); } - this.parameter = parameterList; - Type t = super.checkType(ass,parent); + this.parameter = parameterList2; + ConstraintType t = super.TYPE(ass,parent); return t; } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Type.java b/src/de/dhbwstuttgart/syntaxtree/type/Type.java index 8fab0c18..b4ff5290 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Type.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Type.java @@ -5,11 +5,13 @@ package de.dhbwstuttgart.syntaxtree.type; import java.util.ArrayList; import java.util.Vector; +import sun.reflect.generics.reflectiveObjects.NotImplementedException; import de.dhbwstuttgart.bytecode.JVMCode; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.UsedId; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; @@ -285,9 +287,17 @@ public class Type extends SyntaxTreeNode implements IItemWithOffset * Prüft ob der Typ in den Assumptions ass vorhanden ist. * Dabei kann eine neue Instanz eines Typs entstehen, welche von der Methode zurückgegeben wird. * @param ass - Die Assumptions für den jeweiligen Kontext in dem sich der Typ befindet. - */ - public Type checkType(TypeAssumptions ass, IItemWithOffset parent){ - Type t = ass.getTypeFor(this, this); + + public ConstraintType checkType(TypeAssumptions ass, SyntaxTreeNode parent){ + ConstraintType t = ass.getTypeFor(this, this); + if(t==null) + throw new TypeinferenceException("Der Typ "+this.getName()+" ist nicht korrekt", parent); + return t; + } + */ + //TODO: checkType wird nicht mehr gebraucht. TYPE übernimmt dessen Aufgabe. Es muss nur sichergestellt werden, dass jeder Typ in den Constraints landet, dadurch wird für jeden Typ die Methode TYPE aufgerufen. + public ConstraintType TYPE(TypeAssumptions ass, SyntaxTreeNode parent){ + ConstraintType t = ass.getTypeFor(this, this); if(t==null) throw new TypeinferenceException("Der Typ "+this.getName()+" ist nicht korrekt", parent); return t; diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Void.java b/src/de/dhbwstuttgart/syntaxtree/type/Void.java index 4a07a13a..54d73277 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Void.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Void.java @@ -3,6 +3,8 @@ package de.dhbwstuttgart.syntaxtree.type; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; @@ -69,8 +71,8 @@ public class Void extends RefType // ino.end @Override - public Type checkType(TypeAssumptions ass, IItemWithOffset parent){ - return this; + public ConstraintType TYPE(TypeAssumptions ass, SyntaxTreeNode parent){ + return new ConstraintType(this); } } // ino.end diff --git a/src/de/dhbwstuttgart/typeinference/ConstraintPair.java b/src/de/dhbwstuttgart/typeinference/ConstraintPair.java new file mode 100644 index 00000000..f4915139 --- /dev/null +++ b/src/de/dhbwstuttgart/typeinference/ConstraintPair.java @@ -0,0 +1,15 @@ +package de.dhbwstuttgart.typeinference; + +public class ConstraintPair { + + private Pair p; + + public ConstraintPair(ConstraintType t1, ConstraintType t2){ + p = new Pair(t1.getType(), t2.getType()); + } + + public Pair getPair(){ + return p; + } + +} diff --git a/src/de/dhbwstuttgart/typeinference/ConstraintType.java b/src/de/dhbwstuttgart/typeinference/ConstraintType.java new file mode 100644 index 00000000..f4ff991a --- /dev/null +++ b/src/de/dhbwstuttgart/typeinference/ConstraintType.java @@ -0,0 +1,22 @@ +package de.dhbwstuttgart.typeinference; + +import de.dhbwstuttgart.syntaxtree.type.*; + +public class ConstraintType{ + + private Type t; + + public ConstraintType(TypePlaceholder t){ + this.t = t; + } + public ConstraintType(GenericTypeVar t){ + this.t = t; + } + public ConstraintType(RefType t){ + this.t = t; + } + public Type getType() { + return t; + } + +} diff --git a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java index d07ab2c0..889cf0a6 100755 --- a/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java +++ b/src/de/dhbwstuttgart/typeinference/ConstraintsSet.java @@ -3,8 +3,6 @@ package de.dhbwstuttgart.typeinference; import java.util.Iterator; import java.util.Vector; -import de.dhbwstuttgart.syntaxtree.type.Pair; - public class ConstraintsSet implements Iterable{ private Vector constraintsSet; diff --git a/src/de/dhbwstuttgart/typeinference/FunNInterface.java b/src/de/dhbwstuttgart/typeinference/FunNInterface.java index ac64a8a3..c41c228c 100644 --- a/src/de/dhbwstuttgart/typeinference/FunNInterface.java +++ b/src/de/dhbwstuttgart/typeinference/FunNInterface.java @@ -2,6 +2,7 @@ package de.dhbwstuttgart.typeinference; import java.util.Vector; +import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.Type; @@ -18,17 +19,27 @@ import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; public class FunNInterface extends Class{ //TODO: Diese Klasse sollte eigentlich von Interface erben //TODO: getType muss einen Typ mit der ParameterListe zurückliefern. + + + private Vector gtvparalist; + /** * Ein FunN-Interface enthält nur eine Methode (namens apply). Ist also ein Funktionales Interface. * @param N - Die Anzahl der Parameter der apply-Methode. Beispiel N = 1 ergibt R apply(T1 par1); */ public FunNInterface(int N) { super("Fun"+N, 0); - Vector paralist = new Vector(); - paralist.add(new GenericTypeVar("R",this, 0)); + GenericTypeVar gtv; + Vector paralist = new Vector<>(); + gtv = new GenericTypeVar("R",this, 0); + this.gtvparalist = new Vector(); + paralist.add(gtv); + this.gtvparalist.add(gtv); //paralist.add(TypePlaceholder.fresh()); for(int i = 1; i<=N;i++){ - paralist.add(new GenericTypeVar("T"+i,this, 0)); + gtv=new GenericTypeVar("T"+i,this, 0); + paralist.add(gtv); + this.gtvparalist.add(gtv); //paralist.add(TypePlaceholder.fresh()); } this.set_ParaList(paralist); @@ -43,6 +54,7 @@ public class FunNInterface extends Class{ TypeAssumptions ret = new TypeAssumptions(); ret.addAssumption(new MethodAssumption(this.getApplyFunction(), this)); ret.addClassAssumption(new ClassAssumption(this)); + for(GenericTypeVar gtv : this.gtvparalist)ret.addGenericVarAssumption(gtv); return ret; } diff --git a/src/de/dhbwstuttgart/typeinference/OderConstraint.java b/src/de/dhbwstuttgart/typeinference/OderConstraint.java index 92aa327a..62eb2096 100755 --- a/src/de/dhbwstuttgart/typeinference/OderConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/OderConstraint.java @@ -2,7 +2,6 @@ package de.dhbwstuttgart.typeinference; import java.util.Vector; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; @@ -15,9 +14,9 @@ public class OderConstraint{ * @param p1 * @param p2 */ - public OderConstraint(Type p1, Type p2){ + public OderConstraint(ConstraintType p1, ConstraintType p2){ if(p1 == null || p2 == null)throw new NullPointerException(); - Pair constraintPair = new Pair(p1,p2); + ConstraintPair constraintPair = new ConstraintPair(p1,p2); oderConstraintPairs = new Vector(); this.addConstraint(constraintPair); } @@ -44,16 +43,16 @@ public class OderConstraint{ * @param p1 * @param p2 */ - public void addConstraint(Type p1, Type p2){ - addConstraint(new Pair(p1,p2)); + public void addConstraint(ConstraintType p1, ConstraintType p2){ + addConstraint(new ConstraintPair(p1,p2)); } /** * Falls die Type des toAdd-Pairs nicht vom Typ RefType bzw. TypePlaceholder sind, so werden sie in einen RefType umgewandelt. * @param toAdd */ - public void addConstraint(Pair toAdd){ - oderConstraintPairs.add(new SingleConstraint(toAdd.TA1, toAdd.TA2)); + public void addConstraint(ConstraintPair toAdd){ + oderConstraintPairs.add(new SingleConstraint(toAdd)); } @Override diff --git a/src/de/dhbwstuttgart/typeinference/Overloading.java b/src/de/dhbwstuttgart/typeinference/Overloading.java index b2d7dfae..3db305e9 100755 --- a/src/de/dhbwstuttgart/typeinference/Overloading.java +++ b/src/de/dhbwstuttgart/typeinference/Overloading.java @@ -2,6 +2,7 @@ package de.dhbwstuttgart.typeinference; import java.util.Vector; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.statement.Expr; import de.dhbwstuttgart.syntaxtree.statement.MethodCall; import de.dhbwstuttgart.syntaxtree.type.RefType; @@ -65,12 +66,14 @@ public class Overloading{ if(!(this.type instanceof TypePlaceholder) && !this.type.equals(methodAssumption.getAssumedType()))break; UndConstraint methodConstraint = new UndConstraint(); //Ein Constraint für den ReturnType der Methode... - methodConstraint.addConstraint(methodAssumption.getAssumedType(), type); + methodConstraint.addConstraint(methodAssumption.getAssumedType().TYPE(assumptions, methodCall), type.TYPE(assumptions, methodCall)); //Ein Constraint für die Parameter der Methode... for(int i=0; i parameterAssumptions = new Vector(); @@ -83,7 +86,7 @@ public class Overloading{ //ret.add(new Constraint(methodCall.get_Receiver().get_Expr().getTypeVariable(), new RefType(assumption.getClassName(), null, 0))); if(methodCall.get_Receiver() != null && methodCall.get_Receiver().get_Expr() != null) //TODO: FunN-MethodAssumption darf keine Klasse (Class) als ParentClass besitzen. Denn der Typ der Klasse steht noch nicht fest (bisher ist es immer "FunN"). - methodConstraint.addConstraint(methodCall.get_Receiver().get_Expr().getType(), methodAssumption.getParentClassType()); + methodConstraint.addConstraint(methodCall.get_Receiver().get_Expr().getType().TYPE(assumptions, methodCall), methodAssumption.getParentClassType().TYPE(assumptions, methodCall)); //ret.add(new Constraint(methodCall.get_Receiver().get_Expr().getTypeVariable(), new RefType(assumption.getClassName(), parameterAssumptions, 0))); //return ret; //Bereits nach der ersten Assumption abbrechen... diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Pair.java b/src/de/dhbwstuttgart/typeinference/Pair.java similarity index 96% rename from src/de/dhbwstuttgart/syntaxtree/type/Pair.java rename to src/de/dhbwstuttgart/typeinference/Pair.java index 81f84404..e76fdba2 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Pair.java +++ b/src/de/dhbwstuttgart/typeinference/Pair.java @@ -1,5 +1,5 @@ // ino.module.Pair.8673.package -package de.dhbwstuttgart.syntaxtree.type; +package de.dhbwstuttgart.typeinference; // ino.end // ino.module.Pair.8673.import import java.util.Hashtable; @@ -7,7 +7,14 @@ import java.util.Vector; // ino.end + import de.dhbwstuttgart.parser.JavaClassName; +import de.dhbwstuttgart.syntaxtree.type.FreshWildcardType; +import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; +import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.syntaxtree.type.WildcardType; diff --git a/src/de/dhbwstuttgart/typeinference/ResultSet.java b/src/de/dhbwstuttgart/typeinference/ResultSet.java index 0a124ca2..e86335f0 100755 --- a/src/de/dhbwstuttgart/typeinference/ResultSet.java +++ b/src/de/dhbwstuttgart/typeinference/ResultSet.java @@ -3,7 +3,6 @@ package de.dhbwstuttgart.typeinference; import java.util.Iterator; import java.util.Vector; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; diff --git a/src/de/dhbwstuttgart/typeinference/SingleConstraint.java b/src/de/dhbwstuttgart/typeinference/SingleConstraint.java index 59062d29..2ab2e624 100755 --- a/src/de/dhbwstuttgart/typeinference/SingleConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/SingleConstraint.java @@ -3,7 +3,6 @@ package de.dhbwstuttgart.typeinference; import java.util.Vector; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; @@ -25,12 +24,16 @@ public class SingleConstraint extends UndConstraint{ private Pair constraintPair; //entspricht θ condition θ' //private R condition; //entspricht der condition (R) - public SingleConstraint(Type p1, Type p2){ + public SingleConstraint(ConstraintType p1, ConstraintType p2){ //super(p1,p2); - Pair constraintPair = new Pair(p1,p2);//super.getConstraintPairs().firstElement(); + ConstraintPair constraintPair = new ConstraintPair(p1,p2);//super.getConstraintPairs().firstElement(); this.addConstraint(constraintPair); } + public SingleConstraint(ConstraintPair toAdd) { + this.addConstraint(toAdd); + } + public Pair getPair(){ return constraintPair; } @@ -42,11 +45,11 @@ public class SingleConstraint extends UndConstraint{ return ret; } - public void addConstraint(Pair toAdd){ + public void addConstraint(ConstraintPair toAdd){ if(constraintPair != null)throw new DebugException("Ein Constraint darf nur aus einem ConstraintPair bestehen. Das hinzufügen von "+ toAdd + " ist nicht möglich."); - Type p1 = toAdd.TA1; - Type p2 = toAdd.TA2; + Type p1 = toAdd.getPair().TA1; + Type p2 = toAdd.getPair().TA2; if(p1==null || p2 == null)throw new NullPointerException(); @@ -58,15 +61,15 @@ public class SingleConstraint extends UndConstraint{ //if((p2 instanceof GenericTypeVar))p2 = ((GenericTypeVar)p2).getTypePlaceHolder();//throw new DebugException("GenericTypeVar sind in den Constraints nicht erlaubt");// // BaseTypes werden in RefTypes umgewandelt. Constraints dürfen nur RefTypes oder TypePlaceholder enthalten, da sonst der Unify-Algorithmus nicht funktioniert. - if(!(p1 instanceof RefType) && !(p1 instanceof TypePlaceholder) && !(p1 instanceof GenericTypeVar))p1 = new RefType(p1); - if(!(p2 instanceof RefType) && !(p2 instanceof TypePlaceholder) && !(p2 instanceof GenericTypeVar))p2 = new RefType(p2); + //if(!(p1 instanceof RefType) && !(p1 instanceof TypePlaceholder) && !(p1 instanceof GenericTypeVar))p1 = new RefType(p1); + //if(!(p2 instanceof RefType) && !(p2 instanceof TypePlaceholder) && !(p2 instanceof GenericTypeVar))p2 = new RefType(p2); //if(!(TypePlaceholder.class.isInstance(p1)) || !(RefType.class.isInstance(p1)) || !(TypePlaceholder.class.isInstance(p2)) || !(RefType.class.isInstance(p2))) //{//Wenn die beiden übergebenen Typen weder RefTypes noch TypePlaceholder sind: // throw new TypinferenzException("Ein Constraint darf nur aus TypePlaceholdern und Reftypes bestehen"); //} - if(!(p1 instanceof RefType) && !(p1 instanceof TypePlaceholder))throw new DebugException("Fehler: "+p2+" kann nicht in TPH oder RefType umgewandelt werden"); - if(!(p2 instanceof RefType) && !(p2 instanceof TypePlaceholder))throw new DebugException("Fehler: "+p2+" kann nicht in TPH oder RefType umgewandelt werden"); + //if(!(p1 instanceof RefType) && !(p1 instanceof TypePlaceholder))throw new DebugException("Fehler: "+p2+" kann nicht in TPH oder RefType umgewandelt werden"); + //if(!(p2 instanceof RefType) && !(p2 instanceof TypePlaceholder))throw new DebugException("Fehler: "+p2+" kann nicht in TPH oder RefType umgewandelt werden"); constraintPair = new Pair(p1,p2); } diff --git a/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java b/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java index fe0e79ea..45096fdc 100755 --- a/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java +++ b/src/de/dhbwstuttgart/typeinference/TypeinferenceResultSet.java @@ -8,7 +8,6 @@ import java.util.Iterator; import java.util.Vector; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; diff --git a/src/de/dhbwstuttgart/typeinference/UndConstraint.java b/src/de/dhbwstuttgart/typeinference/UndConstraint.java index 96a0f217..b8f6b9cc 100755 --- a/src/de/dhbwstuttgart/typeinference/UndConstraint.java +++ b/src/de/dhbwstuttgart/typeinference/UndConstraint.java @@ -2,7 +2,6 @@ package de.dhbwstuttgart.typeinference; import java.util.Vector; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; /** @@ -12,7 +11,7 @@ import de.dhbwstuttgart.syntaxtree.type.Type; */ public class UndConstraint extends OderConstraint { - public UndConstraint(Type p1, Type p2) { + public UndConstraint(ConstraintType p1, ConstraintType p2) { super(p1, p2); } diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index c2f4382a..0a67ec5f 100755 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -6,10 +6,12 @@ import java.util.Vector; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.FunN; import de.dhbwstuttgart.typeinference.FunNInterface; import de.dhbwstuttgart.typeinference.FunNMethod; @@ -288,10 +290,10 @@ public class TypeAssumptions { * @param t * @return null, falls der Typ nicht vorhanden ist. */ - public Type getTypeFor(Type t, IItemWithOffset inNode){ + public ConstraintType getTypeFor(Type t, SyntaxTreeNode inNode){ if(t instanceof TypePlaceholder) - return t; //Handelt es sich um einen TypePlaceholder kann dieser nicht in den Assumptions vorkommen. + return new ConstraintType((TypePlaceholder)t); //Handelt es sich um einen TypePlaceholder kann dieser nicht in den Assumptions vorkommen. //Alle bekannten Klassen nach diesem Typ durchsuchen: JavaClassName typName = t.getName(); @@ -303,7 +305,7 @@ public class TypeAssumptions { RefType tr = (RefType)t; RefType ret = ass.getAssumedClass().getType(); //Dadurch erhält der RefType den vollen Namen (bsp. java.lang.Integer) ret.set_ParaList(tr.get_ParaList()); - return ret; + return new ConstraintType(ret); } } //Auch die generischen Variablen durchsuchen: @@ -312,12 +314,11 @@ public class TypeAssumptions { if(ass.getIdentifier().equals(t.getName())){ if(! ass.getAssumedType().getParentClass().getName().equals(this.thisClassName)){ //Ist die Generische Variable nicht aus dieser Klasse, so muss sie zu einem TPH umgewandelt werden: - + return new ConstraintType(ass.getAssumedType().getTypePlaceHolder()); } - return ass.getAssumedType(); + return new ConstraintType(ass.getAssumedType()); } } - //return null; throw new TypeinferenceException("Der Typ "+t.getName()+" ist nicht korrekt",inNode); } diff --git a/src/de/dhbwstuttgart/typeinference/exceptions/TypeinferenceException.java b/src/de/dhbwstuttgart/typeinference/exceptions/TypeinferenceException.java index 7a72266c..69db2739 100755 --- a/src/de/dhbwstuttgart/typeinference/exceptions/TypeinferenceException.java +++ b/src/de/dhbwstuttgart/typeinference/exceptions/TypeinferenceException.java @@ -1,6 +1,7 @@ package de.dhbwstuttgart.typeinference.exceptions; import de.dhbwstuttgart.core.IItemWithOffset; +import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; /** * Eine RuntimeException, welche bei einem Fehler während des Typinferenzalgorithmus ausgelöst wird. @@ -17,7 +18,7 @@ public class TypeinferenceException extends RuntimeException { private int offset; private String message; - public TypeinferenceException(String message, IItemWithOffset problemSource) + public TypeinferenceException(String message, SyntaxTreeNode problemSource) { super(message); this.message=message; diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java b/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java index 36fef504..15db1692 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java @@ -6,12 +6,12 @@ import java.util.Vector; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.GenericTypeInsertable; import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.exceptions.DebugException; diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java index ba32076d..671a560d 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java @@ -10,10 +10,10 @@ import org.apache.log4j.Logger; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.JavaCodeResult; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; diff --git a/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java b/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java index f0cca4e8..05cac78e 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java +++ b/src/de/dhbwstuttgart/typeinference/unify/CSubstitution.java @@ -16,12 +16,13 @@ import org.apache.log4j.Logger; + import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; +import de.dhbwstuttgart.typeinference.Pair; // ino.class.CSubstitution.27003.description type=javadoc /** diff --git a/src/de/dhbwstuttgart/typeinference/unify/CSubstitutionSet.java b/src/de/dhbwstuttgart/typeinference/unify/CSubstitutionSet.java index 889d080b..5a96aeac 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/CSubstitutionSet.java +++ b/src/de/dhbwstuttgart/typeinference/unify/CSubstitutionSet.java @@ -7,8 +7,8 @@ import java.util.Iterator; import java.util.Vector; import de.dhbwstuttgart.myexception.CTypeReconstructionException; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.Pair; // ino.class.CSubstitutionSet.27471.description type=javadoc /** diff --git a/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java b/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java index 4adfb430..b1e8fe69 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java +++ b/src/de/dhbwstuttgart/typeinference/unify/FC_TTO.java @@ -6,7 +6,7 @@ package de.dhbwstuttgart.typeinference.unify; import java.util.Vector; import de.dhbwstuttgart.syntaxtree.Class; -import de.dhbwstuttgart.syntaxtree.type.Pair; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; // ino.class.FC_TTO.28013.description type=javadoc @@ -74,8 +74,8 @@ public class FC_TTO public void generateFullyNamedTypes(TypeAssumptions ass) { for(Pair p : this.FC){ - p.TA1 = ass.getTypeFor(p.TA1, null); - p.TA2 = ass.getTypeFor(p.TA2, null); + p.TA1 = ass.getTypeFor(p.TA1, null).getType(); + p.TA2 = ass.getTypeFor(p.TA2, null).getType(); } } } diff --git a/src/de/dhbwstuttgart/typeinference/unify/MUB.java b/src/de/dhbwstuttgart/typeinference/unify/MUB.java index 7fd2213f..30539ea9 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/MUB.java +++ b/src/de/dhbwstuttgart/typeinference/unify/MUB.java @@ -5,8 +5,8 @@ package de.dhbwstuttgart.typeinference.unify; // ino.module.MUB.8720.import import java.util.Vector; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.Pair; // ino.class.MUB.28031.declaration public class MUB diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index 6ac56413..36b0c158 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -24,13 +24,13 @@ import de.dhbwstuttgart.syntaxtree.type.FreshSuperWildcardType; import de.dhbwstuttgart.syntaxtree.type.FreshWildcardType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.IMatchable; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.WildcardType; -import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; +import de.dhbwstuttgart.typeinference.Pair; +import de.dhbwstuttgart.typeinference.Pair.PairOperator; // ino.end diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java index adc2c858..2863bf1c 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrMakeFCTest.java @@ -14,9 +14,9 @@ import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.unify.FC_TTO; public class TrMakeFCTest extends TestCase{ diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java index 850ac75d..537464c6 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrSubUnifyTest.java @@ -19,12 +19,12 @@ import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; -import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; +import de.dhbwstuttgart.typeinference.Pair; +import de.dhbwstuttgart.typeinference.Pair.PairOperator; import de.dhbwstuttgart.typeinference.unify.FC_TTO; import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java index 93a78a82..75765509 100755 --- a/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java +++ b/test/mycompiler/test/unittest/typeReconstructionTest/TrUnifyTest.java @@ -16,12 +16,12 @@ import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.misc.UsedId; import de.dhbwstuttgart.syntaxtree.modifier.Modifiers; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; -import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; +import de.dhbwstuttgart.typeinference.Pair; +import de.dhbwstuttgart.typeinference.Pair.PairOperator; import de.dhbwstuttgart.typeinference.unify.FC_TTO; import de.dhbwstuttgart.typeinference.unify.Unify; diff --git a/test/plugindevelopment/TRMEqualTest.java b/test/plugindevelopment/TRMEqualTest.java index 1c669911..a9a2549a 100644 --- a/test/plugindevelopment/TRMEqualTest.java +++ b/test/plugindevelopment/TRMEqualTest.java @@ -13,14 +13,14 @@ import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompilerAPI; import de.dhbwstuttgart.parser.JavaParser.yyException; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; -import de.dhbwstuttgart.syntaxtree.type.Pair; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; -import de.dhbwstuttgart.syntaxtree.type.Pair.PairOperator; +import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; +import de.dhbwstuttgart.typeinference.Pair.PairOperator; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import junit.framework.TestCase; diff --git a/test/plugindevelopment/TypeInsertTester.java b/test/plugindevelopment/TypeInsertTester.java index 34c35bf6..aba7e5b8 100644 --- a/test/plugindevelopment/TypeInsertTester.java +++ b/test/plugindevelopment/TypeInsertTester.java @@ -24,7 +24,6 @@ import de.dhbwstuttgart.typeinference.TypeinferenceResultSet; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertSet; import junit.framework.TestCase; -import mycompiler.mytest.LambdaTest; public class TypeInsertTester{ diff --git a/test/plugindevelopment/TypeInsertTests/OverloadingInMethod.jav b/test/plugindevelopment/TypeInsertTests/OverloadingInMethod.jav new file mode 100644 index 00000000..e66e1a7c --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/OverloadingInMethod.jav @@ -0,0 +1,10 @@ +class OverloadingInMethod{ + + m () { + op; + op = (m) -> (f) -> f.apply(m); + return op; + } + +} + diff --git a/test/plugindevelopment/TypeInsertTests/OverloadingInMethod.java b/test/plugindevelopment/TypeInsertTests/OverloadingInMethod.java new file mode 100644 index 00000000..6a7a97f5 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/OverloadingInMethod.java @@ -0,0 +1,19 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class OverloadingInMethod { + + private static final String TEST_FILE = "OverloadingInMethod.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + + //mustContain.add("Fun0>> op"); + MultipleTypesInsertTester.test(this.TEST_FILE, mustContain); + } + +} diff --git a/tools/AntParserBuilderWindows.xml b/tools/AntParserBuilderWindows.xml index 6556cbb2..e867e27c 100755 --- a/tools/AntParserBuilderWindows.xml +++ b/tools/AntParserBuilderWindows.xml @@ -1,7 +1,7 @@ - + diff --git a/tools/RunJay.sh b/tools/RunJay.sh index cb9db24e..26ce5079 100755 --- a/tools/RunJay.sh +++ b/tools/RunJay.sh @@ -1 +1 @@ -./../tools/jay -v ./../src/mycompiler/myparser/JavaParser.jay < skeleton > ./../src/mycompiler/myparser/JavaParser.java \ No newline at end of file +./../tools/jay -v ./../src/de/dhbwstuttgart/parser/JavaParser.jay < skeleton > ./../src/de/dhbwstuttgart/parser/JavaParser.java From 583dfb23e354dbd97a6fcece388ffe65880ad127 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 9 Sep 2014 11:15:10 +0200 Subject: [PATCH 28/31] Probleme mit GenericTypeVar behoben --- src/de/dhbwstuttgart/syntaxtree/Class.java | 12 +++++++++++- src/de/dhbwstuttgart/syntaxtree/Field.java | 12 +++++++++--- .../syntaxtree/FieldDeclaration.java | 2 +- src/de/dhbwstuttgart/syntaxtree/Method.java | 1 + .../syntaxtree/SyntaxTreeNode.java | 3 ++- .../syntaxtree/statement/LocalVarDecl.java | 1 + .../syntaxtree/statement/MethodCall.java | 2 +- .../syntaxtree/type/GenericTypeVar.java | 18 +++++++++++++++++- .../typeinference/Overloading.java | 18 ++++-------------- .../assumptions/TypeAssumptions.java | 3 --- .../TypeInsertTests/LambdaTest24.jav | 10 ++++++++++ .../TypeInsertTests/LambdaTest24.java | 16 ++++++++++++++++ 12 files changed, 73 insertions(+), 25 deletions(-) create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest24.jav create mode 100644 test/plugindevelopment/TypeInsertTests/LambdaTest24.java diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index d8a66302..275666dd 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -1129,6 +1129,15 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit this.addField(standardKonstruktor); } + if(this.genericClassParameters == null)this.setGenericParameter(new GenericDeclarationList(new Vector(), 0)); + for(Type t : this.get_ParaList()){ + if(t instanceof GenericTypeVar)this.genericClassParameters.add((GenericTypeVar)t); + else this.genericClassParameters.add(new GenericTypeVar(t.get_Name(),this,-1)); + } + for(GenericTypeVar gtv : this.getGenericParameter()){ + gtv.setParentClass(this);; + } + //TODO: Umwandlung zu RefTypes funktioniert noch nicht richtig. (siehe LambdaTest2) //Als RefType geparste Generische Variablen umwandeln: this.wandleRefTypeAttributes2GenericAttributes(); @@ -1144,6 +1153,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit Vector ret = new Vector(); for(Field f : this.getFields()){ ret.add(f); + ret.addAll(this.getGenericParameter()); } return ret; } @@ -1158,7 +1168,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit } @Override - public Iterable getGenericParameter() { + public Vector getGenericParameter() { if(this.genericClassParameters == null)return new Vector(); return this.genericClassParameters; } diff --git a/src/de/dhbwstuttgart/syntaxtree/Field.java b/src/de/dhbwstuttgart/syntaxtree/Field.java index 51930b34..baefaddd 100644 --- a/src/de/dhbwstuttgart/syntaxtree/Field.java +++ b/src/de/dhbwstuttgart/syntaxtree/Field.java @@ -54,7 +54,7 @@ public abstract class Field extends SyntaxTreeNode implements TypeInsertable, Ty throws JVMCodeException; @Override - public Iterable getGenericParameter() { + public Vector getGenericParameter() { Vector ret = new Vector<>(); if(this.genericParameters == null)return ret; ret.addAll(this.genericParameters); @@ -153,10 +153,16 @@ public abstract class Field extends SyntaxTreeNode implements TypeInsertable, Ty return this.offset; } } - + + @Override + public Vector getChildren() { + Vector ret = new Vector<>(); + if(this.getType()!=null)ret.add(this.getType()); + return ret; + } + @Override public void setGenericParameter(GenericDeclarationList params) { this.genericParameters = params; } - } diff --git a/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java index 4f2e5a4d..ebf61dd9 100644 --- a/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java +++ b/src/de/dhbwstuttgart/syntaxtree/FieldDeclaration.java @@ -106,7 +106,7 @@ public class FieldDeclaration extends Field{ @Override public Vector getChildren() { - Vector ret = new Vector(); + Vector ret = super.getChildren(); if(this.wert!=null)ret.add(this.wert); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/Method.java b/src/de/dhbwstuttgart/syntaxtree/Method.java index 777b8be4..db84fb99 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Method.java +++ b/src/de/dhbwstuttgart/syntaxtree/Method.java @@ -683,6 +683,7 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable for(FormalParameter param : this.parameterlist){ ret.add(param); } + ret.addAll(this.getGenericParameter()); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java b/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java index 7e621eeb..addee2d7 100644 --- a/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java +++ b/src/de/dhbwstuttgart/syntaxtree/SyntaxTreeNode.java @@ -30,7 +30,8 @@ public abstract class SyntaxTreeNode implements IItemWithOffset{ */ public void parserPostProcessing(SyntaxTreeNode parent) { this.parent = parent; - for(SyntaxTreeNode node : this.getChildren())node.parserPostProcessing(this); + for(SyntaxTreeNode node : this.getChildren()) + if(node!=null)node.parserPostProcessing(this); } public SyntaxTreeNode getParent() { diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java index 048cab24..fe5a0244 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java @@ -423,6 +423,7 @@ public class LocalVarDecl extends Statement implements TypeInsertable @Override public Vector getChildren() { Vector ret = new Vector(); + if(this.getType()!=null)ret.add(this.getType()); return ret; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java index e635fdf4..ff1f891e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/MethodCall.java @@ -175,7 +175,7 @@ public class MethodCall extends Expr * Mögliche Probleme: * Wenn die Methode ohne Angabe eines Receivers im Quelltext steht: * methodCall(param); -> (bedeutet:) this.methodCall(param); - * Der Parser macht hier aber komische Faxen (siehe JavaParser.jay Zeile 1858 ff) + * Parser möglicherweise anpassen (siehe JavaParser.jay Zeile 1858 ff) */ @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { diff --git a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java index eb77fa2e..c153ebd3 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java @@ -15,6 +15,8 @@ import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.SingleConstraint; import de.dhbwstuttgart.typeinference.TypeInsertable; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; +import de.dhbwstuttgart.typeinference.exceptions.DebugException; +import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.Class; @@ -203,14 +205,28 @@ public class GenericTypeVar extends Type */ public ConstraintsSet TYPE(TypeAssumptions ass){ ConstraintsSet ret = new ConstraintsSet(); + ass.addGenericVarAssumption(this); return ret; } + @Override + public ConstraintType TYPE(TypeAssumptions ass, SyntaxTreeNode parent) { + ass.addGenericVarAssumption(this); //Eine GenericTypeVar kann nur an Stellen vorkommen, an denen sie auch gültig ist. Daher kann sie den Assumptions hinzugefügt werden. + return super.TYPE(ass, parent); + } + public int getEndOffset() { return this.getOffset() + this.name.toString().length(); } - + + public void setParentClass(Class parent){ + //TODO: Die Methode sollte mit neuem Parser raus und dafür nur noch im Konstruktor gesetzt werden. + this.parent = parent; + } + public Class getParentClass() { + if(this.parent == null) + throw new DebugException("GenericTypeVar ohne Elternelement"); return this.parent; } diff --git a/src/de/dhbwstuttgart/typeinference/Overloading.java b/src/de/dhbwstuttgart/typeinference/Overloading.java index 3db305e9..e3a48f24 100755 --- a/src/de/dhbwstuttgart/typeinference/Overloading.java +++ b/src/de/dhbwstuttgart/typeinference/Overloading.java @@ -27,7 +27,7 @@ public class Overloading{ * methodCall : type * @param ass * @param method - * @param type - eine Type-Assumption/oder Type für den Rückgabetyp des MethodCall + * @param type - eine Typ-Assumption/oder Typ für den Rückgabetyp des MethodCall */ public Overloading(TypeAssumptions ass, MethodCall method, Type type){ assumptions = ass.clone(); @@ -62,6 +62,7 @@ public class Overloading{ } Vector methodAssumptions = assumptions.getMethodAssumptions(methodCall.getName(), parameterList); if(methodAssumptions.size()==0)throw new TypeinferenceException("Eine Methode "+methodCall.get_Name()+" ist in den Assumptions nicht vorhanden", methodCall); + //Alle möglichen Methoden durchgehen: for(MethodAssumption methodAssumption : methodAssumptions){ if(!(this.type instanceof TypePlaceholder) && !this.type.equals(methodAssumption.getAssumedType()))break; UndConstraint methodConstraint = new UndConstraint(); @@ -69,27 +70,16 @@ public class Overloading{ methodConstraint.addConstraint(methodAssumption.getAssumedType().TYPE(assumptions, methodCall), type.TYPE(assumptions, methodCall)); //Ein Constraint für die Parameter der Methode... for(int i=0; i parameterAssumptions = new Vector(); - parameterAssumptions.add(methodAssumption.getAssumedType()); - for(CParaTypeAssumption pAss : methodAssumption.getParaAssumptions() ){ - parameterAssumptions.add(pAss.getAssumedType()); - } - */ //Ein Constraint für den Receiver der Methode (falls vorhanden)... - //ret.add(new Constraint(methodCall.get_Receiver().get_Expr().getTypeVariable(), new RefType(assumption.getClassName(), null, 0))); - if(methodCall.get_Receiver() != null && methodCall.get_Receiver().get_Expr() != null) + if(methodCall.get_Receiver() != null && methodCall.get_Receiver().get_Expr() != null){ //TODO: FunN-MethodAssumption darf keine Klasse (Class) als ParentClass besitzen. Denn der Typ der Klasse steht noch nicht fest (bisher ist es immer "FunN"). methodConstraint.addConstraint(methodCall.get_Receiver().get_Expr().getType().TYPE(assumptions, methodCall), methodAssumption.getParentClassType().TYPE(assumptions, methodCall)); - //ret.add(new Constraint(methodCall.get_Receiver().get_Expr().getTypeVariable(), new RefType(assumption.getClassName(), parameterAssumptions, 0))); - - //return ret; //Bereits nach der ersten Assumption abbrechen... + } ret.addConstraint(methodConstraint); } return ret; diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index 0a67ec5f..ae128ffd 100755 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -267,8 +267,6 @@ public class TypeAssumptions { return ret; } - - @Override public String toString(){ String ret = "this: "+this.thisClassName+"\n"; @@ -283,7 +281,6 @@ public class TypeAssumptions { return ret; } - /** * Kontrolliert den vom Parser gesetzten Typ. * Erweitert dessen Bezeichnung, wenn nötig. diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest24.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest24.jav new file mode 100644 index 00000000..ede3dbe6 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest24.jav @@ -0,0 +1,10 @@ +class Overloading_in_Method { + + ff (x) { + op; + op = (m) -> (f) -> f.apply(m); + return op; + } + + +} \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest24.java b/test/plugindevelopment/TypeInsertTests/LambdaTest24.java new file mode 100644 index 00000000..59de42e5 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest24.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class LambdaTest24 { + private static final String TEST_FILE = "LambdaTest24.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + //mustContain.add("Matrix ret"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} From 330451271eac52ff56514285f2611f9ba85cd8c4 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 9 Sep 2014 14:32:53 +0200 Subject: [PATCH 29/31] =?UTF-8?q?Kleine=20=C3=84nderungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/de/dhbwstuttgart/parser/JavaClassName.java | 2 +- .../dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java | 9 ++++++++- src/de/dhbwstuttgart/typeinference/unify/Unify.java | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/de/dhbwstuttgart/parser/JavaClassName.java b/src/de/dhbwstuttgart/parser/JavaClassName.java index 1f99511a..dbb87943 100644 --- a/src/de/dhbwstuttgart/parser/JavaClassName.java +++ b/src/de/dhbwstuttgart/parser/JavaClassName.java @@ -54,7 +54,7 @@ public class JavaClassName { if (obj == null) return false; if(obj instanceof String) - return this.toString().equals(obj) || this.name != null && this.name.equals(obj); //Auch mit Strings als Klassennamen kompatibel TODO: sollte bald obsolet sein + return this.toString().equals(obj) || (this.name != null && this.name.equals(obj)); //Auch mit Strings als Klassennamen kompatibel TODO: sollte bald obsolet sein if (getClass() != obj.getClass()) return false; JavaClassName other = (JavaClassName) obj; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java index fe5a0244..0f4ff5b1 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LocalVarDecl.java @@ -6,8 +6,8 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; - import org.apache.log4j.Logger; + import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.core.MyCompiler; @@ -389,6 +389,13 @@ public class LocalVarDecl extends Statement implements TypeInsertable return ret; } + @Override + public String getDescription() { + if(this.getType() == null)return "no type " + declid.toString(); + if(this.getType() instanceof TypePlaceholder)return declid.toString(); + return this.getType().toString() + " " + declid.toString(); + } + @Override public void parserPostProcessing(SyntaxTreeNode parent) { super.parserPostProcessing(parent); diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index 36b0c158..6bae8d6a 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -1443,7 +1443,7 @@ throws MatchException } // end if P.OperatorSmaller() } // end if: RefType - + // Swap if( (P.TA1 instanceof RefType || P.TA1 instanceof GenericTypeVar || P.TA1 instanceof WildcardType) && P.TA2 instanceof TypePlaceholder && P.OperatorEqual()) //PL 06-05-16 GenericTypeVar eingefuegt @@ -1840,8 +1840,8 @@ throws MatchException //in ein Vector von Paaren um. Vector ret = new Vector(); - for(Enumeration e=ht.keys();e.hasMoreElements();) { - String k = (String)e.nextElement(); + for(Enumeration e=ht.keys();e.hasMoreElements();) { + String k = e.nextElement().toString(); // #JB# 11.04.2005 // ########################################################### ret.addElement(new Pair(TypePlaceholder.backdoorCreate(k), (Type)ht.get(k), PairOperator.Equal)); From 81d9d3ab64ceff2abc1e756daaefa9ef13c052ff Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 9 Sep 2014 15:30:32 +0200 Subject: [PATCH 30/31] Ant_build angepasst --- src/de/dhbwstuttgart/syntaxtree/SourceFile.java | 2 +- test/plugindevelopment/TypeInsertTests/LambdaTest18.jav | 4 +++- tools/RunJayDarwin.sh | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java index 69ede18c..69ce984a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/SourceFile.java +++ b/src/de/dhbwstuttgart/syntaxtree/SourceFile.java @@ -673,7 +673,7 @@ public class SourceFile } xConstraints.add(cons); } - //typinferenzLog.debug("Karthesisches Produkt der Constraints: "+xConstraints); + typinferenzLog.debug("Karthesisches Produkt der Constraints: "+xConstraints); finiteClosure.generateFullyNamedTypes(globalAssumptions); diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest18.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest18.jav index 161680c7..142aa291 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest18.jav +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest18.jav @@ -2,5 +2,7 @@ class Test{ java.lang.Integer var; var2 = var; - +void methode(){ +var = 1; +} } \ No newline at end of file diff --git a/tools/RunJayDarwin.sh b/tools/RunJayDarwin.sh index e6174483..12bccc1d 100755 --- a/tools/RunJayDarwin.sh +++ b/tools/RunJayDarwin.sh @@ -1 +1 @@ -./../tools/jay.darwin -v ./../src/mycompiler/myparser/JavaParser.jay < skeleton > ./../src/mycompiler/myparser/JavaParser.java +./../tools/jay.darwin -v ./../src/de/dhbwstuttgart/parser/JavaParser.jay < skeleton > ./../src/de/dhbwstuttgart/parser/JavaParser.java From 45ea59e7adab14b81971a56866a82ffd043e9492 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 9 Sep 2014 17:47:57 +0200 Subject: [PATCH 31/31] Fehler in get_ParaList behoben --- .../dhbwstuttgart/syntaxtree/type/RefType.java | 16 ++++++++++++---- .../assumptions/TypeAssumptions.java | 2 +- .../dhbwstuttgart/typeinference/unify/Unify.java | 2 -- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index aaef7ada..a25994b4 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -111,7 +111,7 @@ public class RefType extends Type implements IMatchable super(offset); // otth: Copy-Konstruktor this.setName(R.getTypeName()); - this.set_ParaList(R.get_ParaList()); + this.set_ParaList(R.getParaList()); } // ino.end @@ -332,14 +332,22 @@ public class RefType extends Type implements IMatchable } // ino.end + /** + * @return gibt bei leere Parameterliste null zurück. Ist entscheidend für unify-Algorithmus + */ // ino.method.get_ParaList.26664.definition public Vector get_ParaList() // ino.end // ino.method.get_ParaList.26664.body { - return this.parameter; + if(this.parameter == null || this.parameter.size()==0)return null; + return this.parameter; } // ino.end + + public Vector getParaList(){ + return this.parameter; + } // ino.method.add_Parameter.26667.definition public void add_Parameter(Type o) @@ -737,9 +745,9 @@ public class RefType extends Type implements IMatchable @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { JavaCodeResult ret = new JavaCodeResult(this.name.toString()); - if(this.get_ParaList()!=null && this.get_ParaList().size()>0){ + if(this.getParaList()!=null && this.getParaList().size()>0){ ret .attach( "<" ); - Iterator it = this.get_ParaList().iterator(); + Iterator it = this.getParaList().iterator(); while(it.hasNext()){ Type t = it.next(); ret .attach( t.printJavaCode(resultSet)); diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java index ae128ffd..befd8000 100755 --- a/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/TypeAssumptions.java @@ -301,7 +301,7 @@ public class TypeAssumptions { if(match && t instanceof RefType){ RefType tr = (RefType)t; RefType ret = ass.getAssumedClass().getType(); //Dadurch erhält der RefType den vollen Namen (bsp. java.lang.Integer) - ret.set_ParaList(tr.get_ParaList()); + ret.set_ParaList(tr.getParaList()); return new ConstraintType(ret); } } diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index 6bae8d6a..3317cbea 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -7,9 +7,7 @@ import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; - import org.apache.log4j.Logger; - import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.MatchException;