Merge branch 'bytecode2' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into plugin

This commit is contained in:
Andreas Stadelmeier 2018-09-10 13:50:45 +02:00
commit 03ef170b6e
77 changed files with 5012 additions and 4119 deletions

View File

@ -1,19 +0,0 @@
# plugin site erstellen
* die JAvaTXCOmpiler DAtei in ein plugin umwandeln und deployen.
* siehe: http://www.vogella.com/tutorials/EclipseJarToPlugin/article.html#convert-jar-files-to-osgi-bundles-with-the-p2-maven-plugin
* AUsführung:
* mvn deploy #erstellt die JAR-Datei und steckt sie in ein lokales Repo (maven-repository)
* mvn p2:site
* mvn package # hier wird die ZIP-Filf zum Einbinden in Eclipse erstellt
# Einbinden in Eclipse
* In Eclipse kann die Zip-FIle wie ein Plugin installiert werden
* Hier tritt FEhler auf. Reflections-Library kann nicht installiert werden. Möglicherweise wird sie auch nicht gebraucht
* Nach dem installieren de.dhbwstuttagrt.JavaTXcompiler zu den DEpendencies des plugins hinzufügen
* Anschließend unter "Overview" auf "Updata Classpath" klicken
# Windows
* JAVA_HOME setzen:
* export JAVA_HOME=/c/Program\ Files/Java/jdk1.8.0_102/

View File

@ -131,7 +131,8 @@ public class BytecodeGen implements ASTVisitor {
* Signature looks like: * Signature looks like:
* <E:Ljava/...>Superclass * <E:Ljava/...>Superclass
*/ */
if(classOrInterface.getGenerics().iterator().hasNext() || !commonPairs.isEmpty()) { if(classOrInterface.getGenerics().iterator().hasNext() || !commonPairs.isEmpty() ||
classOrInterface.getSuperClass().acceptTV(new TypeToSignature()).contains("<")) {
Signature signature = new Signature(classOrInterface, genericsAndBounds,commonPairs); Signature signature = new Signature(classOrInterface, genericsAndBounds,commonPairs);
sig = signature.toString(); sig = signature.toString();
System.out.println("Signature: => " + sig); System.out.println("Signature: => " + sig);
@ -232,19 +233,20 @@ public class BytecodeGen implements ASTVisitor {
System.out.println(acc); System.out.println(acc);
/*Prüfe, ob die Rückgabe-Type der Methode eine Type-Variable ist*/ /*Prüfe, ob die Rückgabe-Type der Methode eine Type-Variable ist*/
boolean hasGenInParameterList = genericsAndBounds.containsKey(retType) || retType.subSequence(0, 4).equals("TPH "); boolean hasGenInParameterList = genericsAndBounds.containsKey(retType) || retType.subSequence(0, 4).equals("TPH ") ||
resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToSignature()).contains("<");
/*Wenn die Rückgabe-Type eine Typ-variable ist, erzeuge direkt die Signature, wenn nicht, /*Wenn die Rückgabe-Type eine Typ-variable ist, erzeuge direkt die Signature, wenn nicht,
* prüfe, ob einer der Parameter Typ-Variable als Typ hat*/ * prüfe, ob einer der Parameter Typ-Variable als Typ hat*/
if(!hasGenInParameterList) { if(!hasGenInParameterList) {
for(String paramName : methodParamsAndTypes.keySet()) { for(String paramName : methodParamsAndTypes.keySet()) {
String typeOfParam = methodParamsAndTypes.get(paramName).acceptTV(new TypeToDescriptor()); String typeOfParam = methodParamsAndTypes.get(paramName).acceptTV(new TypeToDescriptor());
if(genericsAndBounds.containsKey(typeOfParam)||typeOfParam.substring(0, 4).equals("TPH ")) { String sigOfParam = methodParamsAndTypes.get(paramName).acceptTV(new TypeToSignature());
if(genericsAndBounds.containsKey(typeOfParam)||typeOfParam.substring(0, 4).equals("TPH ")||sigOfParam.contains("<")) {
hasGenInParameterList = true; hasGenInParameterList = true;
break; break;
} }
} }
} }
//TODO: Test if the return-type or any of the parameter is a parameterized type. (VP) //TODO: Test if the return-type or any of the parameter is a parameterized type. (VP)
//then create the descriptor with the new syntax. //then create the descriptor with the new syntax.
@ -252,11 +254,9 @@ public class BytecodeGen implements ASTVisitor {
/* method.getGenerics: <....> RT method(..) /* method.getGenerics: <....> RT method(..)
* */ * */
boolean hasGen = method.getGenerics().iterator().hasNext() || hasGenInParameterList; boolean hasGen = method.getGenerics().iterator().hasNext() || hasGenInParameterList;
/* if method has generics or return type is TPH, create signature */ /* if method has generics or return type is TPH, create signature */
// zwite operand muss weggelassen werden // zwite operand muss weggelassen werden
if(hasGen||method.getReturnType().acceptTV(new TypeToString()).equals("TPH")) { if(hasGen||resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToString()).equals("TPH")) {
ArrayList<GenericInsertPair> pairs = simplifyPairs(method.name,tphExtractor.allPairs); ArrayList<GenericInsertPair> pairs = simplifyPairs(method.name,tphExtractor.allPairs);
System.out.println(method.name + " => Simplified Pairs: "); System.out.println(method.name + " => Simplified Pairs: ");
pairs.forEach(p->System.out.println(p.TA1.getName() + " -> "+p.TA2.getName())); pairs.forEach(p->System.out.println(p.TA1.getName() + " -> "+p.TA2.getName()));
@ -286,6 +286,8 @@ public class BytecodeGen implements ASTVisitor {
ArrayList<GenericInsertPair> simplifiedPairs = new ArrayList<>(); ArrayList<GenericInsertPair> simplifiedPairs = new ArrayList<>();
ArrayList<HashMap<Integer, TypePlaceholder>> beforeSimplify = new ArrayList<>();
MethodAndTPH method; MethodAndTPH method;
ArrayList<TypePlaceholder> methodTphs = new ArrayList<>(); ArrayList<TypePlaceholder> methodTphs = new ArrayList<>();
ArrayList<GenericInsertPair> methodPairs = new ArrayList<>(); ArrayList<GenericInsertPair> methodPairs = new ArrayList<>();
@ -322,9 +324,13 @@ public class BytecodeGen implements ASTVisitor {
tphsInRel.put(tphsInRel.size(), superTph); tphsInRel.put(tphsInRel.size(), superTph);
numOfVisitedPairs++; numOfVisitedPairs++;
boolean isCycle = false;
while(subAndSuperTph.containsKey(superTph)) { while(subAndSuperTph.containsKey(superTph)) {
superTph = subAndSuperTph.get(superTph); superTph = subAndSuperTph.get(superTph);
if(tphsInRel.containsValue(superTph)) {
isCycle = true;
break;
}
tphsInRel.put(tphsInRel.size(), superTph); tphsInRel.put(tphsInRel.size(), superTph);
numOfVisitedPairs++; numOfVisitedPairs++;
} }
@ -355,19 +361,62 @@ public class BytecodeGen implements ASTVisitor {
superTphRes = tphsInRel.get(tphsInRel.size()-i); superTphRes = tphsInRel.get(tphsInRel.size()-i);
i++; i++;
} }
if((methodTphs.contains(superTphRes) || !tphExtractor.allTPHS.containsKey(superTphRes))
&& !subTphRes.equals(superTphRes)) {
beforeSimplify.add(tphsInRel);
}
// teste noch den Fall X < Y und Y nicht in TPHS der Methode // teste noch den Fall X < Y und Y nicht in TPHS der Methode
// Dann hat man nach der While-Schleife X < Y // Dann hat man nach der While-Schleife X < Y
// Y muss durch Object ersetzt. // Y muss durch Object ersetzt.
// Zweite Operand für die Fälle wie in Lambda.jav (Paramtrisierte Typen) // Zweite Operand für die Fälle wie in Lambda.jav (Paramtrisierte Typen)
if(methodTphs.contains(superTphRes) || !tphExtractor.allTPHS.containsKey(superTphRes)) { if((methodTphs.contains(superTphRes) || !tphExtractor.allTPHS.containsKey(superTphRes))
&& !subTphRes.equals(superTphRes)) {
GenericInsertPair sPair = new GenericInsertPair(subTphRes, superTphRes); GenericInsertPair sPair = new GenericInsertPair(subTphRes, superTphRes);
simplifiedPairs.add(sPair); simplifiedPairs.add(sPair);
} }
} }
beforeSimplify.forEach(e->{
System.out.println("=> ");
e.forEach((v,k) -> {
System.out.print(v + "->" + k + ", ");
});
System.out.println();
System.out.println("----------------------");
});
if(beforeSimplify.size()>1) {
int i = 0;
while(i<beforeSimplify.size()) {
TypePlaceholder sub = beforeSimplify.get(i).get(0);
for(HashMap<Integer, TypePlaceholder> e: beforeSimplify) {
if(!e.equals(beforeSimplify.get(i)) && e.containsValue(sub)) {
GenericInsertPair sPair = new GenericInsertPair(e.get(0), sub);
System.out.println("To remove = " + e.get(0)+ " " +e.get(e.size()-1));
removePair(simplifiedPairs,e.get(0), e.get(e.size()-1));
simplifiedPairs.add(sPair);
}
}
i++;
}
}
return simplifiedPairs; return simplifiedPairs;
} }
private void removePair(ArrayList<GenericInsertPair> simplifiedPairs, TypePlaceholder typePlaceholder, TypePlaceholder typePlaceholder2) {
for(GenericInsertPair p : simplifiedPairs) {
if(p.TA1.equals(typePlaceholder) && p.TA2.equals(typePlaceholder2)) {
simplifiedPairs.remove(p);
return;
}
}
}
@Override @Override
public void visit(ParameterList formalParameters) { public void visit(ParameterList formalParameters) {
paramsAndLocals = new HashMap<>(); paramsAndLocals = new HashMap<>();

View File

@ -69,7 +69,7 @@ public class BytecodeGenMethod implements StatementVisitor {
private SourceFile sf; private SourceFile sf;
private IStatement statement = null; private IStatement statement = null;
// private int numMethodCalls = 0; private boolean needDUP = false;
// for tests ** // for tests **
private String fieldName; private String fieldName;
@ -159,7 +159,7 @@ public class BytecodeGenMethod implements StatementVisitor {
// wird die lokale Var geladen. Sonst wird zuerst die lokale Var geladen. // wird die lokale Var geladen. Sonst wird zuerst die lokale Var geladen.
System.out.println(localVar.name); System.out.println(localVar.name);
mv.visitVarInsn(Opcodes.ALOAD, paramsAndLocals.get(localVar.name)); mv.visitVarInsn(Opcodes.ALOAD, paramsAndLocals.get(localVar.name));
if (isBinaryExp) { if (isBinaryExp) {
doUnboxing(getResolvedType(localVar.getType())); doUnboxing(getResolvedType(localVar.getType()));
} }
@ -195,6 +195,7 @@ public class BytecodeGenMethod implements StatementVisitor {
doBoxing(binaryType); doBoxing(binaryType);
isBinaryExp = false; isBinaryExp = false;
} }
System.out.println("ASSIGN TYPE R: " + getResolvedType(assign.rightSide.getType())); System.out.println("ASSIGN TYPE R: " + getResolvedType(assign.rightSide.getType()));
String typeOfRightSide = getResolvedType(assign.rightSide.getType()); String typeOfRightSide = getResolvedType(assign.rightSide.getType());
if(typeOfRightSide.contains("<")) { if(typeOfRightSide.contains("<")) {
@ -225,12 +226,18 @@ public class BytecodeGenMethod implements StatementVisitor {
// this case for while loops // this case for while loops
if (statement instanceof LoopStmt) if (statement instanceof LoopStmt)
mv.visitLabel(endLabel); mv.visitLabel(endLabel);
if(binary.lexpr instanceof UnaryExpr)
needDUP = true;
binary.lexpr.accept(this); binary.lexpr.accept(this);
if (!lexpType.equals(rexpType) && !lexpType.equals(largerType)) if (!lexpType.equals(rexpType) && !lexpType.equals(largerType))
doCast(lexpType, largerType); doCast(lexpType, largerType);
if(binary.rexpr instanceof UnaryExpr)
needDUP = true;
binary.rexpr.accept(this); binary.rexpr.accept(this);
if (!lexpType.equals(rexpType) && !rexpType.equals(largerType)) if (!lexpType.equals(rexpType) && !rexpType.equals(largerType))
@ -273,10 +280,6 @@ public class BytecodeGenMethod implements StatementVisitor {
} }
/*
* Diese Methode wird nicht mehr gebraucht, da es jetzt nicht möglich ist, dass
* solche Fälle: Integer -> Integer (OP) Short ,... usw, nicht vorkommen!
*/
private String getLargerType(String lexpType, String rexpType) { private String getLargerType(String lexpType, String rexpType) {
if (lexpType.equals(Type.getInternalName(String.class)) if (lexpType.equals(Type.getInternalName(String.class))
|| rexpType.equals(Type.getInternalName(String.class))) { || rexpType.equals(Type.getInternalName(String.class))) {
@ -340,7 +343,7 @@ public class BytecodeGenMethod implements StatementVisitor {
} }
private void doVisitRelOpInsn(Operator op, String typeOfBinary, Label branchLabel, Label endLabel) { private void doVisitRelOpInsn(Operator op, String typeOfBinary, Label branchLabel, Label endLabel) {
System.out.println("TypeOfBinary: " + typeOfBinary);
switch (typeOfBinary) { switch (typeOfBinary) {
case "java/lang/Long": case "java/lang/Long":
mv.visitInsn(Opcodes.LCMP); mv.visitInsn(Opcodes.LCMP);
@ -581,7 +584,7 @@ public class BytecodeGenMethod implements StatementVisitor {
// ")"+lam.getReturn.getBounds // ")"+lam.getReturn.getBounds
Signature sig = new Signature(lambdaExpression, numberOfParams); Signature sig = new Signature(lambdaExpression, numberOfParams);
String name = "Fun" + numberOfParams + "$$"; String name = "Fun" + numberOfParams + "$$";
classWriter.visit(Opcodes.V1_8, Opcodes.ACC_INTERFACE + Opcodes.ACC_ABSTRACT, name, sig.toString(), classWriter.visit(Opcodes.V1_8, Opcodes.ACC_PUBLIC+Opcodes.ACC_INTERFACE + Opcodes.ACC_ABSTRACT, name, sig.toString(),
Type.getInternalName(Object.class), null); Type.getInternalName(Object.class), null);
MethodVisitor mvApply = classWriter.visitMethod(Opcodes.ACC_PUBLIC + Opcodes.ACC_ABSTRACT, "apply", methDesc, MethodVisitor mvApply = classWriter.visitMethod(Opcodes.ACC_PUBLIC + Opcodes.ACC_ABSTRACT, "apply", methDesc,
methSig.toString(), null); methSig.toString(), null);
@ -828,7 +831,6 @@ public class BytecodeGenMethod implements StatementVisitor {
@Override @Override
public void visit(UnaryExpr unaryExpr) { public void visit(UnaryExpr unaryExpr) {
unaryExpr.expr.accept(this); unaryExpr.expr.accept(this);
Operation op = unaryExpr.operation; Operation op = unaryExpr.operation;
@ -865,6 +867,10 @@ public class BytecodeGenMethod implements StatementVisitor {
// das wird später gemacht, da bytecode für cast noch nicht erzeugt wird // das wird später gemacht, da bytecode für cast noch nicht erzeugt wird
if (isIncOrDec && (unaryExpr.expr instanceof LocalVar)) { if (isIncOrDec && (unaryExpr.expr instanceof LocalVar)) {
if(needDUP) {
mv.visitInsn(Opcodes.DUP);
needDUP = false;
}
LocalVar local = (LocalVar) unaryExpr.expr; LocalVar local = (LocalVar) unaryExpr.expr;
mv.visitVarInsn(Opcodes.ASTORE, paramsAndLocals.get(local.name)); mv.visitVarInsn(Opcodes.ASTORE, paramsAndLocals.get(local.name));
} }
@ -913,7 +919,10 @@ public class BytecodeGenMethod implements StatementVisitor {
public void visit(Return aReturn) { public void visit(Return aReturn) {
statement = new ReturnStmt(aReturn.retexpr); statement = new ReturnStmt(aReturn.retexpr);
isBinaryExp = statement.isExprBinary(); isBinaryExp = statement.isExprBinary();
if(aReturn.retexpr instanceof UnaryExpr)
needDUP = true;
aReturn.retexpr.accept(this); aReturn.retexpr.accept(this);
if (isBinaryExp) { if (isBinaryExp) {
@ -970,6 +979,7 @@ public class BytecodeGenMethod implements StatementVisitor {
public void visit(Literal literal) { public void visit(Literal literal) {
Object value = literal.value; Object value = literal.value;
String typeOfLiteral = getResolvedType(literal.getType()); String typeOfLiteral = getResolvedType(literal.getType());
System.out.println("typeOfLiteral :=> "+ typeOfLiteral);
// Der Wert des Literals wird auf den Stack geladen und // Der Wert des Literals wird auf den Stack geladen und
// geboxt, wenn es nötig ist. // geboxt, wenn es nötig ist.
loadValue(typeOfLiteral, value, false); loadValue(typeOfLiteral, value, false);
@ -1118,8 +1128,10 @@ public class BytecodeGenMethod implements StatementVisitor {
} }
private void visitLongLiteral(Long value, boolean isLong) { private void visitLongLiteral(Long value, boolean isLong) {
if (value < Math.pow(2, 15) || (value >= -Math.pow(2, 15)) && value < -128) { if (value == 0) {
visitShortLiteral(value.shortValue(), isLong); mv.visitInsn(Opcodes.LCONST_0);
} else if (value == 1) {
mv.visitInsn(Opcodes.LCONST_1);
} else { } else {
mv.visitLdcInsn(value); mv.visitLdcInsn(value);
} }
@ -1170,7 +1182,17 @@ public class BytecodeGenMethod implements StatementVisitor {
public void visit(ArgumentList argumentList) { public void visit(ArgumentList argumentList) {
for (Expression al : argumentList.getArguments()) { for (Expression al : argumentList.getArguments()) {
statement = new ArgumentExpr(al); statement = new ArgumentExpr(al);
isBinaryExp = statement.isExprBinary();
if(al instanceof UnaryExpr)
needDUP = true;
al.accept(this); al.accept(this);
//TODO: teste, ob man das für unary braucht
if (isBinaryExp) {
BinaryExpr binary = (BinaryExpr) al;
String binaryType = getResolvedType(binary.getType());
doBoxing(binaryType);
isBinaryExp = false;
}
statement = null; statement = null;
} }
} }

View File

@ -19,7 +19,9 @@ import de.dhbwstuttgart.syntaxtree.statement.LambdaExpression;
import de.dhbwstuttgart.syntaxtree.type.GenericRefType; import de.dhbwstuttgart.syntaxtree.type.GenericRefType;
import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.RefType;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric; import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
import de.dhbwstuttgart.syntaxtree.type.WildcardType;
import de.dhbwstuttgart.typeinference.result.GenericInsertPair; import de.dhbwstuttgart.typeinference.result.GenericInsertPair;
import de.dhbwstuttgart.typeinference.result.ResolvedType; import de.dhbwstuttgart.typeinference.result.ResolvedType;
import de.dhbwstuttgart.typeinference.result.ResultSet; import de.dhbwstuttgart.typeinference.result.ResultSet;
@ -104,33 +106,40 @@ public class Signature {
Iterator<? extends GenericTypeVar> itr = method.getGenerics().iterator(); Iterator<? extends GenericTypeVar> itr = method.getGenerics().iterator();
// visits all formal type parameter and visits their bounds <T:...;B:...;...> // visits all formal type parameter and visits their bounds <T:...;B:...;...>
while(itr.hasNext()) { while(itr.hasNext()) {
System.out.println("HAS GENERICS!!");
GenericTypeVar g = itr.next(); GenericTypeVar g = itr.next();
getBoundsOfTypeVar(g,genericsAndBoundsMethod); getBoundsOfTypeVar(g,genericsAndBoundsMethod);
} }
//TODO: paramtrisierte Typen mit Generics, Type Variablen müssen definiert werden.
// Wenn die RückgabeType eine TPH ist, wird als generic behandelt // Wenn die RückgabeType eine TPH ist, wird als generic behandelt
// z.B: Type = TPH K => wird eine Formal Type Parameter K$ erzeugt und Bound = Object // z.B: Type = TPH K => wird eine Formal Type Parameter K$ erzeugt und Bound = Object
if(!isConstructor) { if(!isConstructor) {
String ret = resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToSignature()); String ret = resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToSignature());
System.out.println("RET:::: " + ret); if(!ret.equals("V")) {
// if(ret.substring(0,4).equals("TPH ")) { // TODO TypeToSignature nochmal kontrollieren und schauen ob man dort wirklich
// String g = ret.substring(4,ret.length())+"$"; // T... braucht und L ...
if(genericsAndBounds.containsKey(ret)) { if(ret.contains("$") && !ret.contains("$$") && !ret.contains("<")) {
genericsAndBoundsMethod.put(ret, genericsAndBounds.get(ret)); if(genericsAndBounds.containsKey(ret)) {
}else { genericsAndBoundsMethod.put(ret.substring(1), genericsAndBounds.get(ret.substring(1)));
sw.visitFormalTypeParameter(ret); }else {
sw.visitClassBound().visitClassType(Type.getInternalName(Object.class)); sw.visitFormalTypeParameter(ret.substring(1));
genericsAndBoundsMethod.put(ret, Type.getInternalName(Object.class)); sw.visitClassBound().visitClassType(Type.getInternalName(Object.class));
sw.visitClassBound().visitEnd(); genericsAndBoundsMethod.put(ret.substring(1), Type.getInternalName(Object.class));
} sw.visitClassBound().visitEnd();
// } }
if(ret.contains("<")) {
RefType ref = (RefType) resultSet.resolveType(method.getReturnType()).resolvedType;
if(hasTPHs(ref)) {
createSignatureForParameterizedType(ref);
} }
if(ret.contains("<")) {
RefType ref = (RefType) resultSet.resolveType(method.getReturnType()).resolvedType;
if(hasTPHs(ref)) {
createSignatureForParameterizedType(ref);
}
System.out.println("HAS WC = " + hasWC(ref));
if(hasWC(ref))
createSigForParamTypeWithWC(ref);
}
} }
} }
@ -139,16 +148,14 @@ public class Signature {
RefTypeOrTPHOrWildcardOrGeneric t = methodParamsAndTypes.get(paramName); RefTypeOrTPHOrWildcardOrGeneric t = methodParamsAndTypes.get(paramName);
String pT = t.acceptTV(new TypeToSignature()); String pT = t.acceptTV(new TypeToSignature());
// S.o // S.o
// if(pT.substring(0,4).equals("TPH ")) {
if(t instanceof TypePlaceholder) { if(t instanceof TypePlaceholder) {
// String gP = pT.substring(4,pT.length())+"$";
String gP = t.acceptTV(new TypeToSignature()); String gP = t.acceptTV(new TypeToSignature());
if(!genericsAndBounds.containsKey(gP) && !genericsAndBoundsMethod.containsKey(gP)) { if(!genericsAndBounds.containsKey(gP.substring(1)) && !genericsAndBoundsMethod.containsKey(gP.substring(1))) {
sw.visitFormalTypeParameter(gP); sw.visitFormalTypeParameter(gP.substring(1));
String bound = Type.getInternalName(Object.class); String bound = Type.getInternalName(Object.class);
boolean isTypeVar = false; boolean isTypeVar = false;
for(GenericInsertPair pair : methodPairs) { for(GenericInsertPair pair : methodPairs) {
if(pT.substring(0,pT.length()).equals(pair.TA1.getName())) { if(pT.substring(1,pT.length()-1).equals(pair.TA1.getName())) {
bound = pair.TA2.getName()+"$"; bound = pair.TA2.getName()+"$";
isTypeVar = true; isTypeVar = true;
break; break;
@ -162,7 +169,7 @@ public class Signature {
sw.visitClassBound().visitEnd(); sw.visitClassBound().visitEnd();
} }
genericsAndBoundsMethod.put(gP, bound); genericsAndBoundsMethod.put(gP.substring(1), bound);
} }
} }
@ -170,6 +177,10 @@ public class Signature {
RefType ref = (RefType) methodParamsAndTypes.get(paramName); RefType ref = (RefType) methodParamsAndTypes.get(paramName);
if(hasTPHs(ref)) if(hasTPHs(ref))
createSignatureForParameterizedType(ref); createSignatureForParameterizedType(ref);
System.out.println("HAS WC = " + hasWC(ref));
if(hasWC(ref))
createSigForParamTypeWithWC(ref);
} }
for(GenericInsertPair p:methodPairs) { for(GenericInsertPair p:methodPairs) {
@ -207,7 +218,8 @@ public class Signature {
// parameter type deswegen ist true // parameter type deswegen ist true
doVisitParamsOrReturn(t,true); doVisitParamsOrReturn(t,true);
} }
if(isConstructor) { if(isConstructor ||
resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToSignature()).equals("V")) {
sw.visitReturnType().visitBaseType('V'); sw.visitReturnType().visitBaseType('V');
}else { }else {
RefTypeOrTPHOrWildcardOrGeneric returnType = method.getReturnType(); RefTypeOrTPHOrWildcardOrGeneric returnType = method.getReturnType();
@ -217,6 +229,35 @@ public class Signature {
// sw.visitEnd(); // sw.visitEnd();
} }
private void createSigForParamTypeWithWC(RefType ref) {
for(RefTypeOrTPHOrWildcardOrGeneric p : ref.getParaList()) {
if(p instanceof WildcardType) {
if(((WildcardType) p).getInnerType() instanceof GenericRefType) {
String name = new TypeToSignature().visit((GenericRefType)((WildcardType) p).getInnerType());
System.out.println("NAME WC = " + name);
if(!genericsAndBoundsMethod.containsKey(name) && !genericsAndBounds.containsKey(name)) {
sw.visitFormalTypeParameter(name);
sw.visitClassBound().visitClassType(Type.getInternalName(Object.class));
sw.visitClassBound().visitEnd();
genericsAndBoundsMethod.put(name, Type.getInternalName(Object.class));
}
}
}
}
}
private boolean hasWC(RefType ref) {
for(RefTypeOrTPHOrWildcardOrGeneric p : ref.getParaList()) {
System.out.println("HAS WCs: " + p.acceptTV(new TypeToString()));
System.out.println("HAS WCs: " + p.getClass());
if(p.acceptTV(new TypeToString()).contains("WC"))
return true;
}
return false;
}
private void createSignatureForParameterizedType(RefType ref) { private void createSignatureForParameterizedType(RefType ref) {
ArrayList<GenericInsertPair> allPairs = getAllPairs(ref); ArrayList<GenericInsertPair> allPairs = getAllPairs(ref);
allPairs.addAll(methodPairs); allPairs.addAll(methodPairs);
@ -346,7 +387,7 @@ public class Signature {
private boolean hasTPHs(RefType ref) { private boolean hasTPHs(RefType ref) {
for(RefTypeOrTPHOrWildcardOrGeneric p : ref.getParaList()) { for(RefTypeOrTPHOrWildcardOrGeneric p : ref.getParaList()) {
System.out.println(p.acceptTV(new TypeToString())); System.out.println("HAS TPHs: " + p.acceptTV(new TypeToString()));
if(p.acceptTV(new TypeToString()).contains("WC")){ if(p.acceptTV(new TypeToString()).contains("WC")){
continue; continue;
} }
@ -378,7 +419,7 @@ public class Signature {
break; break;
case "GRT": case "GRT":
GenericRefType g = (GenericRefType) t; GenericRefType g = (GenericRefType) t;
sv.visitTypeVariable(g.acceptTV(new TypeToSignature())); sv.visitTypeVariable(g.acceptTV(new TypeToSignature()).substring(1));
break; break;
case "TPH": case "TPH":
RefTypeOrTPHOrWildcardOrGeneric r = resultSet.resolveType(t).resolvedType; RefTypeOrTPHOrWildcardOrGeneric r = resultSet.resolveType(t).resolvedType;
@ -388,19 +429,56 @@ public class Signature {
// das braucht man nicht es reicht: sv.visitTypeVariable(r.acceptTV(new TypeToSignature()) // das braucht man nicht es reicht: sv.visitTypeVariable(r.acceptTV(new TypeToSignature())
// //
// if(!r.acceptTV(new TypeToSignature()).substring(0, 4).equals("TPH ")) {
String sig2 = r.acceptTV(new TypeToSignature()); String sig2 = r.acceptTV(new TypeToSignature());
if(!(r instanceof TypePlaceholder)) { if(!(r instanceof TypePlaceholder)) {
if(sig2.contains("$$")) {
System.out.println(" Signature FUN$$: "+r);
sv.visitInterface().visitClassType(sig2.substring(1, sig2.length()));
} else {
sv.visitClassType(sig2.substring(1, sig2.length()));
}
// sv.visitInterface().visitClassType(r.acceptTV(new TypeToSignature()));
// sv.visitClassType(r.acceptTV(new TypeToSignature()));
sv.visitClassType(sig2.substring(1, sig2.length()));
} else { } else {
System.out.println(r.getClass()+" Signature TPH: "+r.acceptTV(new TypeToSignature())); System.out.println(r.getClass()+" Signature TPH: "+r.acceptTV(new TypeToSignature()));
// sv.visitTypeVariable(r.acceptTV(new TypeToSignature()).substring(4)+"$");
sv.visitTypeVariable(sig2.substring(1, sig2.length())); sv.visitTypeVariable(sig2.substring(1, sig2.length()));
} }
break;
case "SWC":
System.out.println("SWC---Signature");
SuperWildcardType swc = (SuperWildcardType) t;
String sigInner = swc.getInnerType().acceptTV(new TypeToSignature());
if(swc.getInnerType() instanceof TypePlaceholder) {
sv.visitTypeArgument('-').visitTypeVariable(sigInner.substring(1, sigInner.length()));
} else if(swc.getInnerType() instanceof RefType) {
if(sigInner.contains("$$")) {
sv.visitTypeArgument('-').visitInterface().visitClassType(sigInner.substring(1,sigInner.length()));
}else {
sv.visitTypeArgument('-').visitClassType(sigInner.substring(1,sigInner.length()));
}
}else {
sv.visitTypeArgument('-').visitTypeVariable(sigInner.substring(1));
}
break;
case "EWC":
System.out.println("EWC---Signature");
SuperWildcardType ewc = (SuperWildcardType) t;
String esigInner = ewc.getInnerType().acceptTV(new TypeToSignature());
if(ewc.getInnerType() instanceof TypePlaceholder) {
sv.visitTypeArgument('+').visitTypeVariable(esigInner.substring(1, esigInner.length()));
} else if(ewc.getInnerType() instanceof RefType) {
if(esigInner.contains("$$")) {
sv.visitTypeArgument('+').visitInterface().visitClassType(esigInner.substring(1,esigInner.length()));
}else {
sv.visitTypeArgument('+').visitClassType(esigInner.substring(1,esigInner.length()));
}
}else {
sv.visitTypeArgument('+').visitTypeVariable(esigInner.substring(1));
}
break; break;
default: default:
if(!isParameterType) if(!isParameterType)
@ -448,7 +526,8 @@ public class Signature {
} }
} }
} }
sw.visitSuperclass().visitClassType(classOrInterface.getSuperClass().acceptTV(new TypeToDescriptor()));; String sClass = classOrInterface.getSuperClass().acceptTV(new TypeToSignature());
sw.visitSuperclass().visitClassType(sClass.substring(1, sClass.length()-1));
sw.visitEnd(); sw.visitEnd();
} }
/** /**

View File

@ -15,6 +15,8 @@ public class TypeToSignature implements TypeVisitor<String> {
@Override @Override
public String visit(RefType refType) { public String visit(RefType refType) {
if(refType.getName().toString().equals("void"))
return "V";
// return refType.toString().replace(".", "/"); // return refType.toString().replace(".", "/");
String params = ""; String params = "";
if(refType.getParaList().size()>0){ if(refType.getParaList().size()>0){
@ -32,7 +34,9 @@ public class TypeToSignature implements TypeVisitor<String> {
// params += "L"+param.toString().replace(".", "/"); // params += "L"+param.toString().replace(".", "/");
// } // }
params += param.acceptTV(new TypeToSignature()); params += param.acceptTV(new TypeToSignature());
if(it.hasNext())params += ";"; if(!(param instanceof RefType))
params += ";";
// if(it.hasNext())params += ";";
} }
params += ">"; params += ">";
} }

View File

@ -110,6 +110,13 @@ public class JavaTXCompiler {
TypeUnify unify = new TypeUnify(); TypeUnify unify = new TypeUnify();
Set<Set<UnifyPair>> results = new HashSet<>(); Set<Set<UnifyPair>> results = new HashSet<>();
try {
FileWriter logFile = new FileWriter(new File(System.getProperty("user.dir")+"/test/logFiles/"+"log"));
logFile.write("FC:\\" + finiteClosure.toString()+"\n");
for(SourceFile sf : this.sourceFiles.values()) {
logFile.write(ASTTypePrinter.print(sf));
}
logFile.flush();
Set<List<Constraint<UnifyPair>>> cardProd = unifyCons.cartesianProduct(); Set<List<Constraint<UnifyPair>>> cardProd = unifyCons.cartesianProduct();
for (List<Constraint<UnifyPair>> xCons : cardProd ){ for (List<Constraint<UnifyPair>> xCons : cardProd ){
Set<UnifyPair> xConsSet = new HashSet<>(); Set<UnifyPair> xConsSet = new HashSet<>();
@ -168,11 +175,15 @@ public class JavaTXCompiler {
return y; } ) return y; } )
.collect(Collectors.toCollection(HashSet::new)); .collect(Collectors.toCollection(HashSet::new));
varianceInheritance(xConsSet); varianceInheritance(xConsSet);
Set<Set<UnifyPair>> result = unify.unifySequential(xConsSet, finiteClosure); Set<Set<UnifyPair>> result = unify.unifySequential(xConsSet, finiteClosure, logFile, log);
//Set<Set<UnifyPair>> result = unify.unify(xConsSet, finiteClosure); //Set<Set<UnifyPair>> result = unify.unify(xConsSet, finiteClosure);
System.out.println("RESULT: " + result);
logFile.write("RES: " + result.toString()+"\n");
logFile.flush();
results.addAll(result); results.addAll(result);
} }
}
catch (IOException e) { }
return results.stream().map((unifyPairs -> return results.stream().map((unifyPairs ->
new ResultSet(UnifyTypeFactory.convert(unifyPairs, generateTPHMap(cons))))).collect(Collectors.toList()); new ResultSet(UnifyTypeFactory.convert(unifyPairs, generateTPHMap(cons))))).collect(Collectors.toList());
@ -206,8 +217,8 @@ public class JavaTXCompiler {
eq1.stream().forEach(x -> { x.getLhsType().accept(new distributeVariance(), a.getVariance());}); eq1.stream().forEach(x -> { x.getLhsType().accept(new distributeVariance(), a.getVariance());});
phSetVariance = new ArrayList<>(phSet); phSetVariance = new ArrayList<>(phSet);
phSetVariance.removeIf(x -> (x.getVariance() == 0 || usedTPH.contains(x))); phSetVariance.removeIf(x -> (x.getVariance() == 0 || usedTPH.contains(x)));
} }
} }
private Map<String, TypePlaceholder> generateTPHMap(ConstraintSet<Pair> constraints) { private Map<String, TypePlaceholder> generateTPHMap(ConstraintSet<Pair> constraints) {
HashMap<String, TypePlaceholder> ret = new HashMap<>(); HashMap<String, TypePlaceholder> ret = new HashMap<>();

View File

@ -23,7 +23,6 @@ public class StatementGenerator {
private JavaClassRegistry reg; private JavaClassRegistry reg;
private Map<String, RefTypeOrTPHOrWildcardOrGeneric> localVars; private Map<String, RefTypeOrTPHOrWildcardOrGeneric> localVars;
private GenericsRegistry generics; private GenericsRegistry generics;
private String VAR_KEYWORD = "var";
public StatementGenerator(JavaClassRegistry reg, GenericsRegistry generics, Map<String, RefTypeOrTPHOrWildcardOrGeneric> localVars){ public StatementGenerator(JavaClassRegistry reg, GenericsRegistry generics, Map<String, RefTypeOrTPHOrWildcardOrGeneric> localVars){
this.reg = reg; this.reg = reg;
@ -406,7 +405,7 @@ public class StatementGenerator {
throw new NotImplementedException(); throw new NotImplementedException();
} }
RefTypeOrTPHOrWildcardOrGeneric type; RefTypeOrTPHOrWildcardOrGeneric type;
if(declaration.unannTypeOrAuto().unannType().getText().equals(VAR_KEYWORD)){ if(declaration.unannTypeOrAuto().unannType() == null){
type = TypePlaceholder.fresh(declaration.getStart()); type = TypePlaceholder.fresh(declaration.getStart());
}else{ }else{
type = TypeGenerator.convert(declaration.unannTypeOrAuto().unannType(), reg, generics); type = TypeGenerator.convert(declaration.unannTypeOrAuto().unannType(), reg, generics);
@ -446,7 +445,7 @@ public class StatementGenerator {
} }
return (new Assign(new AssignToField( return (new Assign(new AssignToField(
new FieldVar(new This(varDecl.getStart()), name.getText(), new FieldVar(new This(varDecl.getStart()), name.getText(),
new Void(varDecl.getStart()), varDecl.getStart())), type, varDecl.getStart())),
initValue, name.getSymbol())); initValue, name.getSymbol()));
} }
@ -584,7 +583,10 @@ public class StatementGenerator {
if(expression.equalityExpression() == null){ if(expression.equalityExpression() == null){
return convert(expression.relationalExpression()); return convert(expression.relationalExpression());
}else{ }else{
throw new NotImplementedException(); String operator = expression.getChild(1).getText();
Expression leftSide = convert(expression.equalityExpression());
Expression rightSide = convert(expression.relationalExpression());
return new BinaryExpr(convertBinaryOperator(operator), TypePlaceholder.fresh(expression.getStart()), leftSide, rightSide, expression.getStart());
} }
} }
@ -620,8 +622,12 @@ public class StatementGenerator {
return BinaryExpr.Operator.BIGGERTHAN; return BinaryExpr.Operator.BIGGERTHAN;
}else if(operator.equals(">=")) { }else if(operator.equals(">=")) {
return BinaryExpr.Operator.BIGGEREQUAL; return BinaryExpr.Operator.BIGGEREQUAL;
} else if(operator.equals("<=")) { } else if(operator.equals("<=")) {
return BinaryExpr.Operator.LESSEQUAL; return BinaryExpr.Operator.LESSEQUAL;
} else if(operator.equals("==")) {
return BinaryExpr.Operator.EQUAL;
} else if(operator.equals("!=")) {
return BinaryExpr.Operator.NOTEQUAL;
} else { } else {
throw new NotImplementedException(); throw new NotImplementedException();
} }
@ -745,6 +751,7 @@ public class StatementGenerator {
if(e.classInstanceCreationExpression_lf_primary() != null){ if(e.classInstanceCreationExpression_lf_primary() != null){
throw new NotImplementedException(); throw new NotImplementedException();
}else if(e.fieldAccess_lf_primary() != null){ }else if(e.fieldAccess_lf_primary() != null){
throw new NotImplementedException(); throw new NotImplementedException();
}else if(e.arrayAccess_lf_primary() != null){ }else if(e.arrayAccess_lf_primary() != null){
throw new NotImplementedException(); throw new NotImplementedException();
@ -799,8 +806,6 @@ public class StatementGenerator {
if(newExpression.typeArgumentsOrDiamond()!= null){ if(newExpression.typeArgumentsOrDiamond()!= null){
if(newExpression.typeArgumentsOrDiamond().typeArguments()!=null){ if(newExpression.typeArgumentsOrDiamond().typeArguments()!=null){
genericArgs = newExpression.typeArgumentsOrDiamond().typeArguments(); genericArgs = newExpression.typeArgumentsOrDiamond().typeArguments();
}else {
throw new NotImplementedException();
} }
} }
if(newExpression.typeArguments()!= null)throw new NotImplementedException(); if(newExpression.typeArguments()!= null)throw new NotImplementedException();

View File

@ -5,6 +5,7 @@ import de.dhbwstuttgart.exceptions.NotImplementedException;
import java.lang.ClassNotFoundException; import java.lang.ClassNotFoundException;
import de.dhbwstuttgart.exceptions.TypeinferenceException; import de.dhbwstuttgart.exceptions.TypeinferenceException;
import de.dhbwstuttgart.parser.NullToken;
import de.dhbwstuttgart.parser.antlr.Java8Parser; import de.dhbwstuttgart.parser.antlr.Java8Parser;
import de.dhbwstuttgart.parser.scope.GatherNames; import de.dhbwstuttgart.parser.scope.GatherNames;
import de.dhbwstuttgart.parser.scope.GenericsRegistry; import de.dhbwstuttgart.parser.scope.GenericsRegistry;
@ -195,6 +196,7 @@ public class SyntaxTreeGenerator{
superClass = new RefType(ASTFactory.createObjectClass().getClassName(), ctx.getStart()); superClass = new RefType(ASTFactory.createObjectClass().getClassName(), ctx.getStart());
} }
List<Field> fielddecl = convertFields(ctx.classBody(), generics); List<Field> fielddecl = convertFields(ctx.classBody(), generics);
//fieldInitializations = generateFieldInitializations(ctx.classBody(), generics);
List<Method> methods = convertMethods(ctx.classBody(), name, superClass, generics); List<Method> methods = convertMethods(ctx.classBody(), name, superClass, generics);
List<Constructor> konstruktoren = new ArrayList<>(); List<Constructor> konstruktoren = new ArrayList<>();
for(int i = 0; i<methods.size();i++){ for(int i = 0; i<methods.size();i++){
@ -218,6 +220,32 @@ public class SyntaxTreeGenerator{
isInterface, implementedInterfaces, offset); isInterface, implementedInterfaces, offset);
} }
/*
private List<Statement> generateFieldInitializations(Java8Parser.ClassBodyContext classBodyContext, GenericsRegistry generics) {
List<Statement> ret = new ArrayList<>();
for(Java8Parser.ClassBodyDeclarationContext classMember : classBodyContext.classBodyDeclaration()){
if(classMember.classMemberDeclaration() != null){
Java8Parser.ClassMemberDeclarationContext classMemberDeclarationContext = classMember.classMemberDeclaration();
if(classMemberDeclarationContext.fieldDeclaration() != null
&& classMemberDeclarationContext.fieldDeclaration().variableDeclaratorList() != null){
for(Java8Parser.VariableDeclaratorContext ctx : classMemberDeclarationContext.fieldDeclaration().variableDeclaratorList().variableDeclarator()) {
String fieldName = ctx.variableDeclaratorId().Identifier().getText();
if(ctx.variableDeclaratorId().dims() != null)throw new NotImplementedException();
Token offset = ctx.getStart();
RefTypeOrTPHOrWildcardOrGeneric fieldType;
for(Field f : fields)
AssignToField leftSide = new AssignToField(new FieldVar(new This(offset), fieldName, ));
ret.addAll();
}
}else if(classMemberDeclarationContext.methodDeclaration()!= null){
//Do nothing!
}
}
}
return ret;
}
*/
private List<RefType> convert(Java8Parser.SuperinterfacesContext ctx, GenericsRegistry generics) { private List<RefType> convert(Java8Parser.SuperinterfacesContext ctx, GenericsRegistry generics) {
if(ctx == null)return new ArrayList<>(); if(ctx == null)return new ArrayList<>();
return convert(ctx.interfaceTypeList(), generics); return convert(ctx.interfaceTypeList(), generics);
@ -310,8 +338,9 @@ public class SyntaxTreeGenerator{
modifiers+=(convert(fieldModifierContext)); modifiers+=(convert(fieldModifierContext));
} }
RefTypeOrTPHOrWildcardOrGeneric fieldType; RefTypeOrTPHOrWildcardOrGeneric fieldType;
if(fieldDeclarationContext.unannType() != null){ if(fieldDeclarationContext.unannTypeOrAuto() != null
fieldType = TypeGenerator.convert(fieldDeclarationContext.unannType(), reg, generics); && fieldDeclarationContext.unannTypeOrAuto().unannType() != null){
fieldType = TypeGenerator.convert(fieldDeclarationContext.unannTypeOrAuto().unannType(), reg, generics);
}else{ }else{
fieldType = TypePlaceholder.fresh(fieldDeclarationContext.getStart()); fieldType = TypePlaceholder.fresh(fieldDeclarationContext.getStart());
} }
@ -320,9 +349,7 @@ public class SyntaxTreeGenerator{
if(varCtx.variableInitializer() != null){ if(varCtx.variableInitializer() != null){
initializeField(varCtx, fieldType, generics); initializeField(varCtx, fieldType, generics);
} }
else{ ret.add(new Field(fieldName,fieldType,modifiers,varCtx.getStart()));
ret.add(new Field(fieldName,fieldType,modifiers,varCtx.getStart()));
}
} }
return ret; return ret;
} }
@ -427,6 +454,9 @@ public class SyntaxTreeGenerator{
GenericsRegistry ret = new GenericsRegistry(this.globalGenerics); GenericsRegistry ret = new GenericsRegistry(this.globalGenerics);
ret.putAll(generics); ret.putAll(generics);
if(ctx == null || ctx.typeParameterList() == null)return ret; if(ctx == null || ctx.typeParameterList() == null)return ret;
for(Java8Parser.TypeParameterContext tp : ctx.typeParameterList().typeParameter()){
ret.put(tp.Identifier().getText(), new GenericContext(parentClass, parentMethod));
}
for(Java8Parser.TypeParameterContext tp : ctx.typeParameterList().typeParameter()){ for(Java8Parser.TypeParameterContext tp : ctx.typeParameterList().typeParameter()){
TypeGenerator.convert(tp, parentClass, parentMethod, reg, ret); TypeGenerator.convert(tp, parentClass, parentMethod, reg, ret);
} }

View File

@ -77,7 +77,6 @@ public class TypeGenerator {
List<RefTypeOrTPHOrWildcardOrGeneric> bounds = TypeGenerator.convert(typeParameter.typeBound(),reg, generics); List<RefTypeOrTPHOrWildcardOrGeneric> bounds = TypeGenerator.convert(typeParameter.typeBound(),reg, generics);
GenericTypeVar ret = new GenericTypeVar(name, bounds, typeParameter.getStart(), typeParameter.getStop()); GenericTypeVar ret = new GenericTypeVar(name, bounds, typeParameter.getStart(), typeParameter.getStop());
generics.put(name, new GenericContext(parentClass, parentMethod));
return ret; return ret;
} }
@ -92,7 +91,7 @@ public class TypeGenerator {
return ret; return ret;
} }
if(typeBoundContext.classOrInterfaceType() != null){ if(typeBoundContext.classOrInterfaceType() != null){
ret.add(convert(typeBoundContext.classOrInterfaceType())); ret.add(convert(typeBoundContext.classOrInterfaceType(), reg, generics));
if(typeBoundContext.additionalBound() != null) if(typeBoundContext.additionalBound() != null)
for(Java8Parser.AdditionalBoundContext addCtx : typeBoundContext.additionalBound()){ for(Java8Parser.AdditionalBoundContext addCtx : typeBoundContext.additionalBound()){
ret.add(convert(addCtx.interfaceType())); ret.add(convert(addCtx.interfaceType()));
@ -103,8 +102,19 @@ public class TypeGenerator {
} }
} }
private static RefTypeOrTPHOrWildcardOrGeneric convert(Java8Parser.ClassOrInterfaceTypeContext classOrInterfaceTypeContext) { private static RefTypeOrTPHOrWildcardOrGeneric convert(Java8Parser.ClassOrInterfaceTypeContext classOrInterfaceTypeContext, JavaClassRegistry reg, GenericsRegistry generics) {
throw new NotImplementedException(); Java8Parser.ClassType_lfno_classOrInterfaceTypeContext ctx = classOrInterfaceTypeContext.classType_lfno_classOrInterfaceType();
if(ctx.typeArguments() != null &&
classOrInterfaceTypeContext.classType_lf_classOrInterfaceType().size() > 0)
throw new NotImplementedException();
String typeName = ctx.Identifier().toString();
Java8Parser.ClassType_lf_classOrInterfaceTypeContext nextCtx = null;
for(Java8Parser.ClassType_lf_classOrInterfaceTypeContext forEachCtx : classOrInterfaceTypeContext.classType_lf_classOrInterfaceType()){
nextCtx = forEachCtx;
typeName += "." + forEachCtx.Identifier().toString();
}
Java8Parser.TypeArgumentsContext arguments = nextCtx!=null?nextCtx.typeArguments():ctx.typeArguments();
return convertTypeName(typeName, arguments, classOrInterfaceTypeContext.getStart(), reg, generics);
} }
private static RefTypeOrTPHOrWildcardOrGeneric convert(Java8Parser.InterfaceTypeContext interfaceTypeContext) { private static RefTypeOrTPHOrWildcardOrGeneric convert(Java8Parser.InterfaceTypeContext interfaceTypeContext) {
@ -114,8 +124,7 @@ public class TypeGenerator {
public static RefTypeOrTPHOrWildcardOrGeneric convert(Java8Parser.ReferenceTypeContext referenceTypeContext, JavaClassRegistry reg, GenericsRegistry generics) { public static RefTypeOrTPHOrWildcardOrGeneric convert(Java8Parser.ReferenceTypeContext referenceTypeContext, JavaClassRegistry reg, GenericsRegistry generics) {
if(referenceTypeContext.classOrInterfaceType() != null){ if(referenceTypeContext.classOrInterfaceType() != null){
if(referenceTypeContext.classOrInterfaceType().classType_lfno_classOrInterfaceType()!= null){ if(referenceTypeContext.classOrInterfaceType().classType_lfno_classOrInterfaceType()!= null){
Java8Parser.ClassType_lfno_classOrInterfaceTypeContext ctx = referenceTypeContext.classOrInterfaceType().classType_lfno_classOrInterfaceType(); return convert(referenceTypeContext.classOrInterfaceType(), reg, generics);//return convertTypeName(referenceTypeContext.getText(), ctx.typeArguments(),referenceTypeContext.getStart(), reg, generics);
return convertTypeName(ctx.Identifier().toString(), ctx.typeArguments(),referenceTypeContext.getStart(), reg, generics);
}else{ }else{
throw new NotImplementedException(); throw new NotImplementedException();
} }

View File

@ -109,7 +109,6 @@ classOrInterfaceType
| interfaceType_lfno_classOrInterfaceType | interfaceType_lfno_classOrInterfaceType
) )
( classType_lf_classOrInterfaceType ( classType_lf_classOrInterfaceType
| interfaceType_lf_classOrInterfaceType
)* )*
; ;
@ -333,7 +332,7 @@ classMemberDeclaration
; ;
fieldDeclaration fieldDeclaration
: fieldModifier* unannType? variableDeclaratorList ';' : fieldModifier* unannTypeOrAuto? variableDeclaratorList ';'
; ;
fieldModifier fieldModifier
@ -732,6 +731,7 @@ localVariableDeclarationStatement
unannTypeOrAuto unannTypeOrAuto
: unannType : unannType
| 'var'
; ;
localVariableDeclaration localVariableDeclaration

View File

@ -1,205 +1,207 @@
ABSTRACT=1 T__0=1
ASSERT=2 ABSTRACT=2
BOOLEAN=3 ASSERT=3
BREAK=4 BOOLEAN=4
BYTE=5 BREAK=5
CASE=6 BYTE=6
CATCH=7 CASE=7
CHAR=8 CATCH=8
CLASS=9 CHAR=9
CONST=10 CLASS=10
CONTINUE=11 CONST=11
DEFAULT=12 CONTINUE=12
DO=13 DEFAULT=13
DOUBLE=14 DO=14
ELSE=15 DOUBLE=15
ENUM=16 ELSE=16
EXTENDS=17 ENUM=17
FINAL=18 EXTENDS=18
FINALLY=19 FINAL=19
FLOAT=20 FINALLY=20
FOR=21 FLOAT=21
IF=22 FOR=22
GOTO=23 IF=23
IMPLEMENTS=24 GOTO=24
IMPORT=25 IMPLEMENTS=25
INSTANCEOF=26 IMPORT=26
INT=27 INSTANCEOF=27
INTERFACE=28 INT=28
LONG=29 INTERFACE=29
NATIVE=30 LONG=30
NEW=31 NATIVE=31
PACKAGE=32 NEW=32
PRIVATE=33 PACKAGE=33
PROTECTED=34 PRIVATE=34
PUBLIC=35 PROTECTED=35
RETURN=36 PUBLIC=36
SHORT=37 RETURN=37
STATIC=38 SHORT=38
STRICTFP=39 STATIC=39
SUPER=40 STRICTFP=40
SWITCH=41 SUPER=41
SYNCHRONIZED=42 SWITCH=42
THIS=43 SYNCHRONIZED=43
THROW=44 THIS=44
THROWS=45 THROW=45
TRANSIENT=46 THROWS=46
TRY=47 TRANSIENT=47
VOID=48 TRY=48
VOLATILE=49 VOID=49
WHILE=50 VOLATILE=50
IntegerLiteral=51 WHILE=51
FloatingPointLiteral=52 IntegerLiteral=52
BooleanLiteral=53 FloatingPointLiteral=53
CharacterLiteral=54 BooleanLiteral=54
StringLiteral=55 CharacterLiteral=55
NullLiteral=56 StringLiteral=56
LPAREN=57 NullLiteral=57
RPAREN=58 LPAREN=58
LBRACE=59 RPAREN=59
RBRACE=60 LBRACE=60
LBRACK=61 RBRACE=61
RBRACK=62 LBRACK=62
SEMI=63 RBRACK=63
COMMA=64 SEMI=64
DOT=65 COMMA=65
ASSIGN=66 DOT=66
GT=67 ASSIGN=67
LT=68 GT=68
BANG=69 LT=69
TILDE=70 BANG=70
QUESTION=71 TILDE=71
COLON=72 QUESTION=72
EQUAL=73 COLON=73
LE=74 EQUAL=74
GE=75 LE=75
NOTEQUAL=76 GE=76
AND=77 NOTEQUAL=77
OR=78 AND=78
INC=79 OR=79
DEC=80 INC=80
ADD=81 DEC=81
SUB=82 ADD=82
MUL=83 SUB=83
DIV=84 MUL=84
BITAND=85 DIV=85
BITOR=86 BITAND=86
CARET=87 BITOR=87
MOD=88 CARET=88
ARROW=89 MOD=89
COLONCOLON=90 ARROW=90
ADD_ASSIGN=91 COLONCOLON=91
SUB_ASSIGN=92 ADD_ASSIGN=92
MUL_ASSIGN=93 SUB_ASSIGN=93
DIV_ASSIGN=94 MUL_ASSIGN=94
AND_ASSIGN=95 DIV_ASSIGN=95
OR_ASSIGN=96 AND_ASSIGN=96
XOR_ASSIGN=97 OR_ASSIGN=97
MOD_ASSIGN=98 XOR_ASSIGN=98
LSHIFT_ASSIGN=99 MOD_ASSIGN=99
RSHIFT_ASSIGN=100 LSHIFT_ASSIGN=100
URSHIFT_ASSIGN=101 RSHIFT_ASSIGN=101
Identifier=102 URSHIFT_ASSIGN=102
AT=103 Identifier=103
ELLIPSIS=104 AT=104
WS=105 ELLIPSIS=105
COMMENT=106 WS=106
LINE_COMMENT=107 COMMENT=107
'abstract'=1 LINE_COMMENT=108
'assert'=2 'var'=1
'boolean'=3 'abstract'=2
'break'=4 'assert'=3
'byte'=5 'boolean'=4
'case'=6 'break'=5
'catch'=7 'byte'=6
'char'=8 'case'=7
'class'=9 'catch'=8
'const'=10 'char'=9
'continue'=11 'class'=10
'default'=12 'const'=11
'do'=13 'continue'=12
'double'=14 'default'=13
'else'=15 'do'=14
'enum'=16 'double'=15
'extends'=17 'else'=16
'final'=18 'enum'=17
'finally'=19 'extends'=18
'float'=20 'final'=19
'for'=21 'finally'=20
'if'=22 'float'=21
'goto'=23 'for'=22
'implements'=24 'if'=23
'import'=25 'goto'=24
'instanceof'=26 'implements'=25
'int'=27 'import'=26
'interface'=28 'instanceof'=27
'long'=29 'int'=28
'native'=30 'interface'=29
'new'=31 'long'=30
'package'=32 'native'=31
'private'=33 'new'=32
'protected'=34 'package'=33
'public'=35 'private'=34
'return'=36 'protected'=35
'short'=37 'public'=36
'static'=38 'return'=37
'strictfp'=39 'short'=38
'super'=40 'static'=39
'switch'=41 'strictfp'=40
'synchronized'=42 'super'=41
'this'=43 'switch'=42
'throw'=44 'synchronized'=43
'throws'=45 'this'=44
'transient'=46 'throw'=45
'try'=47 'throws'=46
'void'=48 'transient'=47
'volatile'=49 'try'=48
'while'=50 'void'=49
'null'=56 'volatile'=50
'('=57 'while'=51
')'=58 'null'=57
'{'=59 '('=58
'}'=60 ')'=59
'['=61 '{'=60
']'=62 '}'=61
';'=63 '['=62
','=64 ']'=63
'.'=65 ';'=64
'='=66 ','=65
'>'=67 '.'=66
'<'=68 '='=67
'!'=69 '>'=68
'~'=70 '<'=69
'?'=71 '!'=70
':'=72 '~'=71
'=='=73 '?'=72
'<='=74 ':'=73
'>='=75 '=='=74
'!='=76 '<='=75
'&&'=77 '>='=76
'||'=78 '!='=77
'++'=79 '&&'=78
'--'=80 '||'=79
'+'=81 '++'=80
'-'=82 '--'=81
'*'=83 '+'=82
'/'=84 '-'=83
'&'=85 '*'=84
'|'=86 '/'=85
'^'=87 '&'=86
'%'=88 '|'=87
'->'=89 '^'=88
'::'=90 '%'=89
'+='=91 '->'=90
'-='=92 '::'=91
'*='=93 '+='=92
'/='=94 '-='=93
'&='=95 '*='=94
'|='=96 '/='=95
'^='=97 '&='=96
'%='=98 '|='=97
'<<='=99 '^='=98
'>>='=100 '%='=99
'>>>='=101 '<<='=100
'@'=103 '>>='=101
'...'=104 '>>>='=102
'@'=104
'...'=105

View File

@ -17,23 +17,23 @@ public class Java8Lexer extends Lexer {
protected static final PredictionContextCache _sharedContextCache = protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache(); new PredictionContextCache();
public static final int public static final int
ABSTRACT=1, ASSERT=2, BOOLEAN=3, BREAK=4, BYTE=5, CASE=6, CATCH=7, CHAR=8, T__0=1, ABSTRACT=2, ASSERT=3, BOOLEAN=4, BREAK=5, BYTE=6, CASE=7, CATCH=8,
CLASS=9, CONST=10, CONTINUE=11, DEFAULT=12, DO=13, DOUBLE=14, ELSE=15, CHAR=9, CLASS=10, CONST=11, CONTINUE=12, DEFAULT=13, DO=14, DOUBLE=15,
ENUM=16, EXTENDS=17, FINAL=18, FINALLY=19, FLOAT=20, FOR=21, IF=22, GOTO=23, ELSE=16, ENUM=17, EXTENDS=18, FINAL=19, FINALLY=20, FLOAT=21, FOR=22,
IMPLEMENTS=24, IMPORT=25, INSTANCEOF=26, INT=27, INTERFACE=28, LONG=29, IF=23, GOTO=24, IMPLEMENTS=25, IMPORT=26, INSTANCEOF=27, INT=28, INTERFACE=29,
NATIVE=30, NEW=31, PACKAGE=32, PRIVATE=33, PROTECTED=34, PUBLIC=35, RETURN=36, LONG=30, NATIVE=31, NEW=32, PACKAGE=33, PRIVATE=34, PROTECTED=35, PUBLIC=36,
SHORT=37, STATIC=38, STRICTFP=39, SUPER=40, SWITCH=41, SYNCHRONIZED=42, RETURN=37, SHORT=38, STATIC=39, STRICTFP=40, SUPER=41, SWITCH=42, SYNCHRONIZED=43,
THIS=43, THROW=44, THROWS=45, TRANSIENT=46, TRY=47, VOID=48, VOLATILE=49, THIS=44, THROW=45, THROWS=46, TRANSIENT=47, TRY=48, VOID=49, VOLATILE=50,
WHILE=50, IntegerLiteral=51, FloatingPointLiteral=52, BooleanLiteral=53, WHILE=51, IntegerLiteral=52, FloatingPointLiteral=53, BooleanLiteral=54,
CharacterLiteral=54, StringLiteral=55, NullLiteral=56, LPAREN=57, RPAREN=58, CharacterLiteral=55, StringLiteral=56, NullLiteral=57, LPAREN=58, RPAREN=59,
LBRACE=59, RBRACE=60, LBRACK=61, RBRACK=62, SEMI=63, COMMA=64, DOT=65, LBRACE=60, RBRACE=61, LBRACK=62, RBRACK=63, SEMI=64, COMMA=65, DOT=66,
ASSIGN=66, GT=67, LT=68, BANG=69, TILDE=70, QUESTION=71, COLON=72, EQUAL=73, ASSIGN=67, GT=68, LT=69, BANG=70, TILDE=71, QUESTION=72, COLON=73, EQUAL=74,
LE=74, GE=75, NOTEQUAL=76, AND=77, OR=78, INC=79, DEC=80, ADD=81, SUB=82, LE=75, GE=76, NOTEQUAL=77, AND=78, OR=79, INC=80, DEC=81, ADD=82, SUB=83,
MUL=83, DIV=84, BITAND=85, BITOR=86, CARET=87, MOD=88, ARROW=89, COLONCOLON=90, MUL=84, DIV=85, BITAND=86, BITOR=87, CARET=88, MOD=89, ARROW=90, COLONCOLON=91,
ADD_ASSIGN=91, SUB_ASSIGN=92, MUL_ASSIGN=93, DIV_ASSIGN=94, AND_ASSIGN=95, ADD_ASSIGN=92, SUB_ASSIGN=93, MUL_ASSIGN=94, DIV_ASSIGN=95, AND_ASSIGN=96,
OR_ASSIGN=96, XOR_ASSIGN=97, MOD_ASSIGN=98, LSHIFT_ASSIGN=99, RSHIFT_ASSIGN=100, OR_ASSIGN=97, XOR_ASSIGN=98, MOD_ASSIGN=99, LSHIFT_ASSIGN=100, RSHIFT_ASSIGN=101,
URSHIFT_ASSIGN=101, Identifier=102, AT=103, ELLIPSIS=104, WS=105, COMMENT=106, URSHIFT_ASSIGN=102, Identifier=103, AT=104, ELLIPSIS=105, WS=106, COMMENT=107,
LINE_COMMENT=107; LINE_COMMENT=108;
public static String[] channelNames = { public static String[] channelNames = {
"DEFAULT_TOKEN_CHANNEL", "HIDDEN" "DEFAULT_TOKEN_CHANNEL", "HIDDEN"
}; };
@ -43,9 +43,9 @@ public class Java8Lexer extends Lexer {
}; };
public static final String[] ruleNames = { public static final String[] ruleNames = {
"ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH", "CHAR", "T__0", "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH",
"CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE", "ENUM", "CHAR", "CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE",
"EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF", "GOTO", "IMPLEMENTS", "ENUM", "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF", "GOTO", "IMPLEMENTS",
"IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE", "NEW", "PACKAGE", "IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE", "NEW", "PACKAGE",
"PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "SHORT", "STATIC", "STRICTFP", "PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "SHORT", "STATIC", "STRICTFP",
"SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", "TRANSIENT", "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", "TRANSIENT",
@ -72,8 +72,8 @@ public class Java8Lexer extends Lexer {
}; };
private static final String[] _LITERAL_NAMES = { private static final String[] _LITERAL_NAMES = {
null, "'abstract'", "'assert'", "'boolean'", "'break'", "'byte'", "'case'", null, "'var'", "'abstract'", "'assert'", "'boolean'", "'break'", "'byte'",
"'catch'", "'char'", "'class'", "'const'", "'continue'", "'default'", "'case'", "'catch'", "'char'", "'class'", "'const'", "'continue'", "'default'",
"'do'", "'double'", "'else'", "'enum'", "'extends'", "'final'", "'finally'", "'do'", "'double'", "'else'", "'enum'", "'extends'", "'final'", "'finally'",
"'float'", "'for'", "'if'", "'goto'", "'implements'", "'import'", "'instanceof'", "'float'", "'for'", "'if'", "'goto'", "'implements'", "'import'", "'instanceof'",
"'int'", "'interface'", "'long'", "'native'", "'new'", "'package'", "'private'", "'int'", "'interface'", "'long'", "'native'", "'new'", "'package'", "'private'",
@ -88,21 +88,21 @@ public class Java8Lexer extends Lexer {
"'>>>='", null, "'@'", "'...'" "'>>>='", null, "'@'", "'...'"
}; };
private static final String[] _SYMBOLIC_NAMES = { private static final String[] _SYMBOLIC_NAMES = {
null, "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH", null, null, "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE",
"CHAR", "CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE", "CATCH", "CHAR", "CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE",
"ENUM", "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF", "GOTO", "IMPLEMENTS", "ELSE", "ENUM", "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF", "GOTO",
"IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE", "NEW", "PACKAGE", "IMPLEMENTS", "IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE",
"PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "SHORT", "STATIC", "STRICTFP", "NEW", "PACKAGE", "PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "SHORT",
"SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", "TRANSIENT", "STATIC", "STRICTFP", "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW",
"TRY", "VOID", "VOLATILE", "WHILE", "IntegerLiteral", "FloatingPointLiteral", "THROWS", "TRANSIENT", "TRY", "VOID", "VOLATILE", "WHILE", "IntegerLiteral",
"BooleanLiteral", "CharacterLiteral", "StringLiteral", "NullLiteral", "FloatingPointLiteral", "BooleanLiteral", "CharacterLiteral", "StringLiteral",
"LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", "SEMI", "COMMA", "NullLiteral", "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK",
"DOT", "ASSIGN", "GT", "LT", "BANG", "TILDE", "QUESTION", "COLON", "EQUAL", "SEMI", "COMMA", "DOT", "ASSIGN", "GT", "LT", "BANG", "TILDE", "QUESTION",
"LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD", "SUB", "MUL", "COLON", "EQUAL", "LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD",
"DIV", "BITAND", "BITOR", "CARET", "MOD", "ARROW", "COLONCOLON", "ADD_ASSIGN", "SUB", "MUL", "DIV", "BITAND", "BITOR", "CARET", "MOD", "ARROW", "COLONCOLON",
"SUB_ASSIGN", "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", "ADD_ASSIGN", "SUB_ASSIGN", "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN",
"MOD_ASSIGN", "LSHIFT_ASSIGN", "RSHIFT_ASSIGN", "URSHIFT_ASSIGN", "Identifier", "OR_ASSIGN", "XOR_ASSIGN", "MOD_ASSIGN", "LSHIFT_ASSIGN", "RSHIFT_ASSIGN",
"AT", "ELLIPSIS", "WS", "COMMENT", "LINE_COMMENT" "URSHIFT_ASSIGN", "Identifier", "AT", "ELLIPSIS", "WS", "COMMENT", "LINE_COMMENT"
}; };
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
@ -164,9 +164,9 @@ public class Java8Lexer extends Lexer {
@Override @Override
public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
switch (ruleIndex) { switch (ruleIndex) {
case 146:
return JavaLetter_sempred((RuleContext)_localctx, predIndex);
case 147: case 147:
return JavaLetter_sempred((RuleContext)_localctx, predIndex);
case 148:
return JavaLetterOrDigit_sempred((RuleContext)_localctx, predIndex); return JavaLetterOrDigit_sempred((RuleContext)_localctx, predIndex);
} }
return true; return true;
@ -191,7 +191,7 @@ public class Java8Lexer extends Lexer {
} }
public static final String _serializedATN = public static final String _serializedATN =
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2m\u0448\b\1\4\2\t"+ "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2n\u044e\b\1\4\2\t"+
"\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+
"\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+
@ -210,376 +210,378 @@ public class Java8Lexer extends Lexer {
"\4\u008a\t\u008a\4\u008b\t\u008b\4\u008c\t\u008c\4\u008d\t\u008d\4\u008e"+ "\4\u008a\t\u008a\4\u008b\t\u008b\4\u008c\t\u008c\4\u008d\t\u008d\4\u008e"+
"\t\u008e\4\u008f\t\u008f\4\u0090\t\u0090\4\u0091\t\u0091\4\u0092\t\u0092"+ "\t\u008e\4\u008f\t\u008f\4\u0090\t\u0090\4\u0091\t\u0091\4\u0092\t\u0092"+
"\4\u0093\t\u0093\4\u0094\t\u0094\4\u0095\t\u0095\4\u0096\t\u0096\4\u0097"+ "\4\u0093\t\u0093\4\u0094\t\u0094\4\u0095\t\u0095\4\u0096\t\u0096\4\u0097"+
"\t\u0097\4\u0098\t\u0098\4\u0099\t\u0099\4\u009a\t\u009a\3\2\3\2\3\2\3"+ "\t\u0097\4\u0098\t\u0098\4\u0099\t\u0099\4\u009a\t\u009a\4\u009b\t\u009b"+
"\2\3\2\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4"+ "\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3"+
"\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3"+ "\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\6\3\7"+
"\7\3\7\3\b\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n"+ "\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3"+
"\3\n\3\13\3\13\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f"+ "\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3\r\3"+
"\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3\17\3\17\3\17\3\17\3"+ "\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16"+
"\17\3\17\3\17\3\20\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3\21\3\21\3\22\3"+ "\3\17\3\17\3\17\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3\21"+
"\22\3\22\3\22\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3\23\3\24\3"+ "\3\21\3\22\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23"+
"\24\3\24\3\24\3\24\3\24\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\25\3\26\3"+ "\3\24\3\24\3\24\3\24\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25"+
"\26\3\26\3\26\3\27\3\27\3\27\3\30\3\30\3\30\3\30\3\30\3\31\3\31\3\31\3"+ "\3\26\3\26\3\26\3\26\3\26\3\26\3\27\3\27\3\27\3\27\3\30\3\30\3\30\3\31"+
"\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\32\3\32\3\32\3\32\3\32\3\32\3"+ "\3\31\3\31\3\31\3\31\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32"+
"\32\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\34\3\34\3"+ "\3\32\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\34\3\34\3\34\3\34\3\34\3\34"+
"\34\3\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\36\3\36\3"+ "\3\34\3\34\3\34\3\34\3\34\3\35\3\35\3\35\3\35\3\36\3\36\3\36\3\36\3\36"+
"\36\3\36\3\36\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3 \3 \3 \3 \3!\3!\3!"+ "\3\36\3\36\3\36\3\36\3\36\3\37\3\37\3\37\3\37\3\37\3 \3 \3 \3 \3 \3 \3"+
"\3!\3!\3!\3!\3!\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3#\3#\3#\3"+ " \3!\3!\3!\3!\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3#\3#\3#\3#"+
"#\3#\3#\3$\3$\3$\3$\3$\3$\3$\3%\3%\3%\3%\3%\3%\3%\3&\3&\3&\3&\3&\3&\3"+ "\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3%\3%\3%\3%\3%\3%\3%\3&\3&\3&\3&\3&\3&"+
"\'\3\'\3\'\3\'\3\'\3\'\3\'\3(\3(\3(\3(\3(\3(\3(\3(\3(\3)\3)\3)\3)\3)\3"+ "\3&\3\'\3\'\3\'\3\'\3\'\3\'\3(\3(\3(\3(\3(\3(\3(\3)\3)\3)\3)\3)\3)\3)"+
")\3*\3*\3*\3*\3*\3*\3*\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3,\3,\3"+ "\3)\3)\3*\3*\3*\3*\3*\3*\3+\3+\3+\3+\3+\3+\3+\3,\3,\3,\3,\3,\3,\3,\3,"+
",\3,\3,\3-\3-\3-\3-\3-\3-\3.\3.\3.\3.\3.\3.\3.\3/\3/\3/\3/\3/\3/\3/\3"+ "\3,\3,\3,\3,\3,\3-\3-\3-\3-\3-\3.\3.\3.\3.\3.\3.\3/\3/\3/\3/\3/\3/\3/"+
"/\3/\3/\3\60\3\60\3\60\3\60\3\61\3\61\3\61\3\61\3\61\3\62\3\62\3\62\3"+ "\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\61\3\61\3\61\3\61"+
"\62\3\62\3\62\3\62\3\62\3\62\3\63\3\63\3\63\3\63\3\63\3\63\3\64\3\64\3"+ "\3\62\3\62\3\62\3\62\3\62\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\63"+
"\64\3\64\5\64\u028d\n\64\3\65\3\65\5\65\u0291\n\65\3\66\3\66\5\66\u0295"+ "\3\64\3\64\3\64\3\64\3\64\3\64\3\65\3\65\3\65\3\65\5\65\u0293\n\65\3\66"+
"\n\66\3\67\3\67\5\67\u0299\n\67\38\38\58\u029d\n8\39\39\3:\3:\3:\5:\u02a4"+ "\3\66\5\66\u0297\n\66\3\67\3\67\5\67\u029b\n\67\38\38\58\u029f\n8\39\3"+
"\n:\3:\3:\3:\5:\u02a9\n:\5:\u02ab\n:\3;\3;\5;\u02af\n;\3;\5;\u02b2\n;"+ "9\59\u02a3\n9\3:\3:\3;\3;\3;\5;\u02aa\n;\3;\3;\3;\5;\u02af\n;\5;\u02b1"+
"\3<\3<\5<\u02b6\n<\3=\3=\3>\6>\u02bb\n>\r>\16>\u02bc\3?\3?\5?\u02c1\n"+ "\n;\3<\3<\5<\u02b5\n<\3<\5<\u02b8\n<\3=\3=\5=\u02bc\n=\3>\3>\3?\6?\u02c1"+
"?\3@\6@\u02c4\n@\r@\16@\u02c5\3A\3A\3A\3A\3B\3B\5B\u02ce\nB\3B\5B\u02d1"+ "\n?\r?\16?\u02c2\3@\3@\5@\u02c7\n@\3A\6A\u02ca\nA\rA\16A\u02cb\3B\3B\3"+
"\nB\3C\3C\3D\6D\u02d6\nD\rD\16D\u02d7\3E\3E\5E\u02dc\nE\3F\3F\5F\u02e0"+ "B\3B\3C\3C\5C\u02d4\nC\3C\5C\u02d7\nC\3D\3D\3E\6E\u02dc\nE\rE\16E\u02dd"+
"\nF\3F\3F\3G\3G\5G\u02e6\nG\3G\5G\u02e9\nG\3H\3H\3I\6I\u02ee\nI\rI\16"+ "\3F\3F\5F\u02e2\nF\3G\3G\5G\u02e6\nG\3G\3G\3H\3H\5H\u02ec\nH\3H\5H\u02ef"+
"I\u02ef\3J\3J\5J\u02f4\nJ\3K\3K\3K\3K\3L\3L\5L\u02fc\nL\3L\5L\u02ff\n"+ "\nH\3I\3I\3J\6J\u02f4\nJ\rJ\16J\u02f5\3K\3K\5K\u02fa\nK\3L\3L\3L\3L\3"+
"L\3M\3M\3N\6N\u0304\nN\rN\16N\u0305\3O\3O\5O\u030a\nO\3P\3P\5P\u030e\n"+ "M\3M\5M\u0302\nM\3M\5M\u0305\nM\3N\3N\3O\6O\u030a\nO\rO\16O\u030b\3P\3"+
"P\3Q\3Q\3Q\5Q\u0313\nQ\3Q\5Q\u0316\nQ\3Q\5Q\u0319\nQ\3Q\3Q\3Q\5Q\u031e"+ "P\5P\u0310\nP\3Q\3Q\5Q\u0314\nQ\3R\3R\3R\5R\u0319\nR\3R\5R\u031c\nR\3"+
"\nQ\3Q\5Q\u0321\nQ\3Q\3Q\3Q\5Q\u0326\nQ\3Q\3Q\3Q\5Q\u032b\nQ\3R\3R\3R"+ "R\5R\u031f\nR\3R\3R\3R\5R\u0324\nR\3R\5R\u0327\nR\3R\3R\3R\5R\u032c\n"+
"\3S\3S\3T\5T\u0333\nT\3T\3T\3U\3U\3V\3V\3W\3W\3W\5W\u033e\nW\3X\3X\5X"+ "R\3R\3R\3R\5R\u0331\nR\3S\3S\3S\3T\3T\3U\5U\u0339\nU\3U\3U\3V\3V\3W\3"+
"\u0342\nX\3X\3X\3X\5X\u0347\nX\3X\3X\5X\u034b\nX\3Y\3Y\3Y\3Z\3Z\3[\3["+ "W\3X\3X\3X\5X\u0344\nX\3Y\3Y\5Y\u0348\nY\3Y\3Y\3Y\5Y\u034d\nY\3Y\3Y\5"+
"\3[\3[\3[\3[\3[\3[\3[\5[\u035b\n[\3\\\3\\\3\\\3\\\3\\\3\\\3\\\3\\\5\\"+ "Y\u0351\nY\3Z\3Z\3Z\3[\3[\3\\\3\\\3\\\3\\\3\\\3\\\3\\\3\\\3\\\5\\\u0361"+
"\u0365\n\\\3]\3]\3^\3^\5^\u036b\n^\3^\3^\3_\6_\u0370\n_\r_\16_\u0371\3"+ "\n\\\3]\3]\3]\3]\3]\3]\3]\3]\5]\u036b\n]\3^\3^\3_\3_\5_\u0371\n_\3_\3"+
"`\3`\5`\u0376\n`\3a\3a\3a\3a\5a\u037c\na\3b\3b\3b\3b\3b\3b\3b\3b\3b\3"+ "_\3`\6`\u0376\n`\r`\16`\u0377\3a\3a\5a\u037c\na\3b\3b\3b\3b\5b\u0382\n"+
"b\3b\5b\u0389\nb\3c\3c\3d\3d\3d\3d\3d\3d\3d\3e\3e\3e\3e\3e\3f\3f\3g\3"+ "b\3c\3c\3c\3c\3c\3c\3c\3c\3c\3c\3c\5c\u038f\nc\3d\3d\3e\3e\3e\3e\3e\3"+
"g\3h\3h\3i\3i\3j\3j\3k\3k\3l\3l\3m\3m\3n\3n\3o\3o\3p\3p\3q\3q\3r\3r\3"+ "e\3e\3f\3f\3f\3f\3f\3g\3g\3h\3h\3i\3i\3j\3j\3k\3k\3l\3l\3m\3m\3n\3n\3"+
"s\3s\3t\3t\3u\3u\3v\3v\3v\3w\3w\3w\3x\3x\3x\3y\3y\3y\3z\3z\3z\3{\3{\3"+ "o\3o\3p\3p\3q\3q\3r\3r\3s\3s\3t\3t\3u\3u\3v\3v\3w\3w\3w\3x\3x\3x\3y\3"+
"{\3|\3|\3|\3}\3}\3}\3~\3~\3\177\3\177\3\u0080\3\u0080\3\u0081\3\u0081"+ "y\3y\3z\3z\3z\3{\3{\3{\3|\3|\3|\3}\3}\3}\3~\3~\3~\3\177\3\177\3\u0080"+
"\3\u0082\3\u0082\3\u0083\3\u0083\3\u0084\3\u0084\3\u0085\3\u0085\3\u0086"+ "\3\u0080\3\u0081\3\u0081\3\u0082\3\u0082\3\u0083\3\u0083\3\u0084\3\u0084"+
"\3\u0086\3\u0086\3\u0087\3\u0087\3\u0087\3\u0088\3\u0088\3\u0088\3\u0089"+ "\3\u0085\3\u0085\3\u0086\3\u0086\3\u0087\3\u0087\3\u0087\3\u0088\3\u0088"+
"\3\u0089\3\u0089\3\u008a\3\u008a\3\u008a\3\u008b\3\u008b\3\u008b\3\u008c"+ "\3\u0088\3\u0089\3\u0089\3\u0089\3\u008a\3\u008a\3\u008a\3\u008b\3\u008b"+
"\3\u008c\3\u008c\3\u008d\3\u008d\3\u008d\3\u008e\3\u008e\3\u008e\3\u008f"+ "\3\u008b\3\u008c\3\u008c\3\u008c\3\u008d\3\u008d\3\u008d\3\u008e\3\u008e"+
"\3\u008f\3\u008f\3\u0090\3\u0090\3\u0090\3\u0090\3\u0091\3\u0091\3\u0091"+ "\3\u008e\3\u008f\3\u008f\3\u008f\3\u0090\3\u0090\3\u0090\3\u0091\3\u0091"+
"\3\u0091\3\u0092\3\u0092\3\u0092\3\u0092\3\u0092\3\u0093\3\u0093\7\u0093"+ "\3\u0091\3\u0091\3\u0092\3\u0092\3\u0092\3\u0092\3\u0093\3\u0093\3\u0093"+
"\u040e\n\u0093\f\u0093\16\u0093\u0411\13\u0093\3\u0094\3\u0094\3\u0094"+ "\3\u0093\3\u0093\3\u0094\3\u0094\7\u0094\u0414\n\u0094\f\u0094\16\u0094"+
"\3\u0094\3\u0094\3\u0094\5\u0094\u0419\n\u0094\3\u0095\3\u0095\3\u0095"+ "\u0417\13\u0094\3\u0095\3\u0095\3\u0095\3\u0095\3\u0095\3\u0095\5\u0095"+
"\3\u0095\3\u0095\3\u0095\5\u0095\u0421\n\u0095\3\u0096\3\u0096\3\u0097"+ "\u041f\n\u0095\3\u0096\3\u0096\3\u0096\3\u0096\3\u0096\3\u0096\5\u0096"+
"\3\u0097\3\u0097\3\u0097\3\u0098\6\u0098\u042a\n\u0098\r\u0098\16\u0098"+ "\u0427\n\u0096\3\u0097\3\u0097\3\u0098\3\u0098\3\u0098\3\u0098\3\u0099"+
"\u042b\3\u0098\3\u0098\3\u0099\3\u0099\3\u0099\3\u0099\7\u0099\u0434\n"+ "\6\u0099\u0430\n\u0099\r\u0099\16\u0099\u0431\3\u0099\3\u0099\3\u009a"+
"\u0099\f\u0099\16\u0099\u0437\13\u0099\3\u0099\3\u0099\3\u0099\3\u0099"+ "\3\u009a\3\u009a\3\u009a\7\u009a\u043a\n\u009a\f\u009a\16\u009a\u043d"+
"\3\u0099\3\u009a\3\u009a\3\u009a\3\u009a\7\u009a\u0442\n\u009a\f\u009a"+ "\13\u009a\3\u009a\3\u009a\3\u009a\3\u009a\3\u009a\3\u009b\3\u009b\3\u009b"+
"\16\u009a\u0445\13\u009a\3\u009a\3\u009a\3\u0435\2\u009b\3\3\5\4\7\5\t"+ "\3\u009b\7\u009b\u0448\n\u009b\f\u009b\16\u009b\u044b\13\u009b\3\u009b"+
"\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23"+ "\3\u009b\3\u043b\2\u009c\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f"+
"%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G"+ "\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63"+
"%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61a\62c\63e\64g\65i\2k\2m\2o\2q\2s\2u\2w\2"+ "\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61a\62"+
"y\2{\2}\2\177\2\u0081\2\u0083\2\u0085\2\u0087\2\u0089\2\u008b\2\u008d"+ "c\63e\64g\65i\66k\2m\2o\2q\2s\2u\2w\2y\2{\2}\2\177\2\u0081\2\u0083\2\u0085"+
"\2\u008f\2\u0091\2\u0093\2\u0095\2\u0097\2\u0099\2\u009b\2\u009d\2\u009f"+ "\2\u0087\2\u0089\2\u008b\2\u008d\2\u008f\2\u0091\2\u0093\2\u0095\2\u0097"+
"\66\u00a1\2\u00a3\2\u00a5\2\u00a7\2\u00a9\2\u00ab\2\u00ad\2\u00af\2\u00b1"+ "\2\u0099\2\u009b\2\u009d\2\u009f\2\u00a1\67\u00a3\2\u00a5\2\u00a7\2\u00a9"+
"\2\u00b3\2\u00b5\67\u00b78\u00b9\2\u00bb9\u00bd\2\u00bf\2\u00c1\2\u00c3"+ "\2\u00ab\2\u00ad\2\u00af\2\u00b1\2\u00b3\2\u00b5\2\u00b78\u00b99\u00bb"+
"\2\u00c5\2\u00c7\2\u00c9:\u00cb;\u00cd<\u00cf=\u00d1>\u00d3?\u00d5@\u00d7"+ "\2\u00bd:\u00bf\2\u00c1\2\u00c3\2\u00c5\2\u00c7\2\u00c9\2\u00cb;\u00cd"+
"A\u00d9B\u00dbC\u00ddD\u00dfE\u00e1F\u00e3G\u00e5H\u00e7I\u00e9J\u00eb"+ "<\u00cf=\u00d1>\u00d3?\u00d5@\u00d7A\u00d9B\u00dbC\u00ddD\u00dfE\u00e1"+
"K\u00edL\u00efM\u00f1N\u00f3O\u00f5P\u00f7Q\u00f9R\u00fbS\u00fdT\u00ff"+ "F\u00e3G\u00e5H\u00e7I\u00e9J\u00ebK\u00edL\u00efM\u00f1N\u00f3O\u00f5"+
"U\u0101V\u0103W\u0105X\u0107Y\u0109Z\u010b[\u010d\\\u010f]\u0111^\u0113"+ "P\u00f7Q\u00f9R\u00fbS\u00fdT\u00ffU\u0101V\u0103W\u0105X\u0107Y\u0109"+
"_\u0115`\u0117a\u0119b\u011bc\u011dd\u011fe\u0121f\u0123g\u0125h\u0127"+ "Z\u010b[\u010d\\\u010f]\u0111^\u0113_\u0115`\u0117a\u0119b\u011bc\u011d"+
"\2\u0129\2\u012bi\u012dj\u012fk\u0131l\u0133m\3\2\30\4\2NNnn\3\2\63;\4"+ "d\u011fe\u0121f\u0123g\u0125h\u0127i\u0129\2\u012b\2\u012dj\u012fk\u0131"+
"\2ZZzz\5\2\62;CHch\3\2\629\4\2DDdd\3\2\62\63\4\2GGgg\4\2--//\6\2FFHHf"+ "l\u0133m\u0135n\3\2\30\4\2NNnn\3\2\63;\4\2ZZzz\5\2\62;CHch\3\2\629\4\2"+
"fhh\4\2RRrr\4\2))^^\4\2$$^^\n\2$$))^^ddhhppttvv\3\2\62\65\6\2&&C\\aac"+ "DDdd\3\2\62\63\4\2GGgg\4\2--//\6\2FFHHffhh\4\2RRrr\4\2))^^\4\2$$^^\n\2"+
"|\4\2\2\u0081\ud802\udc01\3\2\ud802\udc01\3\2\udc02\ue001\7\2&&\62;C\\"+ "$$))^^ddhhppttvv\3\2\62\65\6\2&&C\\aac|\4\2\2\u0081\ud802\udc01\3\2\ud802"+
"aac|\5\2\13\f\16\17\"\"\4\2\f\f\17\17\2\u0456\2\3\3\2\2\2\2\5\3\2\2\2"+ "\udc01\3\2\udc02\ue001\7\2&&\62;C\\aac|\5\2\13\f\16\17\"\"\4\2\f\f\17"+
"\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3"+ "\17\2\u045c\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2"+
"\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2"+ "\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27"+
"\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2"+ "\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2"+
"\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2"+ "\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2"+
"\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2"+ "\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2"+
"\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2"+ "\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2"+
"\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y"+ "\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S"+
"\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2"+ "\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2"+
"\2\2\2g\3\2\2\2\2\u009f\3\2\2\2\2\u00b5\3\2\2\2\2\u00b7\3\2\2\2\2\u00bb"+ "\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2\2\u00a1\3"+
"\3\2\2\2\2\u00c9\3\2\2\2\2\u00cb\3\2\2\2\2\u00cd\3\2\2\2\2\u00cf\3\2\2"+ "\2\2\2\2\u00b7\3\2\2\2\2\u00b9\3\2\2\2\2\u00bd\3\2\2\2\2\u00cb\3\2\2\2"+
"\2\2\u00d1\3\2\2\2\2\u00d3\3\2\2\2\2\u00d5\3\2\2\2\2\u00d7\3\2\2\2\2\u00d9"+ "\2\u00cd\3\2\2\2\2\u00cf\3\2\2\2\2\u00d1\3\2\2\2\2\u00d3\3\2\2\2\2\u00d5"+
"\3\2\2\2\2\u00db\3\2\2\2\2\u00dd\3\2\2\2\2\u00df\3\2\2\2\2\u00e1\3\2\2"+ "\3\2\2\2\2\u00d7\3\2\2\2\2\u00d9\3\2\2\2\2\u00db\3\2\2\2\2\u00dd\3\2\2"+
"\2\2\u00e3\3\2\2\2\2\u00e5\3\2\2\2\2\u00e7\3\2\2\2\2\u00e9\3\2\2\2\2\u00eb"+ "\2\2\u00df\3\2\2\2\2\u00e1\3\2\2\2\2\u00e3\3\2\2\2\2\u00e5\3\2\2\2\2\u00e7"+
"\3\2\2\2\2\u00ed\3\2\2\2\2\u00ef\3\2\2\2\2\u00f1\3\2\2\2\2\u00f3\3\2\2"+ "\3\2\2\2\2\u00e9\3\2\2\2\2\u00eb\3\2\2\2\2\u00ed\3\2\2\2\2\u00ef\3\2\2"+
"\2\2\u00f5\3\2\2\2\2\u00f7\3\2\2\2\2\u00f9\3\2\2\2\2\u00fb\3\2\2\2\2\u00fd"+ "\2\2\u00f1\3\2\2\2\2\u00f3\3\2\2\2\2\u00f5\3\2\2\2\2\u00f7\3\2\2\2\2\u00f9"+
"\3\2\2\2\2\u00ff\3\2\2\2\2\u0101\3\2\2\2\2\u0103\3\2\2\2\2\u0105\3\2\2"+ "\3\2\2\2\2\u00fb\3\2\2\2\2\u00fd\3\2\2\2\2\u00ff\3\2\2\2\2\u0101\3\2\2"+
"\2\2\u0107\3\2\2\2\2\u0109\3\2\2\2\2\u010b\3\2\2\2\2\u010d\3\2\2\2\2\u010f"+ "\2\2\u0103\3\2\2\2\2\u0105\3\2\2\2\2\u0107\3\2\2\2\2\u0109\3\2\2\2\2\u010b"+
"\3\2\2\2\2\u0111\3\2\2\2\2\u0113\3\2\2\2\2\u0115\3\2\2\2\2\u0117\3\2\2"+ "\3\2\2\2\2\u010d\3\2\2\2\2\u010f\3\2\2\2\2\u0111\3\2\2\2\2\u0113\3\2\2"+
"\2\2\u0119\3\2\2\2\2\u011b\3\2\2\2\2\u011d\3\2\2\2\2\u011f\3\2\2\2\2\u0121"+ "\2\2\u0115\3\2\2\2\2\u0117\3\2\2\2\2\u0119\3\2\2\2\2\u011b\3\2\2\2\2\u011d"+
"\3\2\2\2\2\u0123\3\2\2\2\2\u0125\3\2\2\2\2\u012b\3\2\2\2\2\u012d\3\2\2"+ "\3\2\2\2\2\u011f\3\2\2\2\2\u0121\3\2\2\2\2\u0123\3\2\2\2\2\u0125\3\2\2"+
"\2\2\u012f\3\2\2\2\2\u0131\3\2\2\2\2\u0133\3\2\2\2\3\u0135\3\2\2\2\5\u013e"+ "\2\2\u0127\3\2\2\2\2\u012d\3\2\2\2\2\u012f\3\2\2\2\2\u0131\3\2\2\2\2\u0133"+
"\3\2\2\2\7\u0145\3\2\2\2\t\u014d\3\2\2\2\13\u0153\3\2\2\2\r\u0158\3\2"+ "\3\2\2\2\2\u0135\3\2\2\2\3\u0137\3\2\2\2\5\u013b\3\2\2\2\7\u0144\3\2\2"+
"\2\2\17\u015d\3\2\2\2\21\u0163\3\2\2\2\23\u0168\3\2\2\2\25\u016e\3\2\2"+ "\2\t\u014b\3\2\2\2\13\u0153\3\2\2\2\r\u0159\3\2\2\2\17\u015e\3\2\2\2\21"+
"\2\27\u0174\3\2\2\2\31\u017d\3\2\2\2\33\u0185\3\2\2\2\35\u0188\3\2\2\2"+ "\u0163\3\2\2\2\23\u0169\3\2\2\2\25\u016e\3\2\2\2\27\u0174\3\2\2\2\31\u017a"+
"\37\u018f\3\2\2\2!\u0194\3\2\2\2#\u0199\3\2\2\2%\u01a1\3\2\2\2\'\u01a7"+ "\3\2\2\2\33\u0183\3\2\2\2\35\u018b\3\2\2\2\37\u018e\3\2\2\2!\u0195\3\2"+
"\3\2\2\2)\u01af\3\2\2\2+\u01b5\3\2\2\2-\u01b9\3\2\2\2/\u01bc\3\2\2\2\61"+ "\2\2#\u019a\3\2\2\2%\u019f\3\2\2\2\'\u01a7\3\2\2\2)\u01ad\3\2\2\2+\u01b5"+
"\u01c1\3\2\2\2\63\u01cc\3\2\2\2\65\u01d3\3\2\2\2\67\u01de\3\2\2\29\u01e2"+ "\3\2\2\2-\u01bb\3\2\2\2/\u01bf\3\2\2\2\61\u01c2\3\2\2\2\63\u01c7\3\2\2"+
"\3\2\2\2;\u01ec\3\2\2\2=\u01f1\3\2\2\2?\u01f8\3\2\2\2A\u01fc\3\2\2\2C"+ "\2\65\u01d2\3\2\2\2\67\u01d9\3\2\2\29\u01e4\3\2\2\2;\u01e8\3\2\2\2=\u01f2"+
"\u0204\3\2\2\2E\u020c\3\2\2\2G\u0216\3\2\2\2I\u021d\3\2\2\2K\u0224\3\2"+ "\3\2\2\2?\u01f7\3\2\2\2A\u01fe\3\2\2\2C\u0202\3\2\2\2E\u020a\3\2\2\2G"+
"\2\2M\u022a\3\2\2\2O\u0231\3\2\2\2Q\u023a\3\2\2\2S\u0240\3\2\2\2U\u0247"+ "\u0212\3\2\2\2I\u021c\3\2\2\2K\u0223\3\2\2\2M\u022a\3\2\2\2O\u0230\3\2"+
"\3\2\2\2W\u0254\3\2\2\2Y\u0259\3\2\2\2[\u025f\3\2\2\2]\u0266\3\2\2\2_"+ "\2\2Q\u0237\3\2\2\2S\u0240\3\2\2\2U\u0246\3\2\2\2W\u024d\3\2\2\2Y\u025a"+
"\u0270\3\2\2\2a\u0274\3\2\2\2c\u0279\3\2\2\2e\u0282\3\2\2\2g\u028c\3\2"+ "\3\2\2\2[\u025f\3\2\2\2]\u0265\3\2\2\2_\u026c\3\2\2\2a\u0276\3\2\2\2c"+
"\2\2i\u028e\3\2\2\2k\u0292\3\2\2\2m\u0296\3\2\2\2o\u029a\3\2\2\2q\u029e"+ "\u027a\3\2\2\2e\u027f\3\2\2\2g\u0288\3\2\2\2i\u0292\3\2\2\2k\u0294\3\2"+
"\3\2\2\2s\u02aa\3\2\2\2u\u02ac\3\2\2\2w\u02b5\3\2\2\2y\u02b7\3\2\2\2{"+ "\2\2m\u0298\3\2\2\2o\u029c\3\2\2\2q\u02a0\3\2\2\2s\u02a4\3\2\2\2u\u02b0"+
"\u02ba\3\2\2\2}\u02c0\3\2\2\2\177\u02c3\3\2\2\2\u0081\u02c7\3\2\2\2\u0083"+ "\3\2\2\2w\u02b2\3\2\2\2y\u02bb\3\2\2\2{\u02bd\3\2\2\2}\u02c0\3\2\2\2\177"+
"\u02cb\3\2\2\2\u0085\u02d2\3\2\2\2\u0087\u02d5\3\2\2\2\u0089\u02db\3\2"+ "\u02c6\3\2\2\2\u0081\u02c9\3\2\2\2\u0083\u02cd\3\2\2\2\u0085\u02d1\3\2"+
"\2\2\u008b\u02dd\3\2\2\2\u008d\u02e3\3\2\2\2\u008f\u02ea\3\2\2\2\u0091"+ "\2\2\u0087\u02d8\3\2\2\2\u0089\u02db\3\2\2\2\u008b\u02e1\3\2\2\2\u008d"+
"\u02ed\3\2\2\2\u0093\u02f3\3\2\2\2\u0095\u02f5\3\2\2\2\u0097\u02f9\3\2"+ "\u02e3\3\2\2\2\u008f\u02e9\3\2\2\2\u0091\u02f0\3\2\2\2\u0093\u02f3\3\2"+
"\2\2\u0099\u0300\3\2\2\2\u009b\u0303\3\2\2\2\u009d\u0309\3\2\2\2\u009f"+ "\2\2\u0095\u02f9\3\2\2\2\u0097\u02fb\3\2\2\2\u0099\u02ff\3\2\2\2\u009b"+
"\u030d\3\2\2\2\u00a1\u032a\3\2\2\2\u00a3\u032c\3\2\2\2\u00a5\u032f\3\2"+ "\u0306\3\2\2\2\u009d\u0309\3\2\2\2\u009f\u030f\3\2\2\2\u00a1\u0313\3\2"+
"\2\2\u00a7\u0332\3\2\2\2\u00a9\u0336\3\2\2\2\u00ab\u0338\3\2\2\2\u00ad"+ "\2\2\u00a3\u0330\3\2\2\2\u00a5\u0332\3\2\2\2\u00a7\u0335\3\2\2\2\u00a9"+
"\u033a\3\2\2\2\u00af\u034a\3\2\2\2\u00b1\u034c\3\2\2\2\u00b3\u034f\3\2"+ "\u0338\3\2\2\2\u00ab\u033c\3\2\2\2\u00ad\u033e\3\2\2\2\u00af\u0340\3\2"+
"\2\2\u00b5\u035a\3\2\2\2\u00b7\u0364\3\2\2\2\u00b9\u0366\3\2\2\2\u00bb"+ "\2\2\u00b1\u0350\3\2\2\2\u00b3\u0352\3\2\2\2\u00b5\u0355\3\2\2\2\u00b7"+
"\u0368\3\2\2\2\u00bd\u036f\3\2\2\2\u00bf\u0375\3\2\2\2\u00c1\u037b\3\2"+ "\u0360\3\2\2\2\u00b9\u036a\3\2\2\2\u00bb\u036c\3\2\2\2\u00bd\u036e\3\2"+
"\2\2\u00c3\u0388\3\2\2\2\u00c5\u038a\3\2\2\2\u00c7\u038c\3\2\2\2\u00c9"+ "\2\2\u00bf\u0375\3\2\2\2\u00c1\u037b\3\2\2\2\u00c3\u0381\3\2\2\2\u00c5"+
"\u0393\3\2\2\2\u00cb\u0398\3\2\2\2\u00cd\u039a\3\2\2\2\u00cf\u039c\3\2"+ "\u038e\3\2\2\2\u00c7\u0390\3\2\2\2\u00c9\u0392\3\2\2\2\u00cb\u0399\3\2"+
"\2\2\u00d1\u039e\3\2\2\2\u00d3\u03a0\3\2\2\2\u00d5\u03a2\3\2\2\2\u00d7"+ "\2\2\u00cd\u039e\3\2\2\2\u00cf\u03a0\3\2\2\2\u00d1\u03a2\3\2\2\2\u00d3"+
"\u03a4\3\2\2\2\u00d9\u03a6\3\2\2\2\u00db\u03a8\3\2\2\2\u00dd\u03aa\3\2"+ "\u03a4\3\2\2\2\u00d5\u03a6\3\2\2\2\u00d7\u03a8\3\2\2\2\u00d9\u03aa\3\2"+
"\2\2\u00df\u03ac\3\2\2\2\u00e1\u03ae\3\2\2\2\u00e3\u03b0\3\2\2\2\u00e5"+ "\2\2\u00db\u03ac\3\2\2\2\u00dd\u03ae\3\2\2\2\u00df\u03b0\3\2\2\2\u00e1"+
"\u03b2\3\2\2\2\u00e7\u03b4\3\2\2\2\u00e9\u03b6\3\2\2\2\u00eb\u03b8\3\2"+ "\u03b2\3\2\2\2\u00e3\u03b4\3\2\2\2\u00e5\u03b6\3\2\2\2\u00e7\u03b8\3\2"+
"\2\2\u00ed\u03bb\3\2\2\2\u00ef\u03be\3\2\2\2\u00f1\u03c1\3\2\2\2\u00f3"+ "\2\2\u00e9\u03ba\3\2\2\2\u00eb\u03bc\3\2\2\2\u00ed\u03be\3\2\2\2\u00ef"+
"\u03c4\3\2\2\2\u00f5\u03c7\3\2\2\2\u00f7\u03ca\3\2\2\2\u00f9\u03cd\3\2"+ "\u03c1\3\2\2\2\u00f1\u03c4\3\2\2\2\u00f3\u03c7\3\2\2\2\u00f5\u03ca\3\2"+
"\2\2\u00fb\u03d0\3\2\2\2\u00fd\u03d2\3\2\2\2\u00ff\u03d4\3\2\2\2\u0101"+ "\2\2\u00f7\u03cd\3\2\2\2\u00f9\u03d0\3\2\2\2\u00fb\u03d3\3\2\2\2\u00fd"+
"\u03d6\3\2\2\2\u0103\u03d8\3\2\2\2\u0105\u03da\3\2\2\2\u0107\u03dc\3\2"+ "\u03d6\3\2\2\2\u00ff\u03d8\3\2\2\2\u0101\u03da\3\2\2\2\u0103\u03dc\3\2"+
"\2\2\u0109\u03de\3\2\2\2\u010b\u03e0\3\2\2\2\u010d\u03e3\3\2\2\2\u010f"+ "\2\2\u0105\u03de\3\2\2\2\u0107\u03e0\3\2\2\2\u0109\u03e2\3\2\2\2\u010b"+
"\u03e6\3\2\2\2\u0111\u03e9\3\2\2\2\u0113\u03ec\3\2\2\2\u0115\u03ef\3\2"+ "\u03e4\3\2\2\2\u010d\u03e6\3\2\2\2\u010f\u03e9\3\2\2\2\u0111\u03ec\3\2"+
"\2\2\u0117\u03f2\3\2\2\2\u0119\u03f5\3\2\2\2\u011b\u03f8\3\2\2\2\u011d"+ "\2\2\u0113\u03ef\3\2\2\2\u0115\u03f2\3\2\2\2\u0117\u03f5\3\2\2\2\u0119"+
"\u03fb\3\2\2\2\u011f\u03fe\3\2\2\2\u0121\u0402\3\2\2\2\u0123\u0406\3\2"+ "\u03f8\3\2\2\2\u011b\u03fb\3\2\2\2\u011d\u03fe\3\2\2\2\u011f\u0401\3\2"+
"\2\2\u0125\u040b\3\2\2\2\u0127\u0418\3\2\2\2\u0129\u0420\3\2\2\2\u012b"+ "\2\2\u0121\u0404\3\2\2\2\u0123\u0408\3\2\2\2\u0125\u040c\3\2\2\2\u0127"+
"\u0422\3\2\2\2\u012d\u0424\3\2\2\2\u012f\u0429\3\2\2\2\u0131\u042f\3\2"+ "\u0411\3\2\2\2\u0129\u041e\3\2\2\2\u012b\u0426\3\2\2\2\u012d\u0428\3\2"+
"\2\2\u0133\u043d\3\2\2\2\u0135\u0136\7c\2\2\u0136\u0137\7d\2\2\u0137\u0138"+ "\2\2\u012f\u042a\3\2\2\2\u0131\u042f\3\2\2\2\u0133\u0435\3\2\2\2\u0135"+
"\7u\2\2\u0138\u0139\7v\2\2\u0139\u013a\7t\2\2\u013a\u013b\7c\2\2\u013b"+ "\u0443\3\2\2\2\u0137\u0138\7x\2\2\u0138\u0139\7c\2\2\u0139\u013a\7t\2"+
"\u013c\7e\2\2\u013c\u013d\7v\2\2\u013d\4\3\2\2\2\u013e\u013f\7c\2\2\u013f"+ "\2\u013a\4\3\2\2\2\u013b\u013c\7c\2\2\u013c\u013d\7d\2\2\u013d\u013e\7"+
"\u0140\7u\2\2\u0140\u0141\7u\2\2\u0141\u0142\7g\2\2\u0142\u0143\7t\2\2"+ "u\2\2\u013e\u013f\7v\2\2\u013f\u0140\7t\2\2\u0140\u0141\7c\2\2\u0141\u0142"+
"\u0143\u0144\7v\2\2\u0144\6\3\2\2\2\u0145\u0146\7d\2\2\u0146\u0147\7q"+ "\7e\2\2\u0142\u0143\7v\2\2\u0143\6\3\2\2\2\u0144\u0145\7c\2\2\u0145\u0146"+
"\2\2\u0147\u0148\7q\2\2\u0148\u0149\7n\2\2\u0149\u014a\7g\2\2\u014a\u014b"+ "\7u\2\2\u0146\u0147\7u\2\2\u0147\u0148\7g\2\2\u0148\u0149\7t\2\2\u0149"+
"\7c\2\2\u014b\u014c\7p\2\2\u014c\b\3\2\2\2\u014d\u014e\7d\2\2\u014e\u014f"+ "\u014a\7v\2\2\u014a\b\3\2\2\2\u014b\u014c\7d\2\2\u014c\u014d\7q\2\2\u014d"+
"\7t\2\2\u014f\u0150\7g\2\2\u0150\u0151\7c\2\2\u0151\u0152\7m\2\2\u0152"+ "\u014e\7q\2\2\u014e\u014f\7n\2\2\u014f\u0150\7g\2\2\u0150\u0151\7c\2\2"+
"\n\3\2\2\2\u0153\u0154\7d\2\2\u0154\u0155\7{\2\2\u0155\u0156\7v\2\2\u0156"+ "\u0151\u0152\7p\2\2\u0152\n\3\2\2\2\u0153\u0154\7d\2\2\u0154\u0155\7t"+
"\u0157\7g\2\2\u0157\f\3\2\2\2\u0158\u0159\7e\2\2\u0159\u015a\7c\2\2\u015a"+ "\2\2\u0155\u0156\7g\2\2\u0156\u0157\7c\2\2\u0157\u0158\7m\2\2\u0158\f"+
"\u015b\7u\2\2\u015b\u015c\7g\2\2\u015c\16\3\2\2\2\u015d\u015e\7e\2\2\u015e"+ "\3\2\2\2\u0159\u015a\7d\2\2\u015a\u015b\7{\2\2\u015b\u015c\7v\2\2\u015c"+
"\u015f\7c\2\2\u015f\u0160\7v\2\2\u0160\u0161\7e\2\2\u0161\u0162\7j\2\2"+ "\u015d\7g\2\2\u015d\16\3\2\2\2\u015e\u015f\7e\2\2\u015f\u0160\7c\2\2\u0160"+
"\u0162\20\3\2\2\2\u0163\u0164\7e\2\2\u0164\u0165\7j\2\2\u0165\u0166\7"+ "\u0161\7u\2\2\u0161\u0162\7g\2\2\u0162\20\3\2\2\2\u0163\u0164\7e\2\2\u0164"+
"c\2\2\u0166\u0167\7t\2\2\u0167\22\3\2\2\2\u0168\u0169\7e\2\2\u0169\u016a"+ "\u0165\7c\2\2\u0165\u0166\7v\2\2\u0166\u0167\7e\2\2\u0167\u0168\7j\2\2"+
"\7n\2\2\u016a\u016b\7c\2\2\u016b\u016c\7u\2\2\u016c\u016d\7u\2\2\u016d"+ "\u0168\22\3\2\2\2\u0169\u016a\7e\2\2\u016a\u016b\7j\2\2\u016b\u016c\7"+
"\24\3\2\2\2\u016e\u016f\7e\2\2\u016f\u0170\7q\2\2\u0170\u0171\7p\2\2\u0171"+ "c\2\2\u016c\u016d\7t\2\2\u016d\24\3\2\2\2\u016e\u016f\7e\2\2\u016f\u0170"+
"\u0172\7u\2\2\u0172\u0173\7v\2\2\u0173\26\3\2\2\2\u0174\u0175\7e\2\2\u0175"+ "\7n\2\2\u0170\u0171\7c\2\2\u0171\u0172\7u\2\2\u0172\u0173\7u\2\2\u0173"+
"\u0176\7q\2\2\u0176\u0177\7p\2\2\u0177\u0178\7v\2\2\u0178\u0179\7k\2\2"+ "\26\3\2\2\2\u0174\u0175\7e\2\2\u0175\u0176\7q\2\2\u0176\u0177\7p\2\2\u0177"+
"\u0179\u017a\7p\2\2\u017a\u017b\7w\2\2\u017b\u017c\7g\2\2\u017c\30\3\2"+ "\u0178\7u\2\2\u0178\u0179\7v\2\2\u0179\30\3\2\2\2\u017a\u017b\7e\2\2\u017b"+
"\2\2\u017d\u017e\7f\2\2\u017e\u017f\7g\2\2\u017f\u0180\7h\2\2\u0180\u0181"+ "\u017c\7q\2\2\u017c\u017d\7p\2\2\u017d\u017e\7v\2\2\u017e\u017f\7k\2\2"+
"\7c\2\2\u0181\u0182\7w\2\2\u0182\u0183\7n\2\2\u0183\u0184\7v\2\2\u0184"+ "\u017f\u0180\7p\2\2\u0180\u0181\7w\2\2\u0181\u0182\7g\2\2\u0182\32\3\2"+
"\32\3\2\2\2\u0185\u0186\7f\2\2\u0186\u0187\7q\2\2\u0187\34\3\2\2\2\u0188"+ "\2\2\u0183\u0184\7f\2\2\u0184\u0185\7g\2\2\u0185\u0186\7h\2\2\u0186\u0187"+
"\u0189\7f\2\2\u0189\u018a\7q\2\2\u018a\u018b\7w\2\2\u018b\u018c\7d\2\2"+ "\7c\2\2\u0187\u0188\7w\2\2\u0188\u0189\7n\2\2\u0189\u018a\7v\2\2\u018a"+
"\u018c\u018d\7n\2\2\u018d\u018e\7g\2\2\u018e\36\3\2\2\2\u018f\u0190\7"+ "\34\3\2\2\2\u018b\u018c\7f\2\2\u018c\u018d\7q\2\2\u018d\36\3\2\2\2\u018e"+
"g\2\2\u0190\u0191\7n\2\2\u0191\u0192\7u\2\2\u0192\u0193\7g\2\2\u0193 "+ "\u018f\7f\2\2\u018f\u0190\7q\2\2\u0190\u0191\7w\2\2\u0191\u0192\7d\2\2"+
"\3\2\2\2\u0194\u0195\7g\2\2\u0195\u0196\7p\2\2\u0196\u0197\7w\2\2\u0197"+ "\u0192\u0193\7n\2\2\u0193\u0194\7g\2\2\u0194 \3\2\2\2\u0195\u0196\7g\2"+
"\u0198\7o\2\2\u0198\"\3\2\2\2\u0199\u019a\7g\2\2\u019a\u019b\7z\2\2\u019b"+ "\2\u0196\u0197\7n\2\2\u0197\u0198\7u\2\2\u0198\u0199\7g\2\2\u0199\"\3"+
"\u019c\7v\2\2\u019c\u019d\7g\2\2\u019d\u019e\7p\2\2\u019e\u019f\7f\2\2"+ "\2\2\2\u019a\u019b\7g\2\2\u019b\u019c\7p\2\2\u019c\u019d\7w\2\2\u019d"+
"\u019f\u01a0\7u\2\2\u01a0$\3\2\2\2\u01a1\u01a2\7h\2\2\u01a2\u01a3\7k\2"+ "\u019e\7o\2\2\u019e$\3\2\2\2\u019f\u01a0\7g\2\2\u01a0\u01a1\7z\2\2\u01a1"+
"\2\u01a3\u01a4\7p\2\2\u01a4\u01a5\7c\2\2\u01a5\u01a6\7n\2\2\u01a6&\3\2"+ "\u01a2\7v\2\2\u01a2\u01a3\7g\2\2\u01a3\u01a4\7p\2\2\u01a4\u01a5\7f\2\2"+
"\2\2\u01a7\u01a8\7h\2\2\u01a8\u01a9\7k\2\2\u01a9\u01aa\7p\2\2\u01aa\u01ab"+ "\u01a5\u01a6\7u\2\2\u01a6&\3\2\2\2\u01a7\u01a8\7h\2\2\u01a8\u01a9\7k\2"+
"\7c\2\2\u01ab\u01ac\7n\2\2\u01ac\u01ad\7n\2\2\u01ad\u01ae\7{\2\2\u01ae"+ "\2\u01a9\u01aa\7p\2\2\u01aa\u01ab\7c\2\2\u01ab\u01ac\7n\2\2\u01ac(\3\2"+
"(\3\2\2\2\u01af\u01b0\7h\2\2\u01b0\u01b1\7n\2\2\u01b1\u01b2\7q\2\2\u01b2"+ "\2\2\u01ad\u01ae\7h\2\2\u01ae\u01af\7k\2\2\u01af\u01b0\7p\2\2\u01b0\u01b1"+
"\u01b3\7c\2\2\u01b3\u01b4\7v\2\2\u01b4*\3\2\2\2\u01b5\u01b6\7h\2\2\u01b6"+ "\7c\2\2\u01b1\u01b2\7n\2\2\u01b2\u01b3\7n\2\2\u01b3\u01b4\7{\2\2\u01b4"+
"\u01b7\7q\2\2\u01b7\u01b8\7t\2\2\u01b8,\3\2\2\2\u01b9\u01ba\7k\2\2\u01ba"+ "*\3\2\2\2\u01b5\u01b6\7h\2\2\u01b6\u01b7\7n\2\2\u01b7\u01b8\7q\2\2\u01b8"+
"\u01bb\7h\2\2\u01bb.\3\2\2\2\u01bc\u01bd\7i\2\2\u01bd\u01be\7q\2\2\u01be"+ "\u01b9\7c\2\2\u01b9\u01ba\7v\2\2\u01ba,\3\2\2\2\u01bb\u01bc\7h\2\2\u01bc"+
"\u01bf\7v\2\2\u01bf\u01c0\7q\2\2\u01c0\60\3\2\2\2\u01c1\u01c2\7k\2\2\u01c2"+ "\u01bd\7q\2\2\u01bd\u01be\7t\2\2\u01be.\3\2\2\2\u01bf\u01c0\7k\2\2\u01c0"+
"\u01c3\7o\2\2\u01c3\u01c4\7r\2\2\u01c4\u01c5\7n\2\2\u01c5\u01c6\7g\2\2"+ "\u01c1\7h\2\2\u01c1\60\3\2\2\2\u01c2\u01c3\7i\2\2\u01c3\u01c4\7q\2\2\u01c4"+
"\u01c6\u01c7\7o\2\2\u01c7\u01c8\7g\2\2\u01c8\u01c9\7p\2\2\u01c9\u01ca"+ "\u01c5\7v\2\2\u01c5\u01c6\7q\2\2\u01c6\62\3\2\2\2\u01c7\u01c8\7k\2\2\u01c8"+
"\7v\2\2\u01ca\u01cb\7u\2\2\u01cb\62\3\2\2\2\u01cc\u01cd\7k\2\2\u01cd\u01ce"+ "\u01c9\7o\2\2\u01c9\u01ca\7r\2\2\u01ca\u01cb\7n\2\2\u01cb\u01cc\7g\2\2"+
"\7o\2\2\u01ce\u01cf\7r\2\2\u01cf\u01d0\7q\2\2\u01d0\u01d1\7t\2\2\u01d1"+ "\u01cc\u01cd\7o\2\2\u01cd\u01ce\7g\2\2\u01ce\u01cf\7p\2\2\u01cf\u01d0"+
"\u01d2\7v\2\2\u01d2\64\3\2\2\2\u01d3\u01d4\7k\2\2\u01d4\u01d5\7p\2\2\u01d5"+ "\7v\2\2\u01d0\u01d1\7u\2\2\u01d1\64\3\2\2\2\u01d2\u01d3\7k\2\2\u01d3\u01d4"+
"\u01d6\7u\2\2\u01d6\u01d7\7v\2\2\u01d7\u01d8\7c\2\2\u01d8\u01d9\7p\2\2"+ "\7o\2\2\u01d4\u01d5\7r\2\2\u01d5\u01d6\7q\2\2\u01d6\u01d7\7t\2\2\u01d7"+
"\u01d9\u01da\7e\2\2\u01da\u01db\7g\2\2\u01db\u01dc\7q\2\2\u01dc\u01dd"+ "\u01d8\7v\2\2\u01d8\66\3\2\2\2\u01d9\u01da\7k\2\2\u01da\u01db\7p\2\2\u01db"+
"\7h\2\2\u01dd\66\3\2\2\2\u01de\u01df\7k\2\2\u01df\u01e0\7p\2\2\u01e0\u01e1"+ "\u01dc\7u\2\2\u01dc\u01dd\7v\2\2\u01dd\u01de\7c\2\2\u01de\u01df\7p\2\2"+
"\7v\2\2\u01e18\3\2\2\2\u01e2\u01e3\7k\2\2\u01e3\u01e4\7p\2\2\u01e4\u01e5"+ "\u01df\u01e0\7e\2\2\u01e0\u01e1\7g\2\2\u01e1\u01e2\7q\2\2\u01e2\u01e3"+
"\7v\2\2\u01e5\u01e6\7g\2\2\u01e6\u01e7\7t\2\2\u01e7\u01e8\7h\2\2\u01e8"+ "\7h\2\2\u01e38\3\2\2\2\u01e4\u01e5\7k\2\2\u01e5\u01e6\7p\2\2\u01e6\u01e7"+
"\u01e9\7c\2\2\u01e9\u01ea\7e\2\2\u01ea\u01eb\7g\2\2\u01eb:\3\2\2\2\u01ec"+ "\7v\2\2\u01e7:\3\2\2\2\u01e8\u01e9\7k\2\2\u01e9\u01ea\7p\2\2\u01ea\u01eb"+
"\u01ed\7n\2\2\u01ed\u01ee\7q\2\2\u01ee\u01ef\7p\2\2\u01ef\u01f0\7i\2\2"+ "\7v\2\2\u01eb\u01ec\7g\2\2\u01ec\u01ed\7t\2\2\u01ed\u01ee\7h\2\2\u01ee"+
"\u01f0<\3\2\2\2\u01f1\u01f2\7p\2\2\u01f2\u01f3\7c\2\2\u01f3\u01f4\7v\2"+ "\u01ef\7c\2\2\u01ef\u01f0\7e\2\2\u01f0\u01f1\7g\2\2\u01f1<\3\2\2\2\u01f2"+
"\2\u01f4\u01f5\7k\2\2\u01f5\u01f6\7x\2\2\u01f6\u01f7\7g\2\2\u01f7>\3\2"+ "\u01f3\7n\2\2\u01f3\u01f4\7q\2\2\u01f4\u01f5\7p\2\2\u01f5\u01f6\7i\2\2"+
"\2\2\u01f8\u01f9\7p\2\2\u01f9\u01fa\7g\2\2\u01fa\u01fb\7y\2\2\u01fb@\3"+ "\u01f6>\3\2\2\2\u01f7\u01f8\7p\2\2\u01f8\u01f9\7c\2\2\u01f9\u01fa\7v\2"+
"\2\2\2\u01fc\u01fd\7r\2\2\u01fd\u01fe\7c\2\2\u01fe\u01ff\7e\2\2\u01ff"+ "\2\u01fa\u01fb\7k\2\2\u01fb\u01fc\7x\2\2\u01fc\u01fd\7g\2\2\u01fd@\3\2"+
"\u0200\7m\2\2\u0200\u0201\7c\2\2\u0201\u0202\7i\2\2\u0202\u0203\7g\2\2"+ "\2\2\u01fe\u01ff\7p\2\2\u01ff\u0200\7g\2\2\u0200\u0201\7y\2\2\u0201B\3"+
"\u0203B\3\2\2\2\u0204\u0205\7r\2\2\u0205\u0206\7t\2\2\u0206\u0207\7k\2"+ "\2\2\2\u0202\u0203\7r\2\2\u0203\u0204\7c\2\2\u0204\u0205\7e\2\2\u0205"+
"\2\u0207\u0208\7x\2\2\u0208\u0209\7c\2\2\u0209\u020a\7v\2\2\u020a\u020b"+ "\u0206\7m\2\2\u0206\u0207\7c\2\2\u0207\u0208\7i\2\2\u0208\u0209\7g\2\2"+
"\7g\2\2\u020bD\3\2\2\2\u020c\u020d\7r\2\2\u020d\u020e\7t\2\2\u020e\u020f"+ "\u0209D\3\2\2\2\u020a\u020b\7r\2\2\u020b\u020c\7t\2\2\u020c\u020d\7k\2"+
"\7q\2\2\u020f\u0210\7v\2\2\u0210\u0211\7g\2\2\u0211\u0212\7e\2\2\u0212"+ "\2\u020d\u020e\7x\2\2\u020e\u020f\7c\2\2\u020f\u0210\7v\2\2\u0210\u0211"+
"\u0213\7v\2\2\u0213\u0214\7g\2\2\u0214\u0215\7f\2\2\u0215F\3\2\2\2\u0216"+ "\7g\2\2\u0211F\3\2\2\2\u0212\u0213\7r\2\2\u0213\u0214\7t\2\2\u0214\u0215"+
"\u0217\7r\2\2\u0217\u0218\7w\2\2\u0218\u0219\7d\2\2\u0219\u021a\7n\2\2"+ "\7q\2\2\u0215\u0216\7v\2\2\u0216\u0217\7g\2\2\u0217\u0218\7e\2\2\u0218"+
"\u021a\u021b\7k\2\2\u021b\u021c\7e\2\2\u021cH\3\2\2\2\u021d\u021e\7t\2"+ "\u0219\7v\2\2\u0219\u021a\7g\2\2\u021a\u021b\7f\2\2\u021bH\3\2\2\2\u021c"+
"\2\u021e\u021f\7g\2\2\u021f\u0220\7v\2\2\u0220\u0221\7w\2\2\u0221\u0222"+ "\u021d\7r\2\2\u021d\u021e\7w\2\2\u021e\u021f\7d\2\2\u021f\u0220\7n\2\2"+
"\7t\2\2\u0222\u0223\7p\2\2\u0223J\3\2\2\2\u0224\u0225\7u\2\2\u0225\u0226"+ "\u0220\u0221\7k\2\2\u0221\u0222\7e\2\2\u0222J\3\2\2\2\u0223\u0224\7t\2"+
"\7j\2\2\u0226\u0227\7q\2\2\u0227\u0228\7t\2\2\u0228\u0229\7v\2\2\u0229"+ "\2\u0224\u0225\7g\2\2\u0225\u0226\7v\2\2\u0226\u0227\7w\2\2\u0227\u0228"+
"L\3\2\2\2\u022a\u022b\7u\2\2\u022b\u022c\7v\2\2\u022c\u022d\7c\2\2\u022d"+ "\7t\2\2\u0228\u0229\7p\2\2\u0229L\3\2\2\2\u022a\u022b\7u\2\2\u022b\u022c"+
"\u022e\7v\2\2\u022e\u022f\7k\2\2\u022f\u0230\7e\2\2\u0230N\3\2\2\2\u0231"+ "\7j\2\2\u022c\u022d\7q\2\2\u022d\u022e\7t\2\2\u022e\u022f\7v\2\2\u022f"+
"\u0232\7u\2\2\u0232\u0233\7v\2\2\u0233\u0234\7t\2\2\u0234\u0235\7k\2\2"+ "N\3\2\2\2\u0230\u0231\7u\2\2\u0231\u0232\7v\2\2\u0232\u0233\7c\2\2\u0233"+
"\u0235\u0236\7e\2\2\u0236\u0237\7v\2\2\u0237\u0238\7h\2\2\u0238\u0239"+ "\u0234\7v\2\2\u0234\u0235\7k\2\2\u0235\u0236\7e\2\2\u0236P\3\2\2\2\u0237"+
"\7r\2\2\u0239P\3\2\2\2\u023a\u023b\7u\2\2\u023b\u023c\7w\2\2\u023c\u023d"+ "\u0238\7u\2\2\u0238\u0239\7v\2\2\u0239\u023a\7t\2\2\u023a\u023b\7k\2\2"+
"\7r\2\2\u023d\u023e\7g\2\2\u023e\u023f\7t\2\2\u023fR\3\2\2\2\u0240\u0241"+ "\u023b\u023c\7e\2\2\u023c\u023d\7v\2\2\u023d\u023e\7h\2\2\u023e\u023f"+
"\7u\2\2\u0241\u0242\7y\2\2\u0242\u0243\7k\2\2\u0243\u0244\7v\2\2\u0244"+ "\7r\2\2\u023fR\3\2\2\2\u0240\u0241\7u\2\2\u0241\u0242\7w\2\2\u0242\u0243"+
"\u0245\7e\2\2\u0245\u0246\7j\2\2\u0246T\3\2\2\2\u0247\u0248\7u\2\2\u0248"+ "\7r\2\2\u0243\u0244\7g\2\2\u0244\u0245\7t\2\2\u0245T\3\2\2\2\u0246\u0247"+
"\u0249\7{\2\2\u0249\u024a\7p\2\2\u024a\u024b\7e\2\2\u024b\u024c\7j\2\2"+ "\7u\2\2\u0247\u0248\7y\2\2\u0248\u0249\7k\2\2\u0249\u024a\7v\2\2\u024a"+
"\u024c\u024d\7t\2\2\u024d\u024e\7q\2\2\u024e\u024f\7p\2\2\u024f\u0250"+ "\u024b\7e\2\2\u024b\u024c\7j\2\2\u024cV\3\2\2\2\u024d\u024e\7u\2\2\u024e"+
"\7k\2\2\u0250\u0251\7|\2\2\u0251\u0252\7g\2\2\u0252\u0253\7f\2\2\u0253"+ "\u024f\7{\2\2\u024f\u0250\7p\2\2\u0250\u0251\7e\2\2\u0251\u0252\7j\2\2"+
"V\3\2\2\2\u0254\u0255\7v\2\2\u0255\u0256\7j\2\2\u0256\u0257\7k\2\2\u0257"+ "\u0252\u0253\7t\2\2\u0253\u0254\7q\2\2\u0254\u0255\7p\2\2\u0255\u0256"+
"\u0258\7u\2\2\u0258X\3\2\2\2\u0259\u025a\7v\2\2\u025a\u025b\7j\2\2\u025b"+ "\7k\2\2\u0256\u0257\7|\2\2\u0257\u0258\7g\2\2\u0258\u0259\7f\2\2\u0259"+
"\u025c\7t\2\2\u025c\u025d\7q\2\2\u025d\u025e\7y\2\2\u025eZ\3\2\2\2\u025f"+ "X\3\2\2\2\u025a\u025b\7v\2\2\u025b\u025c\7j\2\2\u025c\u025d\7k\2\2\u025d"+
"\u0260\7v\2\2\u0260\u0261\7j\2\2\u0261\u0262\7t\2\2\u0262\u0263\7q\2\2"+ "\u025e\7u\2\2\u025eZ\3\2\2\2\u025f\u0260\7v\2\2\u0260\u0261\7j\2\2\u0261"+
"\u0263\u0264\7y\2\2\u0264\u0265\7u\2\2\u0265\\\3\2\2\2\u0266\u0267\7v"+ "\u0262\7t\2\2\u0262\u0263\7q\2\2\u0263\u0264\7y\2\2\u0264\\\3\2\2\2\u0265"+
"\2\2\u0267\u0268\7t\2\2\u0268\u0269\7c\2\2\u0269\u026a\7p\2\2\u026a\u026b"+ "\u0266\7v\2\2\u0266\u0267\7j\2\2\u0267\u0268\7t\2\2\u0268\u0269\7q\2\2"+
"\7u\2\2\u026b\u026c\7k\2\2\u026c\u026d\7g\2\2\u026d\u026e\7p\2\2\u026e"+ "\u0269\u026a\7y\2\2\u026a\u026b\7u\2\2\u026b^\3\2\2\2\u026c\u026d\7v\2"+
"\u026f\7v\2\2\u026f^\3\2\2\2\u0270\u0271\7v\2\2\u0271\u0272\7t\2\2\u0272"+ "\2\u026d\u026e\7t\2\2\u026e\u026f\7c\2\2\u026f\u0270\7p\2\2\u0270\u0271"+
"\u0273\7{\2\2\u0273`\3\2\2\2\u0274\u0275\7x\2\2\u0275\u0276\7q\2\2\u0276"+ "\7u\2\2\u0271\u0272\7k\2\2\u0272\u0273\7g\2\2\u0273\u0274\7p\2\2\u0274"+
"\u0277\7k\2\2\u0277\u0278\7f\2\2\u0278b\3\2\2\2\u0279\u027a\7x\2\2\u027a"+ "\u0275\7v\2\2\u0275`\3\2\2\2\u0276\u0277\7v\2\2\u0277\u0278\7t\2\2\u0278"+
"\u027b\7q\2\2\u027b\u027c\7n\2\2\u027c\u027d\7c\2\2\u027d\u027e\7v\2\2"+ "\u0279\7{\2\2\u0279b\3\2\2\2\u027a\u027b\7x\2\2\u027b\u027c\7q\2\2\u027c"+
"\u027e\u027f\7k\2\2\u027f\u0280\7n\2\2\u0280\u0281\7g\2\2\u0281d\3\2\2"+ "\u027d\7k\2\2\u027d\u027e\7f\2\2\u027ed\3\2\2\2\u027f\u0280\7x\2\2\u0280"+
"\2\u0282\u0283\7y\2\2\u0283\u0284\7j\2\2\u0284\u0285\7k\2\2\u0285\u0286"+ "\u0281\7q\2\2\u0281\u0282\7n\2\2\u0282\u0283\7c\2\2\u0283\u0284\7v\2\2"+
"\7n\2\2\u0286\u0287\7g\2\2\u0287f\3\2\2\2\u0288\u028d\5i\65\2\u0289\u028d"+ "\u0284\u0285\7k\2\2\u0285\u0286\7n\2\2\u0286\u0287\7g\2\2\u0287f\3\2\2"+
"\5k\66\2\u028a\u028d\5m\67\2\u028b\u028d\5o8\2\u028c\u0288\3\2\2\2\u028c"+ "\2\u0288\u0289\7y\2\2\u0289\u028a\7j\2\2\u028a\u028b\7k\2\2\u028b\u028c"+
"\u0289\3\2\2\2\u028c\u028a\3\2\2\2\u028c\u028b\3\2\2\2\u028dh\3\2\2\2"+ "\7n\2\2\u028c\u028d\7g\2\2\u028dh\3\2\2\2\u028e\u0293\5k\66\2\u028f\u0293"+
"\u028e\u0290\5s:\2\u028f\u0291\5q9\2\u0290\u028f\3\2\2\2\u0290\u0291\3"+ "\5m\67\2\u0290\u0293\5o8\2\u0291\u0293\5q9\2\u0292\u028e\3\2\2\2\u0292"+
"\2\2\2\u0291j\3\2\2\2\u0292\u0294\5\u0081A\2\u0293\u0295\5q9\2\u0294\u0293"+ "\u028f\3\2\2\2\u0292\u0290\3\2\2\2\u0292\u0291\3\2\2\2\u0293j\3\2\2\2"+
"\3\2\2\2\u0294\u0295\3\2\2\2\u0295l\3\2\2\2\u0296\u0298\5\u008bF\2\u0297"+ "\u0294\u0296\5u;\2\u0295\u0297\5s:\2\u0296\u0295\3\2\2\2\u0296\u0297\3"+
"\u0299\5q9\2\u0298\u0297\3\2\2\2\u0298\u0299\3\2\2\2\u0299n\3\2\2\2\u029a"+ "\2\2\2\u0297l\3\2\2\2\u0298\u029a\5\u0083B\2\u0299\u029b\5s:\2\u029a\u0299"+
"\u029c\5\u0095K\2\u029b\u029d\5q9\2\u029c\u029b\3\2\2\2\u029c\u029d\3"+ "\3\2\2\2\u029a\u029b\3\2\2\2\u029bn\3\2\2\2\u029c\u029e\5\u008dG\2\u029d"+
"\2\2\2\u029dp\3\2\2\2\u029e\u029f\t\2\2\2\u029fr\3\2\2\2\u02a0\u02ab\7"+ "\u029f\5s:\2\u029e\u029d\3\2\2\2\u029e\u029f\3\2\2\2\u029fp\3\2\2\2\u02a0"+
"\62\2\2\u02a1\u02a8\5y=\2\u02a2\u02a4\5u;\2\u02a3\u02a2\3\2\2\2\u02a3"+ "\u02a2\5\u0097L\2\u02a1\u02a3\5s:\2\u02a2\u02a1\3\2\2\2\u02a2\u02a3\3"+
"\u02a4\3\2\2\2\u02a4\u02a9\3\2\2\2\u02a5\u02a6\5\177@\2\u02a6\u02a7\5"+ "\2\2\2\u02a3r\3\2\2\2\u02a4\u02a5\t\2\2\2\u02a5t\3\2\2\2\u02a6\u02b1\7"+
"u;\2\u02a7\u02a9\3\2\2\2\u02a8\u02a3\3\2\2\2\u02a8\u02a5\3\2\2\2\u02a9"+ "\62\2\2\u02a7\u02ae\5{>\2\u02a8\u02aa\5w<\2\u02a9\u02a8\3\2\2\2\u02a9"+
"\u02ab\3\2\2\2\u02aa\u02a0\3\2\2\2\u02aa\u02a1\3\2\2\2\u02abt\3\2\2\2"+ "\u02aa\3\2\2\2\u02aa\u02af\3\2\2\2\u02ab\u02ac\5\u0081A\2\u02ac\u02ad"+
"\u02ac\u02b1\5w<\2\u02ad\u02af\5{>\2\u02ae\u02ad\3\2\2\2\u02ae\u02af\3"+ "\5w<\2\u02ad\u02af\3\2\2\2\u02ae\u02a9\3\2\2\2\u02ae\u02ab\3\2\2\2\u02af"+
"\2\2\2\u02af\u02b0\3\2\2\2\u02b0\u02b2\5w<\2\u02b1\u02ae\3\2\2\2\u02b1"+ "\u02b1\3\2\2\2\u02b0\u02a6\3\2\2\2\u02b0\u02a7\3\2\2\2\u02b1v\3\2\2\2"+
"\u02b2\3\2\2\2\u02b2v\3\2\2\2\u02b3\u02b6\7\62\2\2\u02b4\u02b6\5y=\2\u02b5"+ "\u02b2\u02b7\5y=\2\u02b3\u02b5\5}?\2\u02b4\u02b3\3\2\2\2\u02b4\u02b5\3"+
"\u02b3\3\2\2\2\u02b5\u02b4\3\2\2\2\u02b6x\3\2\2\2\u02b7\u02b8\t\3\2\2"+ "\2\2\2\u02b5\u02b6\3\2\2\2\u02b6\u02b8\5y=\2\u02b7\u02b4\3\2\2\2\u02b7"+
"\u02b8z\3\2\2\2\u02b9\u02bb\5}?\2\u02ba\u02b9\3\2\2\2\u02bb\u02bc\3\2"+ "\u02b8\3\2\2\2\u02b8x\3\2\2\2\u02b9\u02bc\7\62\2\2\u02ba\u02bc\5{>\2\u02bb"+
"\2\2\u02bc\u02ba\3\2\2\2\u02bc\u02bd\3\2\2\2\u02bd|\3\2\2\2\u02be\u02c1"+ "\u02b9\3\2\2\2\u02bb\u02ba\3\2\2\2\u02bcz\3\2\2\2\u02bd\u02be\t\3\2\2"+
"\5w<\2\u02bf\u02c1\7a\2\2\u02c0\u02be\3\2\2\2\u02c0\u02bf\3\2\2\2\u02c1"+ "\u02be|\3\2\2\2\u02bf\u02c1\5\177@\2\u02c0\u02bf\3\2\2\2\u02c1\u02c2\3"+
"~\3\2\2\2\u02c2\u02c4\7a\2\2\u02c3\u02c2\3\2\2\2\u02c4\u02c5\3\2\2\2\u02c5"+ "\2\2\2\u02c2\u02c0\3\2\2\2\u02c2\u02c3\3\2\2\2\u02c3~\3\2\2\2\u02c4\u02c7"+
"\u02c3\3\2\2\2\u02c5\u02c6\3\2\2\2\u02c6\u0080\3\2\2\2\u02c7\u02c8\7\62"+ "\5y=\2\u02c5\u02c7\7a\2\2\u02c6\u02c4\3\2\2\2\u02c6\u02c5\3\2\2\2\u02c7"+
"\2\2\u02c8\u02c9\t\4\2\2\u02c9\u02ca\5\u0083B\2\u02ca\u0082\3\2\2\2\u02cb"+ "\u0080\3\2\2\2\u02c8\u02ca\7a\2\2\u02c9\u02c8\3\2\2\2\u02ca\u02cb\3\2"+
"\u02d0\5\u0085C\2\u02cc\u02ce\5\u0087D\2\u02cd\u02cc\3\2\2\2\u02cd\u02ce"+ "\2\2\u02cb\u02c9\3\2\2\2\u02cb\u02cc\3\2\2\2\u02cc\u0082\3\2\2\2\u02cd"+
"\3\2\2\2\u02ce\u02cf\3\2\2\2\u02cf\u02d1\5\u0085C\2\u02d0\u02cd\3\2\2"+ "\u02ce\7\62\2\2\u02ce\u02cf\t\4\2\2\u02cf\u02d0\5\u0085C\2\u02d0\u0084"+
"\2\u02d0\u02d1\3\2\2\2\u02d1\u0084\3\2\2\2\u02d2\u02d3\t\5\2\2\u02d3\u0086"+ "\3\2\2\2\u02d1\u02d6\5\u0087D\2\u02d2\u02d4\5\u0089E\2\u02d3\u02d2\3\2"+
"\3\2\2\2\u02d4\u02d6\5\u0089E\2\u02d5\u02d4\3\2\2\2\u02d6\u02d7\3\2\2"+ "\2\2\u02d3\u02d4\3\2\2\2\u02d4\u02d5\3\2\2\2\u02d5\u02d7\5\u0087D\2\u02d6"+
"\2\u02d7\u02d5\3\2\2\2\u02d7\u02d8\3\2\2\2\u02d8\u0088\3\2\2\2\u02d9\u02dc"+ "\u02d3\3\2\2\2\u02d6\u02d7\3\2\2\2\u02d7\u0086\3\2\2\2\u02d8\u02d9\t\5"+
"\5\u0085C\2\u02da\u02dc\7a\2\2\u02db\u02d9\3\2\2\2\u02db\u02da\3\2\2\2"+ "\2\2\u02d9\u0088\3\2\2\2\u02da\u02dc\5\u008bF\2\u02db\u02da\3\2\2\2\u02dc"+
"\u02dc\u008a\3\2\2\2\u02dd\u02df\7\62\2\2\u02de\u02e0\5\177@\2\u02df\u02de"+ "\u02dd\3\2\2\2\u02dd\u02db\3\2\2\2\u02dd\u02de\3\2\2\2\u02de\u008a\3\2"+
"\3\2\2\2\u02df\u02e0\3\2\2\2\u02e0\u02e1\3\2\2\2\u02e1\u02e2\5\u008dG"+ "\2\2\u02df\u02e2\5\u0087D\2\u02e0\u02e2\7a\2\2\u02e1\u02df\3\2\2\2\u02e1"+
"\2\u02e2\u008c\3\2\2\2\u02e3\u02e8\5\u008fH\2\u02e4\u02e6\5\u0091I\2\u02e5"+ "\u02e0\3\2\2\2\u02e2\u008c\3\2\2\2\u02e3\u02e5\7\62\2\2\u02e4\u02e6\5"+
"\u02e4\3\2\2\2\u02e5\u02e6\3\2\2\2\u02e6\u02e7\3\2\2\2\u02e7\u02e9\5\u008f"+ "\u0081A\2\u02e5\u02e4\3\2\2\2\u02e5\u02e6\3\2\2\2\u02e6\u02e7\3\2\2\2"+
"H\2\u02e8\u02e5\3\2\2\2\u02e8\u02e9\3\2\2\2\u02e9\u008e\3\2\2\2\u02ea"+ "\u02e7\u02e8\5\u008fH\2\u02e8\u008e\3\2\2\2\u02e9\u02ee\5\u0091I\2\u02ea"+
"\u02eb\t\6\2\2\u02eb\u0090\3\2\2\2\u02ec\u02ee\5\u0093J\2\u02ed\u02ec"+ "\u02ec\5\u0093J\2\u02eb\u02ea\3\2\2\2\u02eb\u02ec\3\2\2\2\u02ec\u02ed"+
"\3\2\2\2\u02ee\u02ef\3\2\2\2\u02ef\u02ed\3\2\2\2\u02ef\u02f0\3\2\2\2\u02f0"+ "\3\2\2\2\u02ed\u02ef\5\u0091I\2\u02ee\u02eb\3\2\2\2\u02ee\u02ef\3\2\2"+
"\u0092\3\2\2\2\u02f1\u02f4\5\u008fH\2\u02f2\u02f4\7a\2\2\u02f3\u02f1\3"+ "\2\u02ef\u0090\3\2\2\2\u02f0\u02f1\t\6\2\2\u02f1\u0092\3\2\2\2\u02f2\u02f4"+
"\2\2\2\u02f3\u02f2\3\2\2\2\u02f4\u0094\3\2\2\2\u02f5\u02f6\7\62\2\2\u02f6"+ "\5\u0095K\2\u02f3\u02f2\3\2\2\2\u02f4\u02f5\3\2\2\2\u02f5\u02f3\3\2\2"+
"\u02f7\t\7\2\2\u02f7\u02f8\5\u0097L\2\u02f8\u0096\3\2\2\2\u02f9\u02fe"+ "\2\u02f5\u02f6\3\2\2\2\u02f6\u0094\3\2\2\2\u02f7\u02fa\5\u0091I\2\u02f8"+
"\5\u0099M\2\u02fa\u02fc\5\u009bN\2\u02fb\u02fa\3\2\2\2\u02fb\u02fc\3\2"+ "\u02fa\7a\2\2\u02f9\u02f7\3\2\2\2\u02f9\u02f8\3\2\2\2\u02fa\u0096\3\2"+
"\2\2\u02fc\u02fd\3\2\2\2\u02fd\u02ff\5\u0099M\2\u02fe\u02fb\3\2\2\2\u02fe"+ "\2\2\u02fb\u02fc\7\62\2\2\u02fc\u02fd\t\7\2\2\u02fd\u02fe\5\u0099M\2\u02fe"+
"\u02ff\3\2\2\2\u02ff\u0098\3\2\2\2\u0300\u0301\t\b\2\2\u0301\u009a\3\2"+ "\u0098\3\2\2\2\u02ff\u0304\5\u009bN\2\u0300\u0302\5\u009dO\2\u0301\u0300"+
"\2\2\u0302\u0304\5\u009dO\2\u0303\u0302\3\2\2\2\u0304\u0305\3\2\2\2\u0305"+ "\3\2\2\2\u0301\u0302\3\2\2\2\u0302\u0303\3\2\2\2\u0303\u0305\5\u009bN"+
"\u0303\3\2\2\2\u0305\u0306\3\2\2\2\u0306\u009c\3\2\2\2\u0307\u030a\5\u0099"+ "\2\u0304\u0301\3\2\2\2\u0304\u0305\3\2\2\2\u0305\u009a\3\2\2\2\u0306\u0307"+
"M\2\u0308\u030a\7a\2\2\u0309\u0307\3\2\2\2\u0309\u0308\3\2\2\2\u030a\u009e"+ "\t\b\2\2\u0307\u009c\3\2\2\2\u0308\u030a\5\u009fP\2\u0309\u0308\3\2\2"+
"\3\2\2\2\u030b\u030e\5\u00a1Q\2\u030c\u030e\5\u00adW\2\u030d\u030b\3\2"+ "\2\u030a\u030b\3\2\2\2\u030b\u0309\3\2\2\2\u030b\u030c\3\2\2\2\u030c\u009e"+
"\2\2\u030d\u030c\3\2\2\2\u030e\u00a0\3\2\2\2\u030f\u0310\5u;\2\u0310\u0312"+ "\3\2\2\2\u030d\u0310\5\u009bN\2\u030e\u0310\7a\2\2\u030f\u030d\3\2\2\2"+
"\7\60\2\2\u0311\u0313\5u;\2\u0312\u0311\3\2\2\2\u0312\u0313\3\2\2\2\u0313"+ "\u030f\u030e\3\2\2\2\u0310\u00a0\3\2\2\2\u0311\u0314\5\u00a3R\2\u0312"+
"\u0315\3\2\2\2\u0314\u0316\5\u00a3R\2\u0315\u0314\3\2\2\2\u0315\u0316"+ "\u0314\5\u00afX\2\u0313\u0311\3\2\2\2\u0313\u0312\3\2\2\2\u0314\u00a2"+
"\3\2\2\2\u0316\u0318\3\2\2\2\u0317\u0319\5\u00abV\2\u0318\u0317\3\2\2"+ "\3\2\2\2\u0315\u0316\5w<\2\u0316\u0318\7\60\2\2\u0317\u0319\5w<\2\u0318"+
"\2\u0318\u0319\3\2\2\2\u0319\u032b\3\2\2\2\u031a\u031b\7\60\2\2\u031b"+ "\u0317\3\2\2\2\u0318\u0319\3\2\2\2\u0319\u031b\3\2\2\2\u031a\u031c\5\u00a5"+
"\u031d\5u;\2\u031c\u031e\5\u00a3R\2\u031d\u031c\3\2\2\2\u031d\u031e\3"+ "S\2\u031b\u031a\3\2\2\2\u031b\u031c\3\2\2\2\u031c\u031e\3\2\2\2\u031d"+
"\2\2\2\u031e\u0320\3\2\2\2\u031f\u0321\5\u00abV\2\u0320\u031f\3\2\2\2"+ "\u031f\5\u00adW\2\u031e\u031d\3\2\2\2\u031e\u031f\3\2\2\2\u031f\u0331"+
"\u0320\u0321\3\2\2\2\u0321\u032b\3\2\2\2\u0322\u0323\5u;\2\u0323\u0325"+ "\3\2\2\2\u0320\u0321\7\60\2\2\u0321\u0323\5w<\2\u0322\u0324\5\u00a5S\2"+
"\5\u00a3R\2\u0324\u0326\5\u00abV\2\u0325\u0324\3\2\2\2\u0325\u0326\3\2"+ "\u0323\u0322\3\2\2\2\u0323\u0324\3\2\2\2\u0324\u0326\3\2\2\2\u0325\u0327"+
"\2\2\u0326\u032b\3\2\2\2\u0327\u0328\5u;\2\u0328\u0329\5\u00abV\2\u0329"+ "\5\u00adW\2\u0326\u0325\3\2\2\2\u0326\u0327\3\2\2\2\u0327\u0331\3\2\2"+
"\u032b\3\2\2\2\u032a\u030f\3\2\2\2\u032a\u031a\3\2\2\2\u032a\u0322\3\2"+ "\2\u0328\u0329\5w<\2\u0329\u032b\5\u00a5S\2\u032a\u032c\5\u00adW\2\u032b"+
"\2\2\u032a\u0327\3\2\2\2\u032b\u00a2\3\2\2\2\u032c\u032d\5\u00a5S\2\u032d"+ "\u032a\3\2\2\2\u032b\u032c\3\2\2\2\u032c\u0331\3\2\2\2\u032d\u032e\5w"+
"\u032e\5\u00a7T\2\u032e\u00a4\3\2\2\2\u032f\u0330\t\t\2\2\u0330\u00a6"+ "<\2\u032e\u032f\5\u00adW\2\u032f\u0331\3\2\2\2\u0330\u0315\3\2\2\2\u0330"+
"\3\2\2\2\u0331\u0333\5\u00a9U\2\u0332\u0331\3\2\2\2\u0332\u0333\3\2\2"+ "\u0320\3\2\2\2\u0330\u0328\3\2\2\2\u0330\u032d\3\2\2\2\u0331\u00a4\3\2"+
"\2\u0333\u0334\3\2\2\2\u0334\u0335\5u;\2\u0335\u00a8\3\2\2\2\u0336\u0337"+ "\2\2\u0332\u0333\5\u00a7T\2\u0333\u0334\5\u00a9U\2\u0334\u00a6\3\2\2\2"+
"\t\n\2\2\u0337\u00aa\3\2\2\2\u0338\u0339\t\13\2\2\u0339\u00ac\3\2\2\2"+ "\u0335\u0336\t\t\2\2\u0336\u00a8\3\2\2\2\u0337\u0339\5\u00abV\2\u0338"+
"\u033a\u033b\5\u00afX\2\u033b\u033d\5\u00b1Y\2\u033c\u033e\5\u00abV\2"+ "\u0337\3\2\2\2\u0338\u0339\3\2\2\2\u0339\u033a\3\2\2\2\u033a\u033b\5w"+
"\u033d\u033c\3\2\2\2\u033d\u033e\3\2\2\2\u033e\u00ae\3\2\2\2\u033f\u0341"+ "<\2\u033b\u00aa\3\2\2\2\u033c\u033d\t\n\2\2\u033d\u00ac\3\2\2\2\u033e"+
"\5\u0081A\2\u0340\u0342\7\60\2\2\u0341\u0340\3\2\2\2\u0341\u0342\3\2\2"+ "\u033f\t\13\2\2\u033f\u00ae\3\2\2\2\u0340\u0341\5\u00b1Y\2\u0341\u0343"+
"\2\u0342\u034b\3\2\2\2\u0343\u0344\7\62\2\2\u0344\u0346\t\4\2\2\u0345"+ "\5\u00b3Z\2\u0342\u0344\5\u00adW\2\u0343\u0342\3\2\2\2\u0343\u0344\3\2"+
"\u0347\5\u0083B\2\u0346\u0345\3\2\2\2\u0346\u0347\3\2\2\2\u0347\u0348"+ "\2\2\u0344\u00b0\3\2\2\2\u0345\u0347\5\u0083B\2\u0346\u0348\7\60\2\2\u0347"+
"\3\2\2\2\u0348\u0349\7\60\2\2\u0349\u034b\5\u0083B\2\u034a\u033f\3\2\2"+ "\u0346\3\2\2\2\u0347\u0348\3\2\2\2\u0348\u0351\3\2\2\2\u0349\u034a\7\62"+
"\2\u034a\u0343\3\2\2\2\u034b\u00b0\3\2\2\2\u034c\u034d\5\u00b3Z\2\u034d"+ "\2\2\u034a\u034c\t\4\2\2\u034b\u034d\5\u0085C\2\u034c\u034b\3\2\2\2\u034c"+
"\u034e\5\u00a7T\2\u034e\u00b2\3\2\2\2\u034f\u0350\t\f\2\2\u0350\u00b4"+ "\u034d\3\2\2\2\u034d\u034e\3\2\2\2\u034e\u034f\7\60\2\2\u034f\u0351\5"+
"\3\2\2\2\u0351\u0352\7v\2\2\u0352\u0353\7t\2\2\u0353\u0354\7w\2\2\u0354"+ "\u0085C\2\u0350\u0345\3\2\2\2\u0350\u0349\3\2\2\2\u0351\u00b2\3\2\2\2"+
"\u035b\7g\2\2\u0355\u0356\7h\2\2\u0356\u0357\7c\2\2\u0357\u0358\7n\2\2"+ "\u0352\u0353\5\u00b5[\2\u0353\u0354\5\u00a9U\2\u0354\u00b4\3\2\2\2\u0355"+
"\u0358\u0359\7u\2\2\u0359\u035b\7g\2\2\u035a\u0351\3\2\2\2\u035a\u0355"+ "\u0356\t\f\2\2\u0356\u00b6\3\2\2\2\u0357\u0358\7v\2\2\u0358\u0359\7t\2"+
"\3\2\2\2\u035b\u00b6\3\2\2\2\u035c\u035d\7)\2\2\u035d\u035e\5\u00b9]\2"+ "\2\u0359\u035a\7w\2\2\u035a\u0361\7g\2\2\u035b\u035c\7h\2\2\u035c\u035d"+
"\u035e\u035f\7)\2\2\u035f\u0365\3\2\2\2\u0360\u0361\7)\2\2\u0361\u0362"+ "\7c\2\2\u035d\u035e\7n\2\2\u035e\u035f\7u\2\2\u035f\u0361\7g\2\2\u0360"+
"\5\u00c1a\2\u0362\u0363\7)\2\2\u0363\u0365\3\2\2\2\u0364\u035c\3\2\2\2"+ "\u0357\3\2\2\2\u0360\u035b\3\2\2\2\u0361\u00b8\3\2\2\2\u0362\u0363\7)"+
"\u0364\u0360\3\2\2\2\u0365\u00b8\3\2\2\2\u0366\u0367\n\r\2\2\u0367\u00ba"+ "\2\2\u0363\u0364\5\u00bb^\2\u0364\u0365\7)\2\2\u0365\u036b\3\2\2\2\u0366"+
"\3\2\2\2\u0368\u036a\7$\2\2\u0369\u036b\5\u00bd_\2\u036a\u0369\3\2\2\2"+ "\u0367\7)\2\2\u0367\u0368\5\u00c3b\2\u0368\u0369\7)\2\2\u0369\u036b\3"+
"\u036a\u036b\3\2\2\2\u036b\u036c\3\2\2\2\u036c\u036d\7$\2\2\u036d\u00bc"+ "\2\2\2\u036a\u0362\3\2\2\2\u036a\u0366\3\2\2\2\u036b\u00ba\3\2\2\2\u036c"+
"\3\2\2\2\u036e\u0370\5\u00bf`\2\u036f\u036e\3\2\2\2\u0370\u0371\3\2\2"+ "\u036d\n\r\2\2\u036d\u00bc\3\2\2\2\u036e\u0370\7$\2\2\u036f\u0371\5\u00bf"+
"\2\u0371\u036f\3\2\2\2\u0371\u0372\3\2\2\2\u0372\u00be\3\2\2\2\u0373\u0376"+ "`\2\u0370\u036f\3\2\2\2\u0370\u0371\3\2\2\2\u0371\u0372\3\2\2\2\u0372"+
"\n\16\2\2\u0374\u0376\5\u00c1a\2\u0375\u0373\3\2\2\2\u0375\u0374\3\2\2"+ "\u0373\7$\2\2\u0373\u00be\3\2\2\2\u0374\u0376\5\u00c1a\2\u0375\u0374\3"+
"\2\u0376\u00c0\3\2\2\2\u0377\u0378\7^\2\2\u0378\u037c\t\17\2\2\u0379\u037c"+ "\2\2\2\u0376\u0377\3\2\2\2\u0377\u0375\3\2\2\2\u0377\u0378\3\2\2\2\u0378"+
"\5\u00c3b\2\u037a\u037c\5\u00c7d\2\u037b\u0377\3\2\2\2\u037b\u0379\3\2"+ "\u00c0\3\2\2\2\u0379\u037c\n\16\2\2\u037a\u037c\5\u00c3b\2\u037b\u0379"+
"\2\2\u037b\u037a\3\2\2\2\u037c\u00c2\3\2\2\2\u037d\u037e\7^\2\2\u037e"+ "\3\2\2\2\u037b\u037a\3\2\2\2\u037c\u00c2\3\2\2\2\u037d\u037e\7^\2\2\u037e"+
"\u0389\5\u008fH\2\u037f\u0380\7^\2\2\u0380\u0381\5\u008fH\2\u0381\u0382"+ "\u0382\t\17\2\2\u037f\u0382\5\u00c5c\2\u0380\u0382\5\u00c9e\2\u0381\u037d"+
"\5\u008fH\2\u0382\u0389\3\2\2\2\u0383\u0384\7^\2\2\u0384\u0385\5\u00c5"+ "\3\2\2\2\u0381\u037f\3\2\2\2\u0381\u0380\3\2\2\2\u0382\u00c4\3\2\2\2\u0383"+
"c\2\u0385\u0386\5\u008fH\2\u0386\u0387\5\u008fH\2\u0387\u0389\3\2\2\2"+ "\u0384\7^\2\2\u0384\u038f\5\u0091I\2\u0385\u0386\7^\2\2\u0386\u0387\5"+
"\u0388\u037d\3\2\2\2\u0388\u037f\3\2\2\2\u0388\u0383\3\2\2\2\u0389\u00c4"+ "\u0091I\2\u0387\u0388\5\u0091I\2\u0388\u038f\3\2\2\2\u0389\u038a\7^\2"+
"\3\2\2\2\u038a\u038b\t\20\2\2\u038b\u00c6\3\2\2\2\u038c\u038d\7^\2\2\u038d"+ "\2\u038a\u038b\5\u00c7d\2\u038b\u038c\5\u0091I\2\u038c\u038d\5\u0091I"+
"\u038e\7w\2\2\u038e\u038f\5\u0085C\2\u038f\u0390\5\u0085C\2\u0390\u0391"+ "\2\u038d\u038f\3\2\2\2\u038e\u0383\3\2\2\2\u038e\u0385\3\2\2\2\u038e\u0389"+
"\5\u0085C\2\u0391\u0392\5\u0085C\2\u0392\u00c8\3\2\2\2\u0393\u0394\7p"+ "\3\2\2\2\u038f\u00c6\3\2\2\2\u0390\u0391\t\20\2\2\u0391\u00c8\3\2\2\2"+
"\2\2\u0394\u0395\7w\2\2\u0395\u0396\7n\2\2\u0396\u0397\7n\2\2\u0397\u00ca"+ "\u0392\u0393\7^\2\2\u0393\u0394\7w\2\2\u0394\u0395\5\u0087D\2\u0395\u0396"+
"\3\2\2\2\u0398\u0399\7*\2\2\u0399\u00cc\3\2\2\2\u039a\u039b\7+\2\2\u039b"+ "\5\u0087D\2\u0396\u0397\5\u0087D\2\u0397\u0398\5\u0087D\2\u0398\u00ca"+
"\u00ce\3\2\2\2\u039c\u039d\7}\2\2\u039d\u00d0\3\2\2\2\u039e\u039f\7\177"+ "\3\2\2\2\u0399\u039a\7p\2\2\u039a\u039b\7w\2\2\u039b\u039c\7n\2\2\u039c"+
"\2\2\u039f\u00d2\3\2\2\2\u03a0\u03a1\7]\2\2\u03a1\u00d4\3\2\2\2\u03a2"+ "\u039d\7n\2\2\u039d\u00cc\3\2\2\2\u039e\u039f\7*\2\2\u039f\u00ce\3\2\2"+
"\u03a3\7_\2\2\u03a3\u00d6\3\2\2\2\u03a4\u03a5\7=\2\2\u03a5\u00d8\3\2\2"+ "\2\u03a0\u03a1\7+\2\2\u03a1\u00d0\3\2\2\2\u03a2\u03a3\7}\2\2\u03a3\u00d2"+
"\2\u03a6\u03a7\7.\2\2\u03a7\u00da\3\2\2\2\u03a8\u03a9\7\60\2\2\u03a9\u00dc"+ "\3\2\2\2\u03a4\u03a5\7\177\2\2\u03a5\u00d4\3\2\2\2\u03a6\u03a7\7]\2\2"+
"\3\2\2\2\u03aa\u03ab\7?\2\2\u03ab\u00de\3\2\2\2\u03ac\u03ad\7@\2\2\u03ad"+ "\u03a7\u00d6\3\2\2\2\u03a8\u03a9\7_\2\2\u03a9\u00d8\3\2\2\2\u03aa\u03ab"+
"\u00e0\3\2\2\2\u03ae\u03af\7>\2\2\u03af\u00e2\3\2\2\2\u03b0\u03b1\7#\2"+ "\7=\2\2\u03ab\u00da\3\2\2\2\u03ac\u03ad\7.\2\2\u03ad\u00dc\3\2\2\2\u03ae"+
"\2\u03b1\u00e4\3\2\2\2\u03b2\u03b3\7\u0080\2\2\u03b3\u00e6\3\2\2\2\u03b4"+ "\u03af\7\60\2\2\u03af\u00de\3\2\2\2\u03b0\u03b1\7?\2\2\u03b1\u00e0\3\2"+
"\u03b5\7A\2\2\u03b5\u00e8\3\2\2\2\u03b6\u03b7\7<\2\2\u03b7\u00ea\3\2\2"+ "\2\2\u03b2\u03b3\7@\2\2\u03b3\u00e2\3\2\2\2\u03b4\u03b5\7>\2\2\u03b5\u00e4"+
"\2\u03b8\u03b9\7?\2\2\u03b9\u03ba\7?\2\2\u03ba\u00ec\3\2\2\2\u03bb\u03bc"+ "\3\2\2\2\u03b6\u03b7\7#\2\2\u03b7\u00e6\3\2\2\2\u03b8\u03b9\7\u0080\2"+
"\7>\2\2\u03bc\u03bd\7?\2\2\u03bd\u00ee\3\2\2\2\u03be\u03bf\7@\2\2\u03bf"+ "\2\u03b9\u00e8\3\2\2\2\u03ba\u03bb\7A\2\2\u03bb\u00ea\3\2\2\2\u03bc\u03bd"+
"\u03c0\7?\2\2\u03c0\u00f0\3\2\2\2\u03c1\u03c2\7#\2\2\u03c2\u03c3\7?\2"+ "\7<\2\2\u03bd\u00ec\3\2\2\2\u03be\u03bf\7?\2\2\u03bf\u03c0\7?\2\2\u03c0"+
"\2\u03c3\u00f2\3\2\2\2\u03c4\u03c5\7(\2\2\u03c5\u03c6\7(\2\2\u03c6\u00f4"+ "\u00ee\3\2\2\2\u03c1\u03c2\7>\2\2\u03c2\u03c3\7?\2\2\u03c3\u00f0\3\2\2"+
"\3\2\2\2\u03c7\u03c8\7~\2\2\u03c8\u03c9\7~\2\2\u03c9\u00f6\3\2\2\2\u03ca"+ "\2\u03c4\u03c5\7@\2\2\u03c5\u03c6\7?\2\2\u03c6\u00f2\3\2\2\2\u03c7\u03c8"+
"\u03cb\7-\2\2\u03cb\u03cc\7-\2\2\u03cc\u00f8\3\2\2\2\u03cd\u03ce\7/\2"+ "\7#\2\2\u03c8\u03c9\7?\2\2\u03c9\u00f4\3\2\2\2\u03ca\u03cb\7(\2\2\u03cb"+
"\2\u03ce\u03cf\7/\2\2\u03cf\u00fa\3\2\2\2\u03d0\u03d1\7-\2\2\u03d1\u00fc"+ "\u03cc\7(\2\2\u03cc\u00f6\3\2\2\2\u03cd\u03ce\7~\2\2\u03ce\u03cf\7~\2"+
"\3\2\2\2\u03d2\u03d3\7/\2\2\u03d3\u00fe\3\2\2\2\u03d4\u03d5\7,\2\2\u03d5"+ "\2\u03cf\u00f8\3\2\2\2\u03d0\u03d1\7-\2\2\u03d1\u03d2\7-\2\2\u03d2\u00fa"+
"\u0100\3\2\2\2\u03d6\u03d7\7\61\2\2\u03d7\u0102\3\2\2\2\u03d8\u03d9\7"+ "\3\2\2\2\u03d3\u03d4\7/\2\2\u03d4\u03d5\7/\2\2\u03d5\u00fc\3\2\2\2\u03d6"+
"(\2\2\u03d9\u0104\3\2\2\2\u03da\u03db\7~\2\2\u03db\u0106\3\2\2\2\u03dc"+ "\u03d7\7-\2\2\u03d7\u00fe\3\2\2\2\u03d8\u03d9\7/\2\2\u03d9\u0100\3\2\2"+
"\u03dd\7`\2\2\u03dd\u0108\3\2\2\2\u03de\u03df\7\'\2\2\u03df\u010a\3\2"+ "\2\u03da\u03db\7,\2\2\u03db\u0102\3\2\2\2\u03dc\u03dd\7\61\2\2\u03dd\u0104"+
"\2\2\u03e0\u03e1\7/\2\2\u03e1\u03e2\7@\2\2\u03e2\u010c\3\2\2\2\u03e3\u03e4"+ "\3\2\2\2\u03de\u03df\7(\2\2\u03df\u0106\3\2\2\2\u03e0\u03e1\7~\2\2\u03e1"+
"\7<\2\2\u03e4\u03e5\7<\2\2\u03e5\u010e\3\2\2\2\u03e6\u03e7\7-\2\2\u03e7"+ "\u0108\3\2\2\2\u03e2\u03e3\7`\2\2\u03e3\u010a\3\2\2\2\u03e4\u03e5\7\'"+
"\u03e8\7?\2\2\u03e8\u0110\3\2\2\2\u03e9\u03ea\7/\2\2\u03ea\u03eb\7?\2"+ "\2\2\u03e5\u010c\3\2\2\2\u03e6\u03e7\7/\2\2\u03e7\u03e8\7@\2\2\u03e8\u010e"+
"\2\u03eb\u0112\3\2\2\2\u03ec\u03ed\7,\2\2\u03ed\u03ee\7?\2\2\u03ee\u0114"+ "\3\2\2\2\u03e9\u03ea\7<\2\2\u03ea\u03eb\7<\2\2\u03eb\u0110\3\2\2\2\u03ec"+
"\3\2\2\2\u03ef\u03f0\7\61\2\2\u03f0\u03f1\7?\2\2\u03f1\u0116\3\2\2\2\u03f2"+ "\u03ed\7-\2\2\u03ed\u03ee\7?\2\2\u03ee\u0112\3\2\2\2\u03ef\u03f0\7/\2"+
"\u03f3\7(\2\2\u03f3\u03f4\7?\2\2\u03f4\u0118\3\2\2\2\u03f5\u03f6\7~\2"+ "\2\u03f0\u03f1\7?\2\2\u03f1\u0114\3\2\2\2\u03f2\u03f3\7,\2\2\u03f3\u03f4"+
"\2\u03f6\u03f7\7?\2\2\u03f7\u011a\3\2\2\2\u03f8\u03f9\7`\2\2\u03f9\u03fa"+ "\7?\2\2\u03f4\u0116\3\2\2\2\u03f5\u03f6\7\61\2\2\u03f6\u03f7\7?\2\2\u03f7"+
"\7?\2\2\u03fa\u011c\3\2\2\2\u03fb\u03fc\7\'\2\2\u03fc\u03fd\7?\2\2\u03fd"+ "\u0118\3\2\2\2\u03f8\u03f9\7(\2\2\u03f9\u03fa\7?\2\2\u03fa\u011a\3\2\2"+
"\u011e\3\2\2\2\u03fe\u03ff\7>\2\2\u03ff\u0400\7>\2\2\u0400\u0401\7?\2"+ "\2\u03fb\u03fc\7~\2\2\u03fc\u03fd\7?\2\2\u03fd\u011c\3\2\2\2\u03fe\u03ff"+
"\2\u0401\u0120\3\2\2\2\u0402\u0403\7@\2\2\u0403\u0404\7@\2\2\u0404\u0405"+ "\7`\2\2\u03ff\u0400\7?\2\2\u0400\u011e\3\2\2\2\u0401\u0402\7\'\2\2\u0402"+
"\7?\2\2\u0405\u0122\3\2\2\2\u0406\u0407\7@\2\2\u0407\u0408\7@\2\2\u0408"+ "\u0403\7?\2\2\u0403\u0120\3\2\2\2\u0404\u0405\7>\2\2\u0405\u0406\7>\2"+
"\u0409\7@\2\2\u0409\u040a\7?\2\2\u040a\u0124\3\2\2\2\u040b\u040f\5\u0127"+ "\2\u0406\u0407\7?\2\2\u0407\u0122\3\2\2\2\u0408\u0409\7@\2\2\u0409\u040a"+
"\u0094\2\u040c\u040e\5\u0129\u0095\2\u040d\u040c\3\2\2\2\u040e\u0411\3"+ "\7@\2\2\u040a\u040b\7?\2\2\u040b\u0124\3\2\2\2\u040c\u040d\7@\2\2\u040d"+
"\2\2\2\u040f\u040d\3\2\2\2\u040f\u0410\3\2\2\2\u0410\u0126\3\2\2\2\u0411"+ "\u040e\7@\2\2\u040e\u040f\7@\2\2\u040f\u0410\7?\2\2\u0410\u0126\3\2\2"+
"\u040f\3\2\2\2\u0412\u0419\t\21\2\2\u0413\u0414\n\22\2\2\u0414\u0419\6"+ "\2\u0411\u0415\5\u0129\u0095\2\u0412\u0414\5\u012b\u0096\2\u0413\u0412"+
"\u0094\2\2\u0415\u0416\t\23\2\2\u0416\u0417\t\24\2\2\u0417\u0419\6\u0094"+ "\3\2\2\2\u0414\u0417\3\2\2\2\u0415\u0413\3\2\2\2\u0415\u0416\3\2\2\2\u0416"+
"\3\2\u0418\u0412\3\2\2\2\u0418\u0413\3\2\2\2\u0418\u0415\3\2\2\2\u0419"+ "\u0128\3\2\2\2\u0417\u0415\3\2\2\2\u0418\u041f\t\21\2\2\u0419\u041a\n"+
"\u0128\3\2\2\2\u041a\u0421\t\25\2\2\u041b\u041c\n\22\2\2\u041c\u0421\6"+ "\22\2\2\u041a\u041f\6\u0095\2\2\u041b\u041c\t\23\2\2\u041c\u041d\t\24"+
"\u0095\4\2\u041d\u041e\t\23\2\2\u041e\u041f\t\24\2\2\u041f\u0421\6\u0095"+ "\2\2\u041d\u041f\6\u0095\3\2\u041e\u0418\3\2\2\2\u041e\u0419\3\2\2\2\u041e"+
"\5\2\u0420\u041a\3\2\2\2\u0420\u041b\3\2\2\2\u0420\u041d\3\2\2\2\u0421"+ "\u041b\3\2\2\2\u041f\u012a\3\2\2\2\u0420\u0427\t\25\2\2\u0421\u0422\n"+
"\u012a\3\2\2\2\u0422\u0423\7B\2\2\u0423\u012c\3\2\2\2\u0424\u0425\7\60"+ "\22\2\2\u0422\u0427\6\u0096\4\2\u0423\u0424\t\23\2\2\u0424\u0425\t\24"+
"\2\2\u0425\u0426\7\60\2\2\u0426\u0427\7\60\2\2\u0427\u012e\3\2\2\2\u0428"+ "\2\2\u0425\u0427\6\u0096\5\2\u0426\u0420\3\2\2\2\u0426\u0421\3\2\2\2\u0426"+
"\u042a\t\26\2\2\u0429\u0428\3\2\2\2\u042a\u042b\3\2\2\2\u042b\u0429\3"+ "\u0423\3\2\2\2\u0427\u012c\3\2\2\2\u0428\u0429\7B\2\2\u0429\u012e\3\2"+
"\2\2\2\u042b\u042c\3\2\2\2\u042c\u042d\3\2\2\2\u042d\u042e\b\u0098\2\2"+ "\2\2\u042a\u042b\7\60\2\2\u042b\u042c\7\60\2\2\u042c\u042d\7\60\2\2\u042d"+
"\u042e\u0130\3\2\2\2\u042f\u0430\7\61\2\2\u0430\u0431\7,\2\2\u0431\u0435"+ "\u0130\3\2\2\2\u042e\u0430\t\26\2\2\u042f\u042e\3\2\2\2\u0430\u0431\3"+
"\3\2\2\2\u0432\u0434\13\2\2\2\u0433\u0432\3\2\2\2\u0434\u0437\3\2\2\2"+ "\2\2\2\u0431\u042f\3\2\2\2\u0431\u0432\3\2\2\2\u0432\u0433\3\2\2\2\u0433"+
"\u0435\u0436\3\2\2\2\u0435\u0433\3\2\2\2\u0436\u0438\3\2\2\2\u0437\u0435"+ "\u0434\b\u0099\2\2\u0434\u0132\3\2\2\2\u0435\u0436\7\61\2\2\u0436\u0437"+
"\3\2\2\2\u0438\u0439\7,\2\2\u0439\u043a\7\61\2\2\u043a\u043b\3\2\2\2\u043b"+ "\7,\2\2\u0437\u043b\3\2\2\2\u0438\u043a\13\2\2\2\u0439\u0438\3\2\2\2\u043a"+
"\u043c\b\u0099\2\2\u043c\u0132\3\2\2\2\u043d\u043e\7\61\2\2\u043e\u043f"+ "\u043d\3\2\2\2\u043b\u043c\3\2\2\2\u043b\u0439\3\2\2\2\u043c\u043e\3\2"+
"\7\61\2\2\u043f\u0443\3\2\2\2\u0440\u0442\n\27\2\2\u0441\u0440\3\2\2\2"+ "\2\2\u043d\u043b\3\2\2\2\u043e\u043f\7,\2\2\u043f\u0440\7\61\2\2\u0440"+
"\u0442\u0445\3\2\2\2\u0443\u0441\3\2\2\2\u0443\u0444\3\2\2\2\u0444\u0446"+ "\u0441\3\2\2\2\u0441\u0442\b\u009a\2\2\u0442\u0134\3\2\2\2\u0443\u0444"+
"\3\2\2\2\u0445\u0443\3\2\2\2\u0446\u0447\b\u009a\2\2\u0447\u0134\3\2\2"+ "\7\61\2\2\u0444\u0445\7\61\2\2\u0445\u0449\3\2\2\2\u0446\u0448\n\27\2"+
"\28\2\u028c\u0290\u0294\u0298\u029c\u02a3\u02a8\u02aa\u02ae\u02b1\u02b5"+ "\2\u0447\u0446\3\2\2\2\u0448\u044b\3\2\2\2\u0449\u0447\3\2\2\2\u0449\u044a"+
"\u02bc\u02c0\u02c5\u02cd\u02d0\u02d7\u02db\u02df\u02e5\u02e8\u02ef\u02f3"+ "\3\2\2\2\u044a\u044c\3\2\2\2\u044b\u0449\3\2\2\2\u044c\u044d\b\u009b\2"+
"\u02fb\u02fe\u0305\u0309\u030d\u0312\u0315\u0318\u031d\u0320\u0325\u032a"+ "\2\u044d\u0136\3\2\2\28\2\u0292\u0296\u029a\u029e\u02a2\u02a9\u02ae\u02b0"+
"\u0332\u033d\u0341\u0346\u034a\u035a\u0364\u036a\u0371\u0375\u037b\u0388"+ "\u02b4\u02b7\u02bb\u02c2\u02c6\u02cb\u02d3\u02d6\u02dd\u02e1\u02e5\u02eb"+
"\u040f\u0418\u0420\u042b\u0435\u0443\3\b\2\2"; "\u02ee\u02f5\u02f9\u0301\u0304\u030b\u030f\u0313\u0318\u031b\u031e\u0323"+
"\u0326\u032b\u0330\u0338\u0343\u0347\u034c\u0350\u0360\u036a\u0370\u0377"+
"\u037b\u0381\u038e\u0415\u041e\u0426\u0431\u043b\u0449\3\b\2\2";
public static final ATN _ATN = public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray()); new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static { static {

View File

@ -1,205 +1,207 @@
ABSTRACT=1 T__0=1
ASSERT=2 ABSTRACT=2
BOOLEAN=3 ASSERT=3
BREAK=4 BOOLEAN=4
BYTE=5 BREAK=5
CASE=6 BYTE=6
CATCH=7 CASE=7
CHAR=8 CATCH=8
CLASS=9 CHAR=9
CONST=10 CLASS=10
CONTINUE=11 CONST=11
DEFAULT=12 CONTINUE=12
DO=13 DEFAULT=13
DOUBLE=14 DO=14
ELSE=15 DOUBLE=15
ENUM=16 ELSE=16
EXTENDS=17 ENUM=17
FINAL=18 EXTENDS=18
FINALLY=19 FINAL=19
FLOAT=20 FINALLY=20
FOR=21 FLOAT=21
IF=22 FOR=22
GOTO=23 IF=23
IMPLEMENTS=24 GOTO=24
IMPORT=25 IMPLEMENTS=25
INSTANCEOF=26 IMPORT=26
INT=27 INSTANCEOF=27
INTERFACE=28 INT=28
LONG=29 INTERFACE=29
NATIVE=30 LONG=30
NEW=31 NATIVE=31
PACKAGE=32 NEW=32
PRIVATE=33 PACKAGE=33
PROTECTED=34 PRIVATE=34
PUBLIC=35 PROTECTED=35
RETURN=36 PUBLIC=36
SHORT=37 RETURN=37
STATIC=38 SHORT=38
STRICTFP=39 STATIC=39
SUPER=40 STRICTFP=40
SWITCH=41 SUPER=41
SYNCHRONIZED=42 SWITCH=42
THIS=43 SYNCHRONIZED=43
THROW=44 THIS=44
THROWS=45 THROW=45
TRANSIENT=46 THROWS=46
TRY=47 TRANSIENT=47
VOID=48 TRY=48
VOLATILE=49 VOID=49
WHILE=50 VOLATILE=50
IntegerLiteral=51 WHILE=51
FloatingPointLiteral=52 IntegerLiteral=52
BooleanLiteral=53 FloatingPointLiteral=53
CharacterLiteral=54 BooleanLiteral=54
StringLiteral=55 CharacterLiteral=55
NullLiteral=56 StringLiteral=56
LPAREN=57 NullLiteral=57
RPAREN=58 LPAREN=58
LBRACE=59 RPAREN=59
RBRACE=60 LBRACE=60
LBRACK=61 RBRACE=61
RBRACK=62 LBRACK=62
SEMI=63 RBRACK=63
COMMA=64 SEMI=64
DOT=65 COMMA=65
ASSIGN=66 DOT=66
GT=67 ASSIGN=67
LT=68 GT=68
BANG=69 LT=69
TILDE=70 BANG=70
QUESTION=71 TILDE=71
COLON=72 QUESTION=72
EQUAL=73 COLON=73
LE=74 EQUAL=74
GE=75 LE=75
NOTEQUAL=76 GE=76
AND=77 NOTEQUAL=77
OR=78 AND=78
INC=79 OR=79
DEC=80 INC=80
ADD=81 DEC=81
SUB=82 ADD=82
MUL=83 SUB=83
DIV=84 MUL=84
BITAND=85 DIV=85
BITOR=86 BITAND=86
CARET=87 BITOR=87
MOD=88 CARET=88
ARROW=89 MOD=89
COLONCOLON=90 ARROW=90
ADD_ASSIGN=91 COLONCOLON=91
SUB_ASSIGN=92 ADD_ASSIGN=92
MUL_ASSIGN=93 SUB_ASSIGN=93
DIV_ASSIGN=94 MUL_ASSIGN=94
AND_ASSIGN=95 DIV_ASSIGN=95
OR_ASSIGN=96 AND_ASSIGN=96
XOR_ASSIGN=97 OR_ASSIGN=97
MOD_ASSIGN=98 XOR_ASSIGN=98
LSHIFT_ASSIGN=99 MOD_ASSIGN=99
RSHIFT_ASSIGN=100 LSHIFT_ASSIGN=100
URSHIFT_ASSIGN=101 RSHIFT_ASSIGN=101
Identifier=102 URSHIFT_ASSIGN=102
AT=103 Identifier=103
ELLIPSIS=104 AT=104
WS=105 ELLIPSIS=105
COMMENT=106 WS=106
LINE_COMMENT=107 COMMENT=107
'abstract'=1 LINE_COMMENT=108
'assert'=2 'var'=1
'boolean'=3 'abstract'=2
'break'=4 'assert'=3
'byte'=5 'boolean'=4
'case'=6 'break'=5
'catch'=7 'byte'=6
'char'=8 'case'=7
'class'=9 'catch'=8
'const'=10 'char'=9
'continue'=11 'class'=10
'default'=12 'const'=11
'do'=13 'continue'=12
'double'=14 'default'=13
'else'=15 'do'=14
'enum'=16 'double'=15
'extends'=17 'else'=16
'final'=18 'enum'=17
'finally'=19 'extends'=18
'float'=20 'final'=19
'for'=21 'finally'=20
'if'=22 'float'=21
'goto'=23 'for'=22
'implements'=24 'if'=23
'import'=25 'goto'=24
'instanceof'=26 'implements'=25
'int'=27 'import'=26
'interface'=28 'instanceof'=27
'long'=29 'int'=28
'native'=30 'interface'=29
'new'=31 'long'=30
'package'=32 'native'=31
'private'=33 'new'=32
'protected'=34 'package'=33
'public'=35 'private'=34
'return'=36 'protected'=35
'short'=37 'public'=36
'static'=38 'return'=37
'strictfp'=39 'short'=38
'super'=40 'static'=39
'switch'=41 'strictfp'=40
'synchronized'=42 'super'=41
'this'=43 'switch'=42
'throw'=44 'synchronized'=43
'throws'=45 'this'=44
'transient'=46 'throw'=45
'try'=47 'throws'=46
'void'=48 'transient'=47
'volatile'=49 'try'=48
'while'=50 'void'=49
'null'=56 'volatile'=50
'('=57 'while'=51
')'=58 'null'=57
'{'=59 '('=58
'}'=60 ')'=59
'['=61 '{'=60
']'=62 '}'=61
';'=63 '['=62
','=64 ']'=63
'.'=65 ';'=64
'='=66 ','=65
'>'=67 '.'=66
'<'=68 '='=67
'!'=69 '>'=68
'~'=70 '<'=69
'?'=71 '!'=70
':'=72 '~'=71
'=='=73 '?'=72
'<='=74 ':'=73
'>='=75 '=='=74
'!='=76 '<='=75
'&&'=77 '>='=76
'||'=78 '!='=77
'++'=79 '&&'=78
'--'=80 '||'=79
'+'=81 '++'=80
'-'=82 '--'=81
'*'=83 '+'=82
'/'=84 '-'=83
'&'=85 '*'=84
'|'=86 '/'=85
'^'=87 '&'=86
'%'=88 '|'=87
'->'=89 '^'=88
'::'=90 '%'=89
'+='=91 '->'=90
'-='=92 '::'=91
'*='=93 '+='=92
'/='=94 '-='=93
'&='=95 '*='=94
'|='=96 '/='=95
'^='=97 '&='=96
'%='=98 '|='=97
'<<='=99 '^='=98
'>>='=100 '%='=99
'>>>='=101 '<<='=100
'@'=103 '>>='=101
'...'=104 '>>>='=102
'@'=104
'...'=105

File diff suppressed because it is too large Load Diff

View File

@ -12,6 +12,7 @@ import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation; import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation;
import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Token;
import java.lang.reflect.Modifier;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
@ -33,6 +34,7 @@ public class ClassOrInterface extends SyntaxTreeNode implements TypeScope{
public ClassOrInterface(int modifiers, JavaClassName name, List<Field> fielddecl, List<Method> methods, List<Constructor> constructors, GenericDeclarationList genericClassParameters, public ClassOrInterface(int modifiers, JavaClassName name, List<Field> fielddecl, List<Method> methods, List<Constructor> constructors, GenericDeclarationList genericClassParameters,
RefType superClass, Boolean isInterface, List<RefType> implementedInterfaces, Token offset){ RefType superClass, Boolean isInterface, List<RefType> implementedInterfaces, Token offset){
super(offset); super(offset);
if(isInterface && !Modifier.isInterface(modifiers))modifiers += Modifier.INTERFACE;
this.modifiers = modifiers; this.modifiers = modifiers;
this.name = name; this.name = name;
this.fields = fielddecl; this.fields = fielddecl;

View File

@ -28,6 +28,7 @@ public class Constructor extends Method {
protected static Block prepareBlock(Block constructorBlock, List<Statement> fieldInitializations){ protected static Block prepareBlock(Block constructorBlock, List<Statement> fieldInitializations){
List<Statement> statements = constructorBlock.getStatements(); List<Statement> statements = constructorBlock.getStatements();
statements.add(0, new SuperCall(constructorBlock.getOffset())); statements.add(0, new SuperCall(constructorBlock.getOffset()));
statements.addAll(fieldInitializations);
return new Block(statements, constructorBlock.getOffset()); return new Block(statements, constructorBlock.getOffset());
} }

View File

@ -17,6 +17,7 @@ import de.dhbwstuttgart.syntaxtree.type.Void;
import de.dhbwstuttgart.syntaxtree.*; import de.dhbwstuttgart.syntaxtree.*;
import de.dhbwstuttgart.syntaxtree.statement.Block; import de.dhbwstuttgart.syntaxtree.statement.Block;
import de.dhbwstuttgart.syntaxtree.statement.Statement; import de.dhbwstuttgart.syntaxtree.statement.Statement;
import de.dhbwstuttgart.syntaxtree.type.WildcardType;
import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Token;
/** /**
@ -37,7 +38,7 @@ public class ASTFactory {
methoden.add(createMethod(method, jreClass)); methoden.add(createMethod(method, jreClass));
} }
List<Field> felder = new ArrayList<>(); List<Field> felder = new ArrayList<>();
for(java.lang.reflect.Field field : jreClass.getFields()){ for(java.lang.reflect.Field field : jreClass.getDeclaredFields()){
felder.add(createField(field, name)); felder.add(createField(field, name));
} }
int modifier = jreClass.getModifiers(); int modifier = jreClass.getModifiers();
@ -50,15 +51,15 @@ public class ASTFactory {
java.lang.Class superjreClass = jreClass.getSuperclass(); java.lang.Class superjreClass = jreClass.getSuperclass();
RefType superClass; RefType superClass;
if(parameterSuperClass != null){ if(parameterSuperClass != null){
superClass = (RefType) convertType(parameterSuperClass); superClass = (RefType) createType(parameterSuperClass);
}else if(superjreClass != null){ }else if(superjreClass != null){
superClass = (RefType) convertType(superjreClass); superClass = (RefType) createType(superjreClass);
}else{//Jede Klasse und jedes Interface erbt von Object: (auch Object selbst!) }else{//Jede Klasse und jedes Interface erbt von Object: (auch Object selbst!)
superClass = (RefType) createType(java.lang.Object.class, name, ""); superClass = (RefType) createType(java.lang.Object.class);
} }
List<RefType> implementedInterfaces = new ArrayList<>(); List<RefType> implementedInterfaces = new ArrayList<>();
for(Type jreInterface : jreClass.getGenericInterfaces()){ for(Type jreInterface : jreClass.getGenericInterfaces()){
implementedInterfaces.add((RefType) createType(jreInterface, name, "")); implementedInterfaces.add((RefType) createType(jreInterface));
} }
GenericDeclarationList genericDeclarationList = createGenerics(jreClass.getTypeParameters(), jreClass, null); GenericDeclarationList genericDeclarationList = createGenerics(jreClass.getTypeParameters(), jreClass, null);
@ -67,29 +68,8 @@ public class ASTFactory {
return new ClassOrInterface(modifier, name, felder, methoden, konstruktoren, genericDeclarationList, superClass,isInterface, implementedInterfaces, offset); return new ClassOrInterface(modifier, name, felder, methoden, konstruktoren, genericDeclarationList, superClass,isInterface, implementedInterfaces, offset);
} }
private static RefTypeOrTPHOrWildcardOrGeneric convertType(Type type){
if(type instanceof ParameterizedType){
List<RefTypeOrTPHOrWildcardOrGeneric> params = new ArrayList<>();
for(Type paramType : ((ParameterizedType)type).getActualTypeArguments()){
params.add(convertType(paramType));
}
JavaClassName name = new JavaClassName(((ParameterizedType) type).getRawType().getTypeName());
return new RefType(name, params, new NullToken());
}else if(type instanceof TypeVariable){
return new GenericRefType(((TypeVariable) type).getName(), new NullToken());
}else if(type instanceof Class){
List<RefTypeOrTPHOrWildcardOrGeneric> params = new ArrayList<>();
Class paramClass = (Class) type;
for(TypeVariable tv : paramClass.getTypeParameters()){
params.add(new GenericRefType(tv.getName(), new NullToken()));
}
JavaClassName name = new JavaClassName(paramClass.getName());
return new RefType(name, params, new NullToken());
}else throw new NotImplementedException();
}
private static Field createField(java.lang.reflect.Field field, JavaClassName jreClass) { private static Field createField(java.lang.reflect.Field field, JavaClassName jreClass) {
return new Field(field.getName(), createType(field.getType(), jreClass, null), field.getModifiers(), new NullToken()); return new Field(field.getName(), createType(field.getType()), field.getModifiers(), new NullToken());
} }
//private static RefType createType(Class classType) { //private static RefType createType(Class classType) {
@ -98,13 +78,13 @@ public class ASTFactory {
private static de.dhbwstuttgart.syntaxtree.Constructor createConstructor(Constructor constructor, Class inClass) { private static de.dhbwstuttgart.syntaxtree.Constructor createConstructor(Constructor constructor, Class inClass) {
String name = constructor.getName(); String name = constructor.getName();
RefTypeOrTPHOrWildcardOrGeneric returnType = createType(inClass, new JavaClassName(inClass.getName()), name); RefTypeOrTPHOrWildcardOrGeneric returnType = createType(inClass);
Parameter[] jreParams = constructor.getParameters(); Parameter[] jreParams = constructor.getParameters();
Type[] jreGenericParams = constructor.getGenericParameterTypes(); Type[] jreGenericParams = constructor.getGenericParameterTypes();
List<FormalParameter> params = new ArrayList<>(); List<FormalParameter> params = new ArrayList<>();
int i = 0; int i = 0;
for(Type jreParam : jreGenericParams){ for(Type jreParam : jreGenericParams){
RefTypeOrTPHOrWildcardOrGeneric paramType = createType(jreParam,new JavaClassName(inClass.getName()), name); RefTypeOrTPHOrWildcardOrGeneric paramType = createType(jreParam);
params.add(new FormalParameter(jreParams[i].getName(),paramType, new NullToken())); params.add(new FormalParameter(jreParams[i].getName(),paramType, new NullToken()));
i++; i++;
} }
@ -130,13 +110,13 @@ public class ASTFactory {
}else{ }else{
jreRetType = jreMethod.getReturnType(); jreRetType = jreMethod.getReturnType();
} }
returnType = createType(jreRetType,new JavaClassName(inClass.getName()), name); returnType = createType(jreRetType);
Parameter[] jreParams = jreMethod.getParameters(); Parameter[] jreParams = jreMethod.getParameters();
Type[] jreGenericParams = jreMethod.getGenericParameterTypes(); Type[] jreGenericParams = jreMethod.getGenericParameterTypes();
List<FormalParameter> params = new ArrayList<>(); List<FormalParameter> params = new ArrayList<>();
int i = 0; int i = 0;
for(Type jreParam : jreGenericParams){ for(Type jreParam : jreGenericParams){
RefTypeOrTPHOrWildcardOrGeneric paramType = createType(jreParam,new JavaClassName(inClass.getName()), name); RefTypeOrTPHOrWildcardOrGeneric paramType = createType(jreParam);
params.add(new FormalParameter(jreParams[i].getName(),paramType, new NullToken())); params.add(new FormalParameter(jreParams[i].getName(),paramType, new NullToken()));
i++; i++;
} }
@ -157,18 +137,7 @@ public class ASTFactory {
return new GenericDeclarationList(gtvs,new NullToken()); return new GenericDeclarationList(gtvs,new NullToken());
} }
/* private static RefTypeOrTPHOrWildcardOrGeneric createType(java.lang.reflect.Type type){
public RefType createType(java.lang.Class jreClass){
List<RefTypeOrTPH> params = new ArrayList<>();
for(TypeVariable jreTV : jreClass.getTypeParameters()){
RefType gtv = createType(jreTV);
params.add(gtv);
}
return new RefType(names.getName(jreClass.getName()), params, new NullToken());
}
*/
private static RefTypeOrTPHOrWildcardOrGeneric createType(java.lang.reflect.Type type, JavaClassName parentClass, String parentMethod){
if(type.getTypeName().equals("void")){ if(type.getTypeName().equals("void")){
return new Void(new NullToken()); return new Void(new NullToken());
}else if(type.getTypeName().equals("int")){ }else if(type.getTypeName().equals("int")){
@ -193,7 +162,7 @@ public class ASTFactory {
List<RefTypeOrTPHOrWildcardOrGeneric> params = new ArrayList<>(); List<RefTypeOrTPHOrWildcardOrGeneric> params = new ArrayList<>();
if(type instanceof ParameterizedType){ if(type instanceof ParameterizedType){
for(Type t : ((ParameterizedType)type).getActualTypeArguments()){ for(Type t : ((ParameterizedType)type).getActualTypeArguments()){
params.add(createType(t, parentClass, parentMethod)); params.add(createType(t));
} }
} }
String name = type.getTypeName(); String name = type.getTypeName();
@ -201,8 +170,19 @@ public class ASTFactory {
//Diese entfernen: //Diese entfernen:
name = name.split("<")[0]; name = name.split("<")[0];
} }
RefType ret = new RefType(new JavaClassName(name), params, new NullToken()); if(type instanceof java.lang.reflect.WildcardType){
return ret; java.lang.reflect.WildcardType wildcardType = (java.lang.reflect.WildcardType) type;
if(wildcardType.getLowerBounds().length > 0){
return new SuperWildcardType(createType(wildcardType.getLowerBounds()[0]), new NullToken());
}else if(wildcardType.getUpperBounds().length > 0){
return new ExtendsWildcardType(createType(wildcardType.getUpperBounds()[0]), new NullToken());
}else{//Es handelt sich um den '?'-Typ:
return new ExtendsWildcardType(createObjectType(), new NullToken());
}
}else{
RefType ret = new RefType(new JavaClassName(name), params, new NullToken());
return ret;
}
} }
} }
@ -212,7 +192,7 @@ public class ASTFactory {
java.lang.reflect.Type[] bounds = jreTypeVar.getBounds(); java.lang.reflect.Type[] bounds = jreTypeVar.getBounds();
if(bounds.length > 0){ if(bounds.length > 0){
for(java.lang.reflect.Type bound : bounds){ for(java.lang.reflect.Type bound : bounds){
genericBounds.add((RefType) createType(bound, parentClass, parentMethod)); genericBounds.add((RefType) createType(bound));
} }
} }
return new de.dhbwstuttgart.syntaxtree.GenericTypeVar(jreTVName, genericBounds, new NullToken(), new NullToken()); return new de.dhbwstuttgart.syntaxtree.GenericTypeVar(jreTVName, genericBounds, new NullToken(), new NullToken());

View File

@ -23,7 +23,9 @@ public class BinaryExpr extends Expression
LESSTHAN, // < LESSTHAN, // <
BIGGERTHAN, // > BIGGERTHAN, // >
LESSEQUAL, // <= LESSEQUAL, // <=
BIGGEREQUAL // >= BIGGEREQUAL, // >=
EQUAL, // ==
NOTEQUAL // !=
} }
public final Operator operation; public final Operator operation;

View File

@ -34,6 +34,10 @@ public class ExtendsWildcardType extends WildcardType{
return false; return false;
} }
@Override
public String toString() {
return "? extends "+innerType.toString();
}
@Override @Override
public void accept(ASTVisitor visitor) { public void accept(ASTVisitor visitor) {

View File

@ -24,7 +24,7 @@ public class FunN extends RefType {
* @return * @return
*/ */
public FunN(List<RefTypeOrTPHOrWildcardOrGeneric> params) { public FunN(List<RefTypeOrTPHOrWildcardOrGeneric> params) {
super(new JavaClassName("Fun"+(params.size())), params, new NullToken()); super(new JavaClassName("Fun"+(params.size()-1)), params, new NullToken());
} }
/** /**

View File

@ -35,6 +35,11 @@ public class SuperWildcardType extends WildcardType{
return this.innerType; return this.innerType;
} }
@Override
public String toString() {
return "? super "+innerType.toString();
}
@Override @Override
public boolean isExtends() { public boolean isExtends() {
return false; return false;

View File

@ -231,7 +231,20 @@ public class OutputGenerator implements ASTVisitor{
@Override @Override
public void visit(IfStmt ifStmt) { public void visit(IfStmt ifStmt) {
out.append("if(");
ifStmt.expr.accept(this);
out.append(")\n");
tab();
out.append(tabs);
ifStmt.then_block.accept(this);
untab();
if(ifStmt.else_block != null){
out.append("\n" + tabs + "else\n");
tab();
out.append(tabs);
ifStmt.else_block.accept(this);
untab();
}
} }
@Override @Override

View File

@ -1,20 +1,29 @@
package de.dhbwstuttgart.typeinference.assumptions; package de.dhbwstuttgart.typeinference.assumptions;
import de.dhbwstuttgart.exceptions.NotImplementedException; import de.dhbwstuttgart.exceptions.NotImplementedException;
import de.dhbwstuttgart.parser.NullToken;
import de.dhbwstuttgart.syntaxtree.ClassOrInterface; import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
import de.dhbwstuttgart.syntaxtree.GenericTypeVar;
import de.dhbwstuttgart.syntaxtree.TypeScope; import de.dhbwstuttgart.syntaxtree.TypeScope;
import de.dhbwstuttgart.syntaxtree.type.GenericRefType;
import de.dhbwstuttgart.syntaxtree.type.RefType;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric; import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
import de.dhbwstuttgart.typeinference.constraints.GenericsResolver; import de.dhbwstuttgart.typeinference.constraints.GenericsResolver;
import java.util.ArrayList;
import java.util.List;
public class FieldAssumption extends Assumption{ public class FieldAssumption extends Assumption{
private ClassOrInterface receiverClass; private ClassOrInterface receiverClass;
private RefTypeOrTPHOrWildcardOrGeneric type; private RefTypeOrTPHOrWildcardOrGeneric type;
private String name;
public FieldAssumption(ClassOrInterface receiverType, public FieldAssumption(String fieldName, ClassOrInterface receiverType,
RefTypeOrTPHOrWildcardOrGeneric type, TypeScope scope){ RefTypeOrTPHOrWildcardOrGeneric type, TypeScope scope){
super(scope); super(scope);
this.type = type; this.type = type;
this.receiverClass = receiverType; this.receiverClass = receiverType;
this.name = fieldName;
} }
public ClassOrInterface getReceiverClass() { public ClassOrInterface getReceiverClass() {
@ -26,7 +35,15 @@ public class FieldAssumption extends Assumption{
} }
public RefTypeOrTPHOrWildcardOrGeneric getReceiverType(GenericsResolver resolver) { public RefTypeOrTPHOrWildcardOrGeneric getReceiverType(GenericsResolver resolver) {
//TODO List<RefTypeOrTPHOrWildcardOrGeneric> params = new ArrayList<>();
throw new NotImplementedException(); for(GenericTypeVar gtv : receiverClass.getGenerics()){
//Hier wird ein GenericRefType gebildet, welcher einen für dieses Feld eindeutigen Namen hat
GenericRefType genericRefType =
new GenericRefType(receiverClass.getClassName().toString() + " " + name + " " + gtv.getName()
, new NullToken());
//Dieser wird dann korrekt aufgelöst vom Resolver:
params.add(resolver.resolve(genericRefType));
}
return new RefType(receiverClass.getClassName(), params, new NullToken());
} }
} }

View File

@ -38,18 +38,13 @@ public class MethodAssumption extends Assumption{
} }
public RefTypeOrTPHOrWildcardOrGeneric getReturnType(GenericsResolver resolver) { public RefTypeOrTPHOrWildcardOrGeneric getReturnType(GenericsResolver resolver) {
if(retType instanceof GenericRefType) { return resolver.resolve(retType);
return resolver.resolve(retType);
}
return retType;
} }
public List<RefTypeOrTPHOrWildcardOrGeneric> getArgTypes(GenericsResolver resolver) { public List<RefTypeOrTPHOrWildcardOrGeneric> getArgTypes(GenericsResolver resolver) {
List<RefTypeOrTPHOrWildcardOrGeneric> ret = new ArrayList<>(); List<RefTypeOrTPHOrWildcardOrGeneric> ret = new ArrayList<>();
for(RefTypeOrTPHOrWildcardOrGeneric param : params){ for(RefTypeOrTPHOrWildcardOrGeneric param : params){
if(param instanceof GenericRefType){ //Generics in den Assumptions müssen umgewandelt werden. param = resolver.resolve(param);
param = resolver.resolve((GenericRefType) param);
}
ret.add(param); ret.add(param);
} }
return ret; return ret;

View File

@ -47,7 +47,7 @@ public class TypeInferenceInformation {
for(Field m : cl.getFieldDecl()){ for(Field m : cl.getFieldDecl()){
if(m.getName().equals(name)){ if(m.getName().equals(name)){
ret.add(new FieldAssumption(cl, checkGTV(m.getType()), new TypeScopeContainer(cl, m))); ret.add(new FieldAssumption(name, cl, checkGTV(m.getType()), new TypeScopeContainer(cl, m)));
} }
} }
} }

View File

@ -42,7 +42,7 @@ public class GenericsResolverSameName implements GenericsResolver, TypeVisitor<R
@Override @Override
public RefTypeOrTPHOrWildcardOrGeneric visit(ExtendsWildcardType extendsWildcardType) { public RefTypeOrTPHOrWildcardOrGeneric visit(ExtendsWildcardType extendsWildcardType) {
return new SuperWildcardType(extendsWildcardType.getInnerType().acceptTV(this), extendsWildcardType.getOffset()); return new ExtendsWildcardType(extendsWildcardType.getInnerType().acceptTV(this), extendsWildcardType.getOffset());
} }
@Override @Override

View File

@ -60,8 +60,7 @@ public class TYPE {
return new TypeInferenceInformation(classes); return new TypeInferenceInformation(classes);
} }
*/
*/
private ConstraintSet getConstraintsMethod(Method m, TypeInferenceInformation info, ClassOrInterface currentClass) { private ConstraintSet getConstraintsMethod(Method m, TypeInferenceInformation info, ClassOrInterface currentClass) {
if(m.block == null)return new ConstraintSet(); //Abstrakte Methoden generieren keine Constraints if(m.block == null)return new ConstraintSet(); //Abstrakte Methoden generieren keine Constraints
TypeInferenceBlockInformation blockInfo = new TypeInferenceBlockInformation(info.getAvailableClasses(), currentClass, m); TypeInferenceBlockInformation blockInfo = new TypeInferenceBlockInformation(info.getAvailableClasses(), currentClass, m);

View File

@ -105,10 +105,6 @@ public class TYPEStmt implements StatementVisitor{
for(FieldAssumption fieldAssumption : info.getFields(fieldVar.fieldVarName)){ for(FieldAssumption fieldAssumption : info.getFields(fieldVar.fieldVarName)){
Constraint constraint = new Constraint(); Constraint constraint = new Constraint();
GenericsResolver resolver = getResolverInstance(); GenericsResolver resolver = getResolverInstance();
/*TODO Hier muss der Typ der Klasse ermittelt werden. In diesem müssen Generics mit TPHs ausgetauscht werden
constraint.add(ConstraintsFactory.createPair(
fieldVar.receiver.getType(),fieldAssumption.getReceiverType(), info.getCurrentTypeScope(), fieldAssumption.getTypeScope(), resolver));
*/
constraint.add(new Pair(fieldVar.receiver.getType(), fieldAssumption.getReceiverType(resolver), PairOperator.EQUALSDOT)); constraint.add(new Pair(fieldVar.receiver.getType(), fieldAssumption.getReceiverType(resolver), PairOperator.EQUALSDOT));
constraint.add(new Pair( constraint.add(new Pair(
fieldVar.getType(), fieldAssumption.getType(resolver), PairOperator.EQUALSDOT)); fieldVar.getType(), fieldAssumption.getType(resolver), PairOperator.EQUALSDOT));
@ -117,9 +113,6 @@ public class TYPEStmt implements StatementVisitor{
if(oderConstraints.size() == 0) if(oderConstraints.size() == 0)
throw new TypeinferenceException("Kein Feld "+fieldVar.fieldVarName+ " gefunden", fieldVar.getOffset()); throw new TypeinferenceException("Kein Feld "+fieldVar.fieldVarName+ " gefunden", fieldVar.getOffset());
constraintsSet.addOderConstraint(oderConstraints); constraintsSet.addOderConstraint(oderConstraints);
//Wegen dem Problem oben:
throw new NotImplementedException();
} }
@Override @Override
@ -129,7 +122,20 @@ public class TYPEStmt implements StatementVisitor{
@Override @Override
public void visit(IfStmt ifStmt) { public void visit(IfStmt ifStmt) {
throw new NotImplementedException(); RefType booleanType = new RefType(ASTFactory.createClass(java.lang.Boolean.class).getClassName(), new NullToken());
//Expression inferieren:
ifStmt.expr.accept(this);
//Expression muss boolean sein:
constraintsSet.addUndConstraint(new Pair(ifStmt.expr.getType(), booleanType, PairOperator.EQUALSDOT));
//Blöcke inferieren:
ifStmt.then_block.accept(this);
//Beide Blöcke müssen den gleichen Supertyp haben, welcher den Rückgabetyp des If-Stmts darstellt
constraintsSet.addUndConstraint(new Pair(ifStmt.else_block.getType(), ifStmt.getType(), PairOperator.SMALLERDOT));
if(ifStmt.else_block != null){
ifStmt.else_block.accept(this);
constraintsSet.addUndConstraint(new Pair(ifStmt.else_block.getType(), ifStmt.getType(), PairOperator.SMALLERDOT));
}
} }
@Override @Override
@ -217,62 +223,88 @@ public class TYPEStmt implements StatementVisitor{
if(binary.operation.equals(BinaryExpr.Operator.DIV) || if(binary.operation.equals(BinaryExpr.Operator.DIV) ||
binary.operation.equals(BinaryExpr.Operator.MUL)|| binary.operation.equals(BinaryExpr.Operator.MUL)||
binary.operation.equals(BinaryExpr.Operator.MOD)|| binary.operation.equals(BinaryExpr.Operator.MOD)||
binary.operation.equals(BinaryExpr.Operator.ADD)){ binary.operation.equals(BinaryExpr.Operator.ADD)||
binary.operation.equals(BinaryExpr.Operator.SUB)){
Set<Constraint<Pair>> numericAdditionOrStringConcatenation = new HashSet<>(); Set<Constraint<Pair>> numericAdditionOrStringConcatenation = new HashSet<>();
//Zuerst der Fall für Numerische AusdrücPairOpnumericeratorke, das sind Mul, Mod und Div immer: //Zuerst der Fall für Numerische AusdrücPairOpnumericeratorke, das sind Mul, Mod und Div immer:
//see: https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.17 //see: https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.17
//Expression muss zu Numeric Convertierbar sein. also von Numeric erben //Expression muss zu Numeric Convertierbar sein. also von Numeric erben
Constraint<Pair> numeric = new Constraint<>(); Constraint<Pair> numeric;
numeric.add(new Pair(binary.lexpr.getType(), bytee, PairOperator.SMALLERDOT)); //PL eingefuegt 2018-07-17
numeric.add(new Pair(binary.rexpr.getType(), bytee, PairOperator.SMALLERDOT)); if (info.getAvailableClasses().stream().map(x -> x.getClassName()).collect(Collectors.toCollection(HashSet::new)).contains(bytee.getName())) {
numeric.add(new Pair(binary.getType(), integer, PairOperator.SMALLERDOT)); numeric = new Constraint<>();
numericAdditionOrStringConcatenation.add(numeric); numeric.add(new Pair(binary.lexpr.getType(), bytee, PairOperator.SMALLERDOT));
numeric = new Constraint<>(); numeric.add(new Pair(binary.rexpr.getType(), bytee, PairOperator.SMALLERDOT));
numeric.add(new Pair(binary.lexpr.getType(), shortt, PairOperator.SMALLERDOT)); numeric.add(new Pair(binary.getType(), integer, PairOperator.SMALLERDOT));
numeric.add(new Pair(binary.rexpr.getType(), shortt, PairOperator.SMALLERDOT)); numericAdditionOrStringConcatenation.add(numeric);
numeric.add(new Pair(binary.getType(), integer, PairOperator.SMALLERDOT)); }
numericAdditionOrStringConcatenation.add(numeric); //PL eingefuegt 2018-07-17
numeric = new Constraint<>(); if (info.getAvailableClasses().stream().map(x -> x.getClassName()).collect(Collectors.toCollection(HashSet::new)).contains(shortt.getName())) {
numeric.add(new Pair(binary.lexpr.getType(), integer, PairOperator.SMALLERDOT)); numeric = new Constraint<>();
numeric.add(new Pair(binary.rexpr.getType(), integer, PairOperator.SMALLERDOT)); numeric.add(new Pair(binary.lexpr.getType(), shortt, PairOperator.SMALLERDOT));
numeric.add(new Pair(binary.getType(), integer, PairOperator.SMALLERDOT)); numeric.add(new Pair(binary.rexpr.getType(), shortt, PairOperator.SMALLERDOT));
numericAdditionOrStringConcatenation.add(numeric); numeric.add(new Pair(binary.getType(), integer, PairOperator.SMALLERDOT));
numeric = new Constraint<>(); numericAdditionOrStringConcatenation.add(numeric);
numeric.add(new Pair(binary.lexpr.getType(), longg, PairOperator.SMALLERDOT)); }
numeric.add(new Pair(binary.rexpr.getType(), longg, PairOperator.SMALLERDOT)); //PL eingefuegt 2018-07-17
numeric.add(new Pair(binary.getType(), longg, PairOperator.SMALLERDOT)); if (info.getAvailableClasses().stream().map(x -> x.getClassName()).collect(Collectors.toCollection(HashSet::new)).contains(integer.getName())) {
numericAdditionOrStringConcatenation.add(numeric); numeric = new Constraint<>();
numeric = new Constraint<>(); numeric.add(new Pair(binary.lexpr.getType(), integer, PairOperator.SMALLERDOT));
numeric.add(new Pair(binary.lexpr.getType(), floatt, PairOperator.SMALLERDOT)); numeric.add(new Pair(binary.rexpr.getType(), integer, PairOperator.SMALLERDOT));
numeric.add(new Pair(binary.rexpr.getType(), floatt, PairOperator.SMALLERDOT)); numeric.add(new Pair(binary.getType(), integer, PairOperator.SMALLERDOT));
numeric.add(new Pair(binary.getType(), floatt, PairOperator.SMALLERDOT)); numericAdditionOrStringConcatenation.add(numeric);
numericAdditionOrStringConcatenation.add(numeric); }
numeric = new Constraint<>(); //PL eingefuegt 2018-07-17
numeric.add(new Pair(binary.lexpr.getType(), doublee, PairOperator.SMALLERDOT)); if (info.getAvailableClasses().stream().map(x -> x.getClassName()).collect(Collectors.toCollection(HashSet::new)).contains(longg.getName())) {
numeric.add(new Pair(binary.rexpr.getType(), doublee, PairOperator.SMALLERDOT)); numeric = new Constraint<>();
numeric.add(new Pair(binary.getType(), doublee, PairOperator.SMALLERDOT)); numeric.add(new Pair(binary.lexpr.getType(), longg, PairOperator.SMALLERDOT));
numericAdditionOrStringConcatenation.add(numeric); numeric.add(new Pair(binary.rexpr.getType(), longg, PairOperator.SMALLERDOT));
numeric.add(new Pair(binary.getType(), longg, PairOperator.SMALLERDOT));
numericAdditionOrStringConcatenation.add(numeric);
}
//PL eingefuegt 2018-07-17
if (info.getAvailableClasses().stream().map(x -> x.getClassName()).collect(Collectors.toCollection(HashSet::new)).contains(floatt.getName())) {
numeric = new Constraint<>();
numeric.add(new Pair(binary.lexpr.getType(), floatt, PairOperator.SMALLERDOT));
numeric.add(new Pair(binary.rexpr.getType(), floatt, PairOperator.SMALLERDOT));
numeric.add(new Pair(binary.getType(), floatt, PairOperator.SMALLERDOT));
numericAdditionOrStringConcatenation.add(numeric);
}
//PL eingefuegt 2018-07-17
if (info.getAvailableClasses().stream().map(x -> x.getClassName()).collect(Collectors.toCollection(HashSet::new)).contains(doublee.getName())) {
numeric = new Constraint<>();
numeric.add(new Pair(binary.lexpr.getType(), doublee, PairOperator.SMALLERDOT));
numeric.add(new Pair(binary.rexpr.getType(), doublee, PairOperator.SMALLERDOT));
numeric.add(new Pair(binary.getType(), doublee, PairOperator.SMALLERDOT));
numericAdditionOrStringConcatenation.add(numeric);
}
/* PL auskommentiert Anfang 2018-07-17
/* /*
In Java passiert bei den binären Operatoren eine sogenannte Type Promotion: In Java passiert bei den binären Operatoren eine sogenannte Type Promotion:
https://docs.oracle.com/javase/specs/jls/se7/html/jls-5.html#jls-5.6.2 https://docs.oracle.com/javase/specs/jls/se7/html/jls-5.html#jls-5.6.2
Das bedeutet, dass Java die Typen je nach belieben castet, so lange sie nur von Number erben Das bedeutet, dass Java die Typen je nach belieben castet, so lange sie nur von Number erben
*/
numeric = new Constraint<>();
numeric.add(new Pair(binary.getType(), number, PairOperator.SMALLERDOT)); numeric.add(new Pair(binary.getType(), number, PairOperator.SMALLERDOT));
numericAdditionOrStringConcatenation.add(numeric); numericAdditionOrStringConcatenation.add(numeric);
* PL auskommentiert Ende 2018-07-17 */
if(binary.operation.equals(BinaryExpr.Operator.ADD)) { if(binary.operation.equals(BinaryExpr.Operator.ADD)) {
//Dann kann der Ausdruck auch das aneinanderfügen zweier Strings sein: ("a" + "b") oder (1 + 2) //Dann kann der Ausdruck auch das aneinanderfügen zweier Strings sein: ("a" + "b") oder (1 + 2)
Constraint<Pair> stringConcat = new Constraint<>(); if (info.getAvailableClasses().stream().map(x -> x.getClassName()).collect(Collectors.toCollection(HashSet::new)).contains(string.getName())) {
stringConcat.add(new Pair(binary.lexpr.getType(), string, PairOperator.EQUALSDOT)); Constraint<Pair> stringConcat = new Constraint<>();
stringConcat.add(new Pair(binary.rexpr.getType(), string, PairOperator.EQUALSDOT)); stringConcat.add(new Pair(binary.lexpr.getType(), string, PairOperator.EQUALSDOT));
stringConcat.add(new Pair(binary.getType(), string, PairOperator.EQUALSDOT)); stringConcat.add(new Pair(binary.rexpr.getType(), string, PairOperator.EQUALSDOT));
numericAdditionOrStringConcatenation.add(stringConcat); stringConcat.add(new Pair(binary.getType(), string, PairOperator.EQUALSDOT));
numericAdditionOrStringConcatenation.add(stringConcat);
}
} }
constraintsSet.addOderConstraint(numericAdditionOrStringConcatenation); constraintsSet.addOderConstraint(numericAdditionOrStringConcatenation);
}else if(binary.operation.equals(BinaryExpr.Operator.LESSEQUAL) || }else if(binary.operation.equals(BinaryExpr.Operator.LESSEQUAL) ||
binary.operation.equals(BinaryExpr.Operator.BIGGEREQUAL) || binary.operation.equals(BinaryExpr.Operator.BIGGEREQUAL) ||
binary.operation.equals(BinaryExpr.Operator.BIGGERTHAN) || binary.operation.equals(BinaryExpr.Operator.BIGGERTHAN) ||
binary.operation.equals(BinaryExpr.Operator.LESSTHAN)){ binary.operation.equals(BinaryExpr.Operator.LESSTHAN)) {
/* //eingefuegt PL 2018-05-24 /* //eingefuegt PL 2018-05-24
Set<Constraint<Pair>> numericRelationConcatenation = new HashSet<>(); Set<Constraint<Pair>> numericRelationConcatenation = new HashSet<>();
Constraint<Pair> numeric = new Constraint<>(); Constraint<Pair> numeric = new Constraint<>();
@ -309,18 +341,24 @@ public class TYPEStmt implements StatementVisitor{
//***ACHTUNG: Moeglicherweise oder und und-Contraint falsch //***ACHTUNG: Moeglicherweise oder und und-Contraint falsch
constraintsSet.addOderConstraint(numericRelationConcatenation); constraintsSet.addOderConstraint(numericRelationConcatenation);
//***ACHTUNG: Moeglicherweise oder und und-Contraint falsch //***ACHTUNG: Moeglicherweise oder und und-Contraint falsch
*/ */
//Testeise eingefuegt PL 2018-05-24 //Testeise eingefuegt PL 2018-05-24
constraintsSet.addUndConstraint(new Pair(binary.lexpr.getType(), number, PairOperator.SMALLERNEQDOT)); constraintsSet.addUndConstraint(new Pair(binary.lexpr.getType(), number, PairOperator.SMALLERNEQDOT));
constraintsSet.addUndConstraint(new Pair(binary.rexpr.getType(), number, PairOperator.SMALLERNEQDOT)); constraintsSet.addUndConstraint(new Pair(binary.rexpr.getType(), number, PairOperator.SMALLERNEQDOT));
//Rückgabetyp ist Boolean //Rückgabetyp ist Boolean
constraintsSet.addUndConstraint(new Pair(bool, binary.getType(), PairOperator.SMALLERDOT)); constraintsSet.addUndConstraint(new Pair(bool, binary.getType(), PairOperator.SMALLERDOT));
//auskommentiert PL 2018-05-24 //auskommentiert PL 2018-05-24
//constraintsSet.addUndConstraint(new Pair(binary.lexpr.getType(), number, PairOperator.SMALLERDOT)); //constraintsSet.addUndConstraint(new Pair(binary.lexpr.getType(), number, PairOperator.SMALLERDOT));
//constraintsSet.addUndConstraint(new Pair(binary.rexpr.getType(), number, PairOperator.SMALLERDOT)); //constraintsSet.addUndConstraint(new Pair(binary.rexpr.getType(), number, PairOperator.SMALLERDOT));
//Rückgabetyp ist Boolean //Rückgabetyp ist Boolean
//constraintsSet.addUndConstraint(new Pair(bool, binary.getType(), PairOperator.EQUALSDOT)); //constraintsSet.addUndConstraint(new Pair(bool, binary.getType(), PairOperator.EQUALSDOT));
}else if(binary.operation.equals(BinaryExpr.Operator.EQUAL) || binary.operation.equals(BinaryExpr.Operator.NOTEQUAL)){
/*Auszug aus https://docs.oracle.com/javase/specs/jls/se9/html/jls-15.html#jls-15.21
The equality operators may be used to compare two operands that are convertible (§5.1.8) to numeric type, or two operands of type boolean or Boolean, or two operands that are each of either reference type or the null type. All other cases result in a compile-time error.
*/
//Der Equals Operator geht mit fast allen Typen, daher werden hier keine Constraints gesetzt
constraintsSet.addUndConstraint(new Pair(bool, binary.getType(), PairOperator.SMALLERDOT));
}else{ }else{
throw new NotImplementedException(); throw new NotImplementedException();
} }

View File

@ -36,10 +36,15 @@ import java.io.IOException;
*/ */
public class RuleSet implements IRuleSet{ public class RuleSet implements IRuleSet{
FileWriter logFile;
RuleSet() { RuleSet() {
super(); super();
} }
RuleSet(FileWriter logFile) {
this.logFile = logFile;
}
@Override @Override
public Optional<UnifyPair> reduceUp(UnifyPair pair) { public Optional<UnifyPair> reduceUp(UnifyPair pair) {

View File

@ -8,16 +8,16 @@ import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair; import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
public class TypeUnify { public class TypeUnify {
public Set<Set<UnifyPair>> unify(Set<UnifyPair> eq, IFiniteClosure fc) { public Set<Set<UnifyPair>> unify(Set<UnifyPair> eq, IFiniteClosure fc, FileWriter logFile, Boolean log) {
TypeUnifyTask unifyTask = new TypeUnifyTask(eq, fc, true); TypeUnifyTask unifyTask = new TypeUnifyTask(eq, fc, true, logFile, log);
ForkJoinPool pool = new ForkJoinPool(); ForkJoinPool pool = new ForkJoinPool();
pool.invoke(unifyTask); pool.invoke(unifyTask);
Set<Set<UnifyPair>> res = unifyTask.join(); Set<Set<UnifyPair>> res = unifyTask.join();
return res; return res;
} }
public Set<Set<UnifyPair>> unifySequential(Set<UnifyPair> eq, IFiniteClosure fc) { public Set<Set<UnifyPair>> unifySequential(Set<UnifyPair> eq, IFiniteClosure fc, FileWriter logFile, Boolean log) {
TypeUnifyTask unifyTask = new TypeUnifyTask(eq, fc, false); TypeUnifyTask unifyTask = new TypeUnifyTask(eq, fc, false, logFile, log);
Set<Set<UnifyPair>> res = unifyTask.compute(); Set<Set<UnifyPair>> res = unifyTask.compute();
return res; return res;
} }

View File

@ -50,7 +50,8 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
private boolean printtag = false; private boolean printtag = false;
Boolean log = true; //gibt an ob ein Log-File nach System.getProperty("user.dir")+"/test/logFiles/log" geschrieben werden soll? Boolean log = true; //gibt an ob ein Log-File nach System.getProperty("user.dir")+"/test/logFiles/log" geschrieben werden soll?
//public static final String rootDirectory = System.getProperty("user.dir")+"/test/logFiles/"; public static final String rootDirectory = System.getProperty("user.dir")+"/test/logFiles/";
FileWriter logFile;
/** /**
* The implementation of setOps that will be used during the unification * The implementation of setOps that will be used during the unification
@ -87,12 +88,14 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
rules = new RuleSet(); rules = new RuleSet();
} }
public TypeUnifyTask(Set<UnifyPair> eq, IFiniteClosure fc, boolean parallel) { public TypeUnifyTask(Set<UnifyPair> eq, IFiniteClosure fc, boolean parallel, FileWriter logFile, Boolean log) {
this.eq = eq; this.eq = eq;
this.fc = fc; this.fc = fc;
this.oup = new OrderingUnifyPair(fc); this.oup = new OrderingUnifyPair(fc);
this.parallel = parallel; this.parallel = parallel;
rules = new RuleSet(); this.logFile = logFile;
this.log = log;
rules = new RuleSet(logFile);
} }
@ -152,6 +155,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
* Step 1: Repeated application of reduce, adapt, erase, swap * Step 1: Repeated application of reduce, adapt, erase, swap
*/ */
nOfUnify++; nOfUnify++;
writeLog(nOfUnify.toString() + " Unifikation: " + eq.toString());
//eq = eq.stream().map(x -> {x.setVariance((byte)-1); return x;}).collect(Collectors.toCollection(HashSet::new)); //eq = eq.stream().map(x -> {x.setVariance((byte)-1); return x;}).collect(Collectors.toCollection(HashSet::new));
/* /*
@ -227,6 +231,10 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
// those pairs are contradictory and the unification is impossible. // those pairs are contradictory and the unification is impossible.
if(!undefinedPairs.isEmpty()) { if(!undefinedPairs.isEmpty()) {
noUndefPair++; noUndefPair++;
for (UnifyPair up : undefinedPairs) {
writeLog(noUndefPair.toString() + " UndefinedPairs; " + up);
writeLog("BasePair; " + up.getBasePair());
}
Set<Set<UnifyPair>> error = new HashSet<>(); Set<Set<UnifyPair>> error = new HashSet<>();
undefinedPairs = undefinedPairs.stream().map(x -> { x.setUndefinedPair(); return x;}).collect(Collectors.toCollection(HashSet::new)); undefinedPairs = undefinedPairs.stream().map(x -> { x.setUndefinedPair(); return x;}).collect(Collectors.toCollection(HashSet::new));
error.add(undefinedPairs); error.add(undefinedPairs);
@ -315,13 +323,13 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
eqPrimePrimeSet.add(eqPrime); eqPrimePrimeSet.add(eqPrime);
else if(eqPrimePrime.isPresent()) { else if(eqPrimePrime.isPresent()) {
//System.out.println("nextStep: " + eqPrimePrime.get()); //System.out.println("nextStep: " + eqPrimePrime.get());
TypeUnifyTask fork = new TypeUnifyTask(eqPrimePrime.get(), fc, true); TypeUnifyTask fork = new TypeUnifyTask(eqPrimePrime.get(), fc, true, logFile, log);
forks.add(fork); forks.add(fork);
fork.fork(); fork.fork();
} }
else { else {
//System.out.println("nextStep: " + eqPrime); //System.out.println("nextStep: " + eqPrime);
TypeUnifyTask fork = new TypeUnifyTask(eqPrime, fc, true); TypeUnifyTask fork = new TypeUnifyTask(eqPrime, fc, true, logFile, log);
forks.add(fork); forks.add(fork);
fork.fork(); fork.fork();
} }
@ -332,7 +340,13 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
//PL 2017-09-29 dies ersetzt //(!eqPrimePrime.isPresent()) //PL 2017-09-29 dies ersetzt //(!eqPrimePrime.isPresent())
//PL 2018-05-18 beide Bedingungen muessen gelten, da eqPrime Veränderungen in allem ausser subst //PL 2018-05-18 beide Bedingungen muessen gelten, da eqPrime Veränderungen in allem ausser subst
//eqPrimePrime Veraenderungen in subst repraesentieren. //eqPrimePrime Veraenderungen in subst repraesentieren.
try {
if (isSolvedForm(eqPrime)) {
logFile.write(eqPrime.toString()+"\n");
logFile.flush();
}
}
catch (IOException e) { }
eqPrimePrimeSet.add(eqPrime); eqPrimePrimeSet.add(eqPrime);
} }
else if(eqPrimePrime.isPresent()) { else if(eqPrimePrime.isPresent()) {
@ -363,6 +377,8 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
* Step 7: Filter empty sets; * Step 7: Filter empty sets;
*/ */
eqPrimePrimeSet = eqPrimePrimeSet.stream().filter(x -> isSolvedForm(x) || this.isUndefinedPairSet(x)).collect(Collectors.toCollection(HashSet::new)); eqPrimePrimeSet = eqPrimePrimeSet.stream().filter(x -> isSolvedForm(x) || this.isUndefinedPairSet(x)).collect(Collectors.toCollection(HashSet::new));
if (!eqPrimePrimeSet.isEmpty() && !isUndefinedPairSetSet(eqPrimePrimeSet))
writeLog("Result1 " + eqPrimePrimeSet.toString());
return eqPrimePrimeSet; return eqPrimePrimeSet;
} }
@ -382,6 +398,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
return result; return result;
} }
Set<Set<UnifyPair>> nextSet = remainingSets.remove(0); Set<Set<UnifyPair>> nextSet = remainingSets.remove(0);
writeLog("nextSet: " + nextSet.toString());
List<Set<UnifyPair>> nextSetasList =new ArrayList<>(nextSet); List<Set<UnifyPair>> nextSetasList =new ArrayList<>(nextSet);
try { try {
//List<Set<UnifyPair>> //List<Set<UnifyPair>>
@ -431,6 +448,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
System.out.print(""); System.out.print("");
if (nextSetasList.iterator().next().stream().filter(x -> x.getLhsType().getName().equals("D")).findFirst().isPresent() && nextSetasList.size()>1) if (nextSetasList.iterator().next().stream().filter(x -> x.getLhsType().getName().equals("D")).findFirst().isPresent() && nextSetasList.size()>1)
System.out.print(""); System.out.print("");
writeLog("nextSetasList: " + nextSetasList.toString());
while (nextSetasList.size() > 0) { //(nextSetasList.size() != 0) { while (nextSetasList.size() > 0) { //(nextSetasList.size() != 0) {
Set<UnifyPair> a = null; Set<UnifyPair> a = null;
if (variance == 1) { if (variance == 1) {
@ -551,8 +569,16 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
//} //}
return (!x.containsAll(durchschnitt)); return (!x.containsAll(durchschnitt));
}).collect(Collectors.toCollection(ArrayList::new)); }).collect(Collectors.toCollection(ArrayList::new));
writeLog("abhSubst: " + abhSubst.toString());
writeLog("a: " + a.toString());
writeLog("Durchschnitt: " + durchschnitt.toString());
writeLog("nextSet: " + nextSet.toString());
writeLog("nextSetasList: " + nextSetasList.toString());
writeLog("Number erased Elements (undef): " + (len - nextSetasList.size()));
noAllErasedElements = noAllErasedElements + (len - nextSetasList.size()); noAllErasedElements = noAllErasedElements + (len - nextSetasList.size());
writeLog("Number erased Elements (undef): " + noAllErasedElements.toString());
noBacktracking++; noBacktracking++;
writeLog("Number of Backtracking: " + noBacktracking);
System.out.println(""); System.out.println("");
} }
//if (nextSetasList.size() == 0 && isUndefinedPairSetSet(result) && nextSet.size() > 1) { //if (nextSetasList.size() == 0 && isUndefinedPairSetSet(result) && nextSet.size() > 1) {
@ -1212,7 +1238,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
permuteParams(candidates, idx+1, result, current); permuteParams(candidates, idx+1, result, current);
} }
} }
/*
void writeLog(String str) { void writeLog(String str) {
if (log) { if (log) {
try { try {
@ -1223,6 +1249,4 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
catch (IOException e) { } catch (IOException e) { }
} }
} }
*/
} }

View File

@ -1,6 +1,9 @@
package astfactory; package astfactory;
//import javafx.collections.ObservableList; //import javafx.collections.ObservableList;
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
import de.dhbwstuttgart.syntaxtree.factory.ASTFactory;
import de.dhbwstuttgart.syntaxtree.type.GenericRefType;
import org.junit.Test; import org.junit.Test;
import java.lang.reflect.ParameterizedType; import java.lang.reflect.ParameterizedType;
@ -19,4 +22,13 @@ public class ASTFactoryTest<A> extends HashMap<String, A>{
System.out.println(Arrays.toString(arguments)); System.out.println(Arrays.toString(arguments));
System.out.println(((TypeVariable)arguments[1]).getGenericDeclaration()); System.out.println(((TypeVariable)arguments[1]).getGenericDeclaration());
} }
public static class GenericFieldTest<G>{
public G testField;
}
@Test
public void genericFieldTest(){
ClassOrInterface test = ASTFactory.createClass(GenericFieldTest.class);
assertTrue(test.getFieldDecl().get(0).getType() instanceof GenericRefType);
}
} }

View File

@ -3,6 +3,7 @@ package bytecode;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.io.File; import java.io.File;
import java.lang.reflect.Method;
import java.net.URL; import java.net.URL;
import java.net.URLClassLoader; import java.net.URLClassLoader;
@ -33,8 +34,17 @@ public class BinaryTest {
} }
@Test @Test
public void test() { public void test() throws Exception {
fail("Not yet implemented"); Method m2 = classToTest.getDeclaredMethod("m2", Integer.class,Integer.class);
Integer res = (Integer) m2.invoke(instanceOfClass, 2,3);
assertEquals(6, res);
}
@Test
public void testM3() throws Exception {
Method m3 = classToTest.getDeclaredMethod("m3", Integer.class);
Integer res = (Integer) m3.invoke(instanceOfClass, 2);
assertEquals(4, res);
} }
} }

View File

@ -33,12 +33,12 @@ public class FacTest {
classToTest = loader.loadClass("Fac"); classToTest = loader.loadClass("Fac");
instanceOfClass = classToTest.getDeclaredConstructor().newInstance(); instanceOfClass = classToTest.getDeclaredConstructor().newInstance();
} }
@Test @Test
public void test() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { public void testInteger() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
Method getFac = classToTest.getDeclaredMethod("getFac", Integer.class); Method getFac = classToTest.getDeclaredMethod("getFac", Integer.class);
Double result = (Double) getFac.invoke(instanceOfClass,3); Integer result = (Integer) getFac.invoke(instanceOfClass,3);
assertEquals(result, 6.0); assertEquals(result, 6);
} }
} }

View File

@ -16,26 +16,15 @@ public class GenTest {
private static String path; private static String path;
private static File fileToTest; private static File fileToTest;
private static JavaTXCompiler compiler; private static JavaTXCompiler compiler;
private static ClassLoader loader;
private static Class<?> classToTest;
private static String pathToClassFile; private static String pathToClassFile;
private static Object instanceOfClass;
@BeforeClass @Test
public static void setUpBeforeClass() throws Exception { public void generateBC() throws Exception {
path = System.getProperty("user.dir")+"/test/bytecode/javFiles/Gen.jav"; path = System.getProperty("user.dir")+"/test/bytecode/javFiles/Gen.jav";
fileToTest = new File(path); fileToTest = new File(path);
compiler = new JavaTXCompiler(fileToTest); compiler = new JavaTXCompiler(fileToTest);
pathToClassFile = System.getProperty("user.dir")+"/testBytecode/generatedBC/"; pathToClassFile = System.getProperty("user.dir")+"/testBytecode/generatedBC/";
compiler.generateBytecode(pathToClassFile); compiler.generateBytecode(pathToClassFile);
loader = new URLClassLoader(new URL[] {new URL("file://"+pathToClassFile)});
classToTest = loader.loadClass("Gen");
instanceOfClass = classToTest.getDeclaredConstructor().newInstance();
}
@Test
public void test() {
fail("Not yet implemented");
} }
} }

View File

@ -1,6 +1,12 @@
package bytecode; package bytecode;
import static org.junit.Assert.assertEquals;
import java.io.File; import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import org.junit.Test; import org.junit.Test;
@ -10,6 +16,10 @@ public class LambdaTest {
private static String path; private static String path;
private static File fileToTest; private static File fileToTest;
private static JavaTXCompiler compiler; private static JavaTXCompiler compiler;
private static ClassLoader loader;
private static Class<?> classToTest;
private static String pathToClassFile;
private static Object instanceOfClass;
@Test @Test
public void generateBC() throws Exception { public void generateBC() throws Exception {
@ -17,6 +27,23 @@ public class LambdaTest {
fileToTest = new File(path); fileToTest = new File(path);
compiler = new JavaTXCompiler(fileToTest); compiler = new JavaTXCompiler(fileToTest);
compiler.generateBytecode(System.getProperty("user.dir")+"/testBytecode/generatedBC/"); compiler.generateBytecode(System.getProperty("user.dir")+"/testBytecode/generatedBC/");
pathToClassFile = System.getProperty("user.dir")+"/testBytecode/generatedBC/";
loader = new URLClassLoader(new URL[] {new URL("file://"+pathToClassFile)});
classToTest = loader.loadClass("Lambda");
instanceOfClass = classToTest.getDeclaredConstructor().newInstance();
Method m = classToTest.getDeclaredMethod("m");
Class<?> lambda = m.invoke(instanceOfClass).getClass();
Method apply = lambda.getMethod("apply", Object.class);
// Damit man auf die Methode zugreifen kann
apply.setAccessible(true);
Integer i = 77;
Integer result = (Integer) apply.invoke(m.invoke(instanceOfClass), i);
assertEquals(77, result);
} }

View File

@ -0,0 +1,47 @@
package bytecode;
import static org.junit.Assert.assertEquals;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import org.junit.Test;
import de.dhbwstuttgart.core.JavaTXCompiler;
public class LambdaVoidTest {
private static String path;
private static File fileToTest;
private static JavaTXCompiler compiler;
private static ClassLoader loader;
private static Class<?> classToTest;
private static String pathToClassFile;
private static Object instanceOfClass;
@Test
public void generateBC() throws Exception {
path = System.getProperty("user.dir")+"/test/bytecode/javFiles/Lambda.jav";
fileToTest = new File(path);
compiler = new JavaTXCompiler(fileToTest);
compiler.generateBytecode(System.getProperty("user.dir")+"/testBytecode/generatedBC/");
pathToClassFile = System.getProperty("user.dir")+"/testBytecode/generatedBC/";
loader = new URLClassLoader(new URL[] {new URL("file://"+pathToClassFile)});
classToTest = loader.loadClass("Lambda");
instanceOfClass = classToTest.getDeclaredConstructor().newInstance();
Method m = classToTest.getDeclaredMethod("m");
Class<?> lambda = m.invoke(instanceOfClass).getClass();
Method apply = lambda.getMethod("apply", Object.class);
// Damit man auf die Methode zugreifen kann
apply.setAccessible(true);
Integer i = 77;
apply.invoke(m.invoke(instanceOfClass), i);
}
}

View File

@ -22,47 +22,69 @@ public class MatrixTest {
private static ClassLoader loader; private static ClassLoader loader;
private static Class<?> classToTest; private static Class<?> classToTest;
private static String pathToClassFile; private static String pathToClassFile;
private static Object instanceOfClass; private static Object instanceOfClass_m1;
private static Object instanceOfClass_m2;
// @BeforeClass private static Object instanceOfClass_m3;
// public static void setUpBeforeClass() throws Exception {
// path = System.getProperty("user.dir")+"/test/bytecode/javFiles/Matrix.jav";
// fileToTest = new File(path);
// compiler = new JavaTXCompiler(fileToTest);
// pathToClassFile = System.getProperty("user.dir")+"/testBytecode/generatedBC/";
// compiler.generateBytecode(pathToClassFile);
// loader = new URLClassLoader(new URL[] {new URL("file://"+pathToClassFile)});
// classToTest = loader.loadClass("Matrix");
// instanceOfClass = classToTest.getDeclaredConstructor().newInstance();
// }
@Test @Test
public void test() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundException, IOException { public void test() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundException, IOException, InstantiationException {
// Vector<Vector<Integer>> m1 = new Vector<>();
// Vector<Integer> r1 = new Vector<>();
// r1.addElement(1);
// r1.addElement(0);
// m1.addElement(r1);
// Vector<Integer> r2 = new Vector<>();
// r2.addElement(0);
// r2.addElement(1);
// m1.add(r2);
//
// Vector<Vector<Integer>> m2 = new Vector<>();
// Vector<Integer> mr1 = new Vector<>();
// mr1.addElement(1);
// mr1.addElement(2);
// m2.add(mr1);
// Vector<Integer> mr2 = new Vector<>();
// mr2.addElement(3);
// mr2.addElement(4);
// m2.add(mr2);
path = System.getProperty("user.dir")+"/test/bytecode/javFiles/Matrix.jav"; path = System.getProperty("user.dir")+"/test/bytecode/javFiles/Matrix.jav";
fileToTest = new File(path); fileToTest = new File(path);
compiler = new JavaTXCompiler(fileToTest); compiler = new JavaTXCompiler(fileToTest);
pathToClassFile = System.getProperty("user.dir")+"/testBytecode/generatedBC/"; pathToClassFile = System.getProperty("user.dir")+"/testBytecode/generatedBC/";
compiler.generateBytecode(pathToClassFile); compiler.generateBytecode(pathToClassFile);
loader = new URLClassLoader(new URL[] {new URL("file://"+pathToClassFile)});
classToTest = loader.loadClass("Matrix");
Vector<Vector<Integer>> vv = new Vector<Vector<Integer>>();
Vector<Integer> v1 = new Vector<Integer> ();
v1.addElement(2);
v1.addElement(2);
Vector<Integer> v2 = new Vector<Integer> ();
v2.addElement(3);
v2.addElement(3);
//Matrix m1 = new Matrix();
//m1.addElement(v1);
//m1.addElement(v2);
vv.addElement(v1);
vv.addElement(v2);
instanceOfClass_m1 = classToTest.getDeclaredConstructor(Vector.class).newInstance(vv); //Matrix m1 = new Matrix(vv);
Vector<Vector<Integer>> vv1 = new Vector<Vector<Integer>>();
Vector<Integer> v3 = new Vector<Integer> ();
v3.addElement(2);
v3.addElement(2);
Vector<Integer> v4 = new Vector<Integer> ();
v4.addElement(3);
v4.addElement(3);
//Matrix m2 = new Matrix();
//m2.addElement(v3);
//m2.addElement(v4);
vv1.addElement(v3);
vv1.addElement(v4);
instanceOfClass_m2 = classToTest.getDeclaredConstructor(Vector.class).newInstance(vv1);//Matrix m2 = new Matrix(vv1);
//Matrix m3 = m1.mul(vv1);
Method mul = classToTest.getDeclaredMethod("mul", Vector.class);
Object result = mul.invoke(instanceOfClass_m1, instanceOfClass_m2);
System.out.println(instanceOfClass_m1.toString() + " * " + instanceOfClass_m2.toString() + " = " + result.toString());
Vector<Vector<Integer>> res = new Vector<Vector<Integer>>();
Vector<Integer> v5 = new Vector<Integer> ();
v5.addElement(10);
v5.addElement(10);
Vector<Integer> v6 = new Vector<Integer> ();
v6.addElement(15);
v6.addElement(15);
//Matrix m2 = new Matrix();
//m2.addElement(v3);
//m2.addElement(v4);
res.addElement(v5);
res.addElement(v6);
instanceOfClass_m3 = classToTest.getDeclaredConstructor(Vector.class).newInstance(res);
assertEquals(result, instanceOfClass_m3);
} }

View File

@ -0,0 +1,41 @@
package bytecode;
import static org.junit.Assert.assertEquals;
import java.io.File;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import org.junit.Test;
import de.dhbwstuttgart.core.JavaTXCompiler;
public class MergeTest {
private static String path;
private static File fileToTest;
private static JavaTXCompiler compiler;
private static ClassLoader loader;
private static Class<?> classToTest;
private static String pathToClassFile;
private static Object instanceOfClass;
@Test
public void generateBC() throws Exception {
path = System.getProperty("user.dir")+"/test/bytecode/javFiles/Merge.jav";
fileToTest = new File(path);
compiler = new JavaTXCompiler(fileToTest);
compiler.generateBytecode(System.getProperty("user.dir")+"/testBytecode/generatedBC/");
// pathToClassFile = System.getProperty("user.dir")+"/testBytecode/generatedBC/";
// loader = new URLClassLoader(new URL[] {new URL("file://"+pathToClassFile)});
// classToTest = loader.loadClass("Merge");
//instanceOfClass = classToTest.getDeclaredConstructor().newInstance();
//Method m = classToTest.getDeclaredMethod("m");
//Object result = m.invoke(instanceOfClass);
//assertEquals(result.getClass(), loader.loadClass("Apply"));
}
}

View File

@ -3,6 +3,8 @@ package bytecode;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.io.File; import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL; import java.net.URL;
import java.net.URLClassLoader; import java.net.URLClassLoader;
@ -17,8 +19,10 @@ public class OLTest {
private static JavaTXCompiler compiler; private static JavaTXCompiler compiler;
private static ClassLoader loader; private static ClassLoader loader;
private static Class<?> classToTest; private static Class<?> classToTest;
private static Class<?> classToTest1;
private static String pathToClassFile; private static String pathToClassFile;
private static Object instanceOfClass; private static Object instanceOfClass;
private static Object instanceOfClass1;
@BeforeClass @BeforeClass
public static void setUpBeforeClass() throws Exception { public static void setUpBeforeClass() throws Exception {
@ -30,10 +34,59 @@ public class OLTest {
loader = new URLClassLoader(new URL[] {new URL("file://"+pathToClassFile)}); loader = new URLClassLoader(new URL[] {new URL("file://"+pathToClassFile)});
classToTest = loader.loadClass("OL"); classToTest = loader.loadClass("OL");
instanceOfClass = classToTest.getDeclaredConstructor().newInstance(); instanceOfClass = classToTest.getDeclaredConstructor().newInstance();
classToTest1 = loader.loadClass("OLMain");
instanceOfClass1 = classToTest1.getDeclaredConstructor().newInstance();
} }
@Test @Test
public void test() { public void testOLClassName() {
fail("Not yet implemented"); assertEquals("OL", classToTest.getName());
}
@Test
public void testmInt() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
Method m = classToTest.getDeclaredMethod("m", Integer.class);
Integer result = (Integer) m.invoke(instanceOfClass, 5);
assertEquals(10, result);
}
@Test
public void testmDouble() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
Method m = classToTest.getDeclaredMethod("m", Double.class);
Double result = (Double) m.invoke(instanceOfClass, 5.0);
assertEquals(10.0, result);
}
@Test
public void testmString() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
Method m = classToTest.getDeclaredMethod("m", String.class);
String result = (String) m.invoke(instanceOfClass, "xxx");
assertEquals("xxxxxx", result);
}
@Test
public void testOLMainClassName() {
assertEquals("OLMain", classToTest1.getName());
}
@Test
public void testmainInt() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
Method main = classToTest1.getDeclaredMethod("main", Integer.class);
Integer result = (Integer) main.invoke(instanceOfClass1, 5);
assertEquals(10, result);
}
@Test
public void testmainDouble() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
Method main = classToTest1.getDeclaredMethod("main", Double.class);
Double result = (Double) main.invoke(instanceOfClass1, 5.0);
assertEquals(10.0, result);
}
@Test
public void testmainString() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
Method main = classToTest1.getDeclaredMethod("main", String.class);
String result = (String) main.invoke(instanceOfClass1, "xxx");
assertEquals("xxxxxx", result);
} }
} }

View File

@ -0,0 +1,51 @@
package bytecode;
import de.dhbwstuttgart.core.JavaTXCompiler;
import org.junit.BeforeClass;
import org.junit.Test;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import static org.junit.Assert.assertEquals;
public class OverloadingSortingTest {
private static String path;
private static File fileToTest;
private static JavaTXCompiler compiler;
private static ClassLoader loader;
private static Class<?> classToTest;
private static String pathToClassFile;
private static Object instanceOfClass;
private static Class<?> classOL2;
private static Object instanceOfClassOL2;
@BeforeClass
public static void setUpBeforeClass() throws Exception {
path = System.getProperty("user.dir")+"/test/bytecode/javFiles/Sorting.jav";
fileToTest = new File(path);
compiler = new JavaTXCompiler(fileToTest);
pathToClassFile = System.getProperty("user.dir")+"/testBytecode/generatedBC/";
compiler.generateBytecode(pathToClassFile);
loader = new URLClassLoader(new URL[] {new URL("file://"+pathToClassFile)});
classToTest = loader.loadClass("Sorting");
instanceOfClass = classToTest.getDeclaredConstructor().newInstance();
}
@Test
public void test() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
Method meth = classToTest.getDeclaredMethod("merge", classToTest);
}
@Test
public void test2() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
Method meth = classToTest.getDeclaredMethod("test", classOL2);
String res = (String) meth.invoke(instanceOfClass, instanceOfClassOL2);
assertEquals("Overloading2", res);
}
}

View File

@ -0,0 +1,27 @@
package bytecode;
import static org.junit.Assert.*;
import java.io.File;
import java.io.IOException;
import org.junit.Test;
import de.dhbwstuttgart.core.JavaTXCompiler;
public class SubMatTest {
private static String path;
private static File fileToTest;
private static JavaTXCompiler compiler;
private static String pathToClassFile;
@Test
public void test() throws ClassNotFoundException, IOException {
path = System.getProperty("user.dir")+"/test/bytecode/javFiles/SubMatrix.jav";
fileToTest = new File(path);
compiler = new JavaTXCompiler(fileToTest);
pathToClassFile = System.getProperty("user.dir")+"/testBytecode/generatedBC/";
compiler.generateBytecode(pathToClassFile);
}
}

View File

@ -3,6 +3,7 @@ package bytecode;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.io.File; import java.io.File;
import java.lang.reflect.Method;
import java.net.URL; import java.net.URL;
import java.net.URLClassLoader; import java.net.URLClassLoader;
@ -34,8 +35,35 @@ public class Tph2Test {
} }
@Test @Test
public void test() { public void test1() throws Exception {
fail("Not yet implemented"); Method m = classToTest.getDeclaredMethod("m", Object.class, Object.class);
Object result = m.invoke(instanceOfClass, 1,2);
assertEquals(1,result);
}
@Test
public void test2() throws Exception {
Method m = classToTest.getDeclaredMethod("m", Object.class, Object.class);
Object result = m.invoke(instanceOfClass, "sss",2);
assertEquals("sss",result);
}
@Test
public void test3() throws Exception {
Method m = classToTest.getDeclaredMethod("m2", Object.class, Object.class);
Object result = m.invoke(instanceOfClass, 1,2);
assertEquals(2,result);
}
@Test
public void test4() throws Exception {
Method m = classToTest.getDeclaredMethod("m2", Object.class, Object.class);
Object result = m.invoke(instanceOfClass, 1,"xxx");
assertEquals("xxx",result);
} }
} }

View File

@ -0,0 +1,31 @@
package bytecode;
import static org.junit.Assert.*;
import java.io.File;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import org.junit.BeforeClass;
import org.junit.Test;
import de.dhbwstuttgart.core.JavaTXCompiler;
public class Tph3Test {
private static String path;
private static File fileToTest;
private static JavaTXCompiler compiler;
private static String pathToClassFile;
@Test
public void generateBC() throws Exception {
path = System.getProperty("user.dir")+"/test/bytecode/javFiles/Tph3.jav";
fileToTest = new File(path);
compiler = new JavaTXCompiler(fileToTest);
pathToClassFile = System.getProperty("user.dir")+"/testBytecode/generatedBC/";
compiler.generateBytecode(pathToClassFile);
}
}

View File

@ -3,6 +3,7 @@ package bytecode;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.io.File; import java.io.File;
import java.lang.reflect.Method;
import java.net.URL; import java.net.URL;
import java.net.URLClassLoader; import java.net.URLClassLoader;
@ -11,7 +12,7 @@ import org.junit.Test;
import de.dhbwstuttgart.core.JavaTXCompiler; import de.dhbwstuttgart.core.JavaTXCompiler;
public class StaticTest { public class Tph5Test {
private static String path; private static String path;
private static File fileToTest; private static File fileToTest;
@ -23,19 +24,21 @@ public class StaticTest {
@BeforeClass @BeforeClass
public static void setUpBeforeClass() throws Exception { public static void setUpBeforeClass() throws Exception {
path = System.getProperty("user.dir")+"/test/bytecode/javFiles/StaticM.jav"; path = System.getProperty("user.dir")+"/test/bytecode/javFiles/Tph5.jav";
fileToTest = new File(path); fileToTest = new File(path);
compiler = new JavaTXCompiler(fileToTest); compiler = new JavaTXCompiler(fileToTest);
pathToClassFile = System.getProperty("user.dir")+"/testBytecode/generatedBC/"; pathToClassFile = System.getProperty("user.dir")+"/testBytecode/generatedBC/";
compiler.generateBytecode(pathToClassFile); compiler.generateBytecode(pathToClassFile);
loader = new URLClassLoader(new URL[] {new URL("file://" + pathToClassFile)}); loader = new URLClassLoader(new URL[] {new URL("file://"+pathToClassFile)});
classToTest = loader.loadClass("StaticM"); classToTest = loader.loadClass("Tph5");
instanceOfClass = classToTest.getDeclaredConstructor().newInstance(); instanceOfClass = classToTest.getDeclaredConstructor().newInstance();
} }
@Test @Test
public void test() { public void test() throws Exception {
fail("Not yet implemented"); Method m = classToTest.getDeclaredMethod("m", Object.class, Object.class, Object.class);
Object result = m.invoke(instanceOfClass, "xx",2,3);
//assertEquals(2,result);
} }
} }

View File

@ -3,6 +3,7 @@ package bytecode;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.io.File; import java.io.File;
import java.lang.reflect.Method;
import java.net.URL; import java.net.URL;
import java.net.URLClassLoader; import java.net.URLClassLoader;
@ -12,6 +13,7 @@ import org.junit.Test;
import de.dhbwstuttgart.core.JavaTXCompiler; import de.dhbwstuttgart.core.JavaTXCompiler;
public class TphTest { public class TphTest {
private static String path; private static String path;
private static File fileToTest; private static File fileToTest;
private static JavaTXCompiler compiler; private static JavaTXCompiler compiler;
@ -33,8 +35,35 @@ public class TphTest {
} }
@Test @Test
public void test() { public void test1() throws Exception {
fail("Not yet implemented"); Method m = classToTest.getDeclaredMethod("m", Object.class, Object.class);
Object result = m.invoke(instanceOfClass, 1,2);
assertEquals(2,result);
}
@Test
public void test2() throws Exception {
Method m = classToTest.getDeclaredMethod("m", Object.class, Object.class);
Object result = m.invoke(instanceOfClass, 1, "sss");
assertEquals("sss",result);
}
@Test
public void test3() throws Exception {
Method m = classToTest.getDeclaredMethod("m2", Object.class);
Object result = m.invoke(instanceOfClass, 2);
assertEquals(2,result);
}
@Test
public void test4() throws Exception {
Method m = classToTest.getDeclaredMethod("m2", Object.class);
Object result = m.invoke(instanceOfClass,"xxx");
assertEquals("xxx",result);
} }
} }

View File

@ -40,5 +40,19 @@ public class WhileTest {
Integer result = (Integer) m.invoke(instanceOfClass, 0); Integer result = (Integer) m.invoke(instanceOfClass, 0);
assertEquals(2, result); assertEquals(2, result);
} }
@Test
public void testDouble() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
Method m = classToTest.getDeclaredMethod("m", Double.class);
Double result = (Double) m.invoke(instanceOfClass, 0.0);
assertEquals(2.0, result);
}
@Test
public void testLong() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
Method m = classToTest.getDeclaredMethod("m", Long.class);
Long result = (Long) m.invoke(instanceOfClass, 0l);
assertEquals(2l, result);
}
} }

View File

@ -0,0 +1,39 @@
package bytecode;
import static org.junit.Assert.assertEquals;
import java.io.File;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import org.junit.Test;
import de.dhbwstuttgart.core.JavaTXCompiler;
public class applyLambdaTest {
private static String path;
private static File fileToTest;
private static JavaTXCompiler compiler;
private static ClassLoader loader;
private static Class<?> classToTest;
private static String pathToClassFile;
private static Object instanceOfClass;
@Test
public void generateBC() throws Exception {
path = System.getProperty("user.dir")+"/test/bytecode/javFiles/applyLambda.jav";
fileToTest = new File(path);
compiler = new JavaTXCompiler(fileToTest);
compiler.generateBytecode(System.getProperty("user.dir")+"/testBytecode/generatedBC/");
pathToClassFile = System.getProperty("user.dir")+"/testBytecode/generatedBC/";
loader = new URLClassLoader(new URL[] {new URL("file://"+pathToClassFile)});
classToTest = loader.loadClass("applyLambda");
instanceOfClass = classToTest.getDeclaredConstructor().newInstance();
Method m = classToTest.getDeclaredMethod("m");
Object result = m.invoke(instanceOfClass);
assertEquals(result.getClass(), loader.loadClass("Apply"));
}
}

View File

@ -1,4 +1,6 @@
import java.lang.Integer; import java.lang.Integer;
import java.lang.Double;
public class BinaryInMeth { public class BinaryInMeth {
m(a){ m(a){
@ -8,4 +10,8 @@ public class BinaryInMeth {
m2(a,b){ m2(a,b){
return m(a+b); return m(a+b);
} }
m3(a) {
return m(++a);
}
} }

View File

@ -1,6 +1,5 @@
import java.lang.Integer; import java.lang.Integer;
import java.lang.Long; //import java.lang.Double;
import java.lang.Double;
public class Fac { public class Fac {

View File

@ -4,13 +4,13 @@ class Faculty {
m () { m () {
var fact = (Integer x) -> { var fact = (x) -> {
//if (x == 1) { if (x == 1) {
return x; return x;
//} }
//else { else {
//return x * (fact.apply(x-1)); return x * (fact.apply(x-1));
//} }
}; };
return fact; return fact;
} }

View File

@ -1,13 +1,15 @@
import java.lang.Integer; import java.lang.Integer;
import java.lang.Boolean; import java.lang.Boolean;
import java.lang.String;
public class IfTest{ public class IfTest{
Integer m1(Boolean b) { Integer m1(Boolean b) {
Integer i; Integer i;
String b;
if(b) { if(b) {
return i; return i;
}else{
return b;
} }
return i;
} }
} }

View File

@ -1,5 +1,4 @@
import java.util.Vector; import java.lang.Integer;
class Apply { }
public class Lambda { public class Lambda {
@ -7,10 +6,5 @@ public class Lambda {
var lam1 = (x) -> { var lam1 = (x) -> {
return x; return x;
}; };
return lam1;
return lam1.apply(new Apply());
//return lam1;
//return new Vector();
}
} }

View File

@ -0,0 +1,9 @@
import java.lang.Integer;
public class Lambda {
m () {
var lam1 = (x) -> { };
return lam1;
}
}

View File

@ -1,5 +1,6 @@
import java.util.Vector; import java.util.Vector;
import java.lang.Integer; import java.lang.Integer;
//import java.lang.Byte;
import java.lang.Boolean; import java.lang.Boolean;
public class Matrix extends Vector<Vector<Integer>> { public class Matrix extends Vector<Vector<Integer>> {

View File

@ -0,0 +1,20 @@
import java.util.List;
import java.lang.Integer;
import java.util.Collection;
class Merge {
merge(a, b) {
a.addAll(b);
return a;
}
sort(in){
var firstHalf = in.subList(1,2);
var secondHalf = in.subList(1,2);
return merge(sort(firstHalf), sort(secondHalf));
}
}

View File

@ -1,16 +1,18 @@
import java.lang.String;
import java.lang.Integer; import java.lang.Integer;
import java.lang.Double; import java.lang.Double;
import java.lang.String;
class OL {
public class OL {
m(x) { return x + x; } m(x) { return x + x; }
} }
class OLMain {
public class OLMain {
main(x) { main(x) {
var ol; var ol;

View File

@ -1,4 +1,5 @@
import java.lang.Integer; import java.lang.Integer;
import java.lang.String;
public class Plus { public class Plus {

View File

@ -0,0 +1,9 @@
import java.util.List;
import java.util.Collection;
class Sorting{
merge(a, b){
a.addAll(b);
return a;
}
}

View File

@ -1,3 +1,13 @@
public class SubMatrix extends Matrix { import java.util.Vector;
import java.lang.Integer;
public class Matrix2 extends Vector<Integer> {
}
public class SubMatrix extends Matrix2 {
m(){
Vector<Integer> v = new Vector<Integer>();
v.add(1);
}
} }

View File

@ -2,7 +2,8 @@ public class Tph {
m(a,b){ m(a,b){
var c = m2(b); var c = m2(b);
return a; return c;
// return m2(b);
} }
m2(b){ m2(b){

View File

@ -0,0 +1,13 @@
public class Tph3 {
// m(a,b){
// var c = m2(a,b);
// return c;
// }
//
// m2(a,b){
// return m(a,b);
// }
m1(x, y) { m2(x); x = y; }
m2(y) { m1(y, y); }
}

View File

@ -0,0 +1,12 @@
public class Tph4{
m(a,b){
var c = m2(b);
var d = m2(c);
return a;
}
m2(b){
return b
}
}

View File

@ -0,0 +1,7 @@
public class Tph5 {
m(a,b,c){
a = c;
b = c;
return a;
}
}

View File

@ -0,0 +1,8 @@
import java.lang.Integer;
import java.util.List;
public class WC {
void m (List<? super Integer> a, List<? extends Integer> b) {
}
}

View File

@ -1,11 +1,9 @@
import java.lang.Integer; import java.lang.Integer;
// wenn nur ein Import da steht,wird die Type von
// dem Literal 2 Number berechnet => Deswegen kann
// nicht auf den Stack geladen.
import java.lang.Long; import java.lang.Long;
import java.lang.Double;
public class While { public class While {
Integer m(x) { m(x) {
while(x < 2) { while(x < 2) {
x = x+1; x = x+1;
} }

View File

@ -0,0 +1,16 @@
import java.util.Vector;
class Apply { }
public class applyLambda {
m () {
var lam1 = (x) -> {
return x;
};
return lam1.apply(new Apply());
//return lam1;
//return new Vector();
}
}

View File

@ -0,0 +1,17 @@
import java.lang.Integer;
class Faculty {
m () {
var fact = (Integer x) -> {
if (x == 1) {
return x;
}
else {
return x * (fact.apply(x-1));
}
};
return fact;
}
}

11
test/javFiles/Fields.jav Normal file
View File

@ -0,0 +1,11 @@
import java.lang.String;
class Fields{
test2 = "test";
test;
m(){
var test3;
return test;
}
}

View File

@ -1,3 +1,4 @@
import java.lang.String;
class Generics<B> { class Generics<B> {
//<A extends B> A mt1(A a, B b){ //<A extends B> A mt1(A a, B b){

14
test/javFiles/IfTest.jav Normal file
View File

@ -0,0 +1,14 @@
import java.lang.Integer;
import java.lang.Boolean;
import java.lang.Object;
public class IfTest{
Object m1(b) {
Integer i;
if(b) {
return i;
}else{
return b;
}
}
}

View File

@ -1,9 +1,10 @@
class Apply { }
class Apply { }
public class Lambda { public class Lambda {
m () { m () {
var lam1 = (Integer x) -> { var lam1 = (x) -> {
return x; return x;
}; };
return lam1.apply(new Apply()); return lam1.apply(new Apply());

View File

@ -0,0 +1,8 @@
import java.util.List;
import java.util.Collection;
class Sorting{
void merge(a, b){
a.addAll(b);
}
}

5
test/logFiles/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

View File

@ -42,7 +42,7 @@ public class GeneralParserTest{
filenames.add("StructuralTypes.jav"); filenames.add("StructuralTypes.jav");
*/ */
// filenames.add("ExtendsTest.jav"); // filenames.add("ExtendsTest.jav");
filenames.add("OpratorTest.jav"); filenames.add("PackageNameTest.jav");
try{ try{
new JavaTXCompiler(filenames.stream().map(s -> new File(rootDirectory + s)).collect(Collectors.toList())); new JavaTXCompiler(filenames.stream().map(s -> new File(rootDirectory + s)).collect(Collectors.toList()));
}catch(Exception exc){ }catch(Exception exc){

View File

@ -23,7 +23,6 @@ import java.util.Set;
public class JavaTXCompilerTest { public class JavaTXCompilerTest {
public static final String rootDirectory = System.getProperty("user.dir")+"/test/javFiles/"; public static final String rootDirectory = System.getProperty("user.dir")+"/test/javFiles/";
@Test @Test
public void finiteClosure() throws IOException, ClassNotFoundException { public void finiteClosure() throws IOException, ClassNotFoundException {
execute(new File(rootDirectory+"fc.jav")); execute(new File(rootDirectory+"fc.jav"));
@ -41,6 +40,10 @@ public class JavaTXCompilerTest {
execute(new File(rootDirectory+"Lambda3.jav")); execute(new File(rootDirectory+"Lambda3.jav"));
} }
@Test @Test
public void lambdaField() throws IOException, ClassNotFoundException {
execute(new File(rootDirectory+"LambdaField.jav"));
}
@Test
public void mathStruc() throws IOException, ClassNotFoundException { public void mathStruc() throws IOException, ClassNotFoundException {
execute(new File(rootDirectory+"mathStruc.jav")); execute(new File(rootDirectory+"mathStruc.jav"));
} }
@ -58,6 +61,10 @@ public class JavaTXCompilerTest {
execute(new File(rootDirectory+"Faculty.jav")); execute(new File(rootDirectory+"Faculty.jav"));
} }
@Test @Test
public void facultyIf() throws IOException, ClassNotFoundException {
execute(new File(rootDirectory+"FacultyIf.jav"));
}
@Test
public void facultyTyped() throws IOException, ClassNotFoundException { public void facultyTyped() throws IOException, ClassNotFoundException {
execute(new File(rootDirectory+"FacultyTyped.jav")); execute(new File(rootDirectory+"FacultyTyped.jav"));
} }
@ -85,6 +92,18 @@ public class JavaTXCompilerTest {
public void addLong() throws IOException, ClassNotFoundException { public void addLong() throws IOException, ClassNotFoundException {
execute(new File(rootDirectory+"AddLong.jav")); execute(new File(rootDirectory+"AddLong.jav"));
} }
@Test
public void fields() throws IOException, ClassNotFoundException {
execute(new File(rootDirectory+"Fields.jav"));
}
@Test
public void ifStatement() throws IOException, ClassNotFoundException {
execute(new File(rootDirectory+"IfTest.jav"));
}
@Test
public void multipleSolutions() throws IOException, ClassNotFoundException {
execute(new File(rootDirectory+"Sorting.jav"));
}
private static class TestResultSet{ private static class TestResultSet{