Merge (auweioiwae)

This commit is contained in:
Andreas Stadelmeier 2017-07-14 15:39:16 +02:00
commit 3b95cdd76f
82 changed files with 5515 additions and 4613 deletions

View File

@ -7,5 +7,16 @@
<classpathentry kind="lib" path="lib/guava-10.0.1.jar"/> <classpathentry kind="lib" path="lib/guava-10.0.1.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="lib" path="lib/antlr-complete.jar"/> <classpathentry kind="lib" path="lib/antlr-complete.jar"/>
<classpathentry kind="lib" path="lib/annotations-2.0.1.jar"/>
<classpathentry kind="lib" path="lib/bcel-6.1-SNAPSHOT-sources.jar"/>
<classpathentry kind="lib" path="lib/cloning.jar"/>
<classpathentry kind="lib" path="lib/commons-bcel6-6.0-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="lib/guava-15.0.jar"/>
<classpathentry kind="lib" path="lib/javassist-3.19.0-GA.jar"/>
<classpathentry kind="lib" path="lib/junit-4.0.jar"/>
<classpathentry kind="lib" path="lib/log4j-1.2.12.jar"/>
<classpathentry kind="lib" path="lib/reflections-0.9.10-javadoc.jar"/>
<classpathentry kind="lib" path="lib/reflections-0.9.10-sources.jar"/>
<classpathentry kind="lib" path="lib/reflections-0.9.10.jar"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>

View File

@ -1,8 +1,21 @@
package de.dhbwstuttgart.core; package de.dhbwstuttgart.core;
import de.dhbwstuttgart.parser.ClassNotFoundException;
import java.io.File;
import java.io.IOException;
import java.util.*; import java.util.*;
public class ConsoleInterface { public class ConsoleInterface {
private static final String directory = System.getProperty("user.dir"); private static final String directory = System.getProperty("user.dir");
public static void main(String[] args) throws IOException, ClassNotFoundException {
JavaTXCompiler compiler = new JavaTXCompiler();
for(String arg : Arrays.asList(args)){
compiler.parse(new File(arg));
}
compiler.typeInference();
}
} }

View File

@ -8,6 +8,7 @@ import de.dhbwstuttgart.syntaxtree.SourceFile;
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
import de.dhbwstuttgart.syntaxtree.factory.UnifyTypeFactory; import de.dhbwstuttgart.syntaxtree.factory.UnifyTypeFactory;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
import de.dhbwstuttgart.typedeployment.TypeInsert;
import de.dhbwstuttgart.typedeployment.TypeInsertFactory; import de.dhbwstuttgart.typedeployment.TypeInsertFactory;
import de.dhbwstuttgart.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typedeployment.TypeInsertPoint;
import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.ResultSet;
@ -26,17 +27,7 @@ import java.util.*;
public class JavaTXCompiler { public class JavaTXCompiler {
private List<SourceFile> sourceFiles = new ArrayList<>(); protected List<SourceFile> sourceFiles = new ArrayList<>();
public List<TypeInsertPoint> getTypeInserts(File forFile){
ResultSet result = typeInference();
for(SourceFile sf : sourceFiles){
if(sf.getFile().equals(forFile)){
return TypeInsertFactory.createTypeInsertPoints(sf, result);
}
}
throw new DebugException("Die Datei "+forFile+" wurde nicht geparst");
}
public ResultSet typeInference(){ public ResultSet typeInference(){
ConstraintSet<Pair> cons = new ConstraintSet<>(); ConstraintSet<Pair> cons = new ConstraintSet<>();
@ -64,6 +55,7 @@ public class JavaTXCompiler {
results.addAll(result); results.addAll(result);
} }
return new ResultSet(UnifyTypeFactory.convert(results, generateTPHMap(cons))); return new ResultSet(UnifyTypeFactory.convert(results, generateTPHMap(cons)));
//return new ResultSet(new HashSet<>(Arrays.asList(UnifyTypeFactory.convert(results, generateTPHMap(cons)).iterator().next())));
} }
private Map<String, TypePlaceholder> generateTPHMap(ConstraintSet<Pair> constraints){ private Map<String, TypePlaceholder> generateTPHMap(ConstraintSet<Pair> constraints){
@ -80,8 +72,16 @@ public class JavaTXCompiler {
return ret; return ret;
} }
public void parse(File sourceFile) throws IOException, ClassNotFoundException { public SourceFile parse(File sourceFile) throws IOException, ClassNotFoundException {
sourceFiles.add(new JavaTXParser().parse(sourceFile)); SourceFile ret = new JavaTXParser().parse(sourceFile);
sourceFiles.add(ret);
return ret;
}
public SourceFile parse(String source) throws IOException, ClassNotFoundException {
SourceFile ret = new JavaTXParser().parse(source);
sourceFiles.add(ret);
return ret;
} }
} }

View File

@ -9,12 +9,13 @@ import org.antlr.v4.runtime.ANTLRInputStream;
import org.antlr.v4.runtime.CommonTokenStream; import org.antlr.v4.runtime.CommonTokenStream;
import java.io.*; import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
public class JavaTXParser { public class JavaTXParser {
public SourceFile parse(File sourceFile) throws IOException, ClassNotFoundException { public SourceFile parse(InputStream source) throws IOException, ClassNotFoundException {
InputStream stream = new FileInputStream(sourceFile); InputStream stream = source;//new FileInputStream(sourceFile);
ANTLRInputStream input = new ANTLRInputStream(stream); ANTLRInputStream input = new ANTLRInputStream(stream);
Java8Lexer lexer = new Java8Lexer(input); Java8Lexer lexer = new Java8Lexer(input);
CommonTokenStream tokens = new CommonTokenStream(lexer); CommonTokenStream tokens = new CommonTokenStream(lexer);
@ -22,7 +23,7 @@ public class JavaTXParser {
Java8Parser.CompilationUnitContext tree = parser.compilationUnit(); Java8Parser.CompilationUnitContext tree = parser.compilationUnit();
SyntaxTreeGenerator generator = new SyntaxTreeGenerator(new JavaClassRegistry(generateJavaLangNames())); SyntaxTreeGenerator generator = new SyntaxTreeGenerator(new JavaClassRegistry(generateJavaLangNames()));
return generator.convert(tree, sourceFile); return generator.convert(tree);
} }
private List<String> generateJavaLangNames() throws IOException, ClassNotFoundException { private List<String> generateJavaLangNames() throws IOException, ClassNotFoundException {
@ -36,4 +37,12 @@ public class JavaTXParser {
return ret; return ret;
} }
public SourceFile parse(File file) throws IOException, ClassNotFoundException {
return this.parse(new FileInputStream(file));
}
public SourceFile parse(String fileContent) throws IOException, ClassNotFoundException {
return this.parse(new ByteArrayInputStream(fileContent.getBytes(StandardCharsets.UTF_8)));
}
} }

View File

@ -4,8 +4,6 @@ import de.dhbwstuttgart.exceptions.NotImplementedException;
import de.dhbwstuttgart.parser.NullToken; import de.dhbwstuttgart.parser.NullToken;
import de.dhbwstuttgart.parser.antlr.Java8Parser; import de.dhbwstuttgart.parser.antlr.Java8Parser;
import de.dhbwstuttgart.syntaxtree.*; import de.dhbwstuttgart.syntaxtree.*;
import de.dhbwstuttgart.syntaxtree.operator.AndOp;
import de.dhbwstuttgart.syntaxtree.operator.OrOp;
import de.dhbwstuttgart.syntaxtree.statement.*; import de.dhbwstuttgart.syntaxtree.statement.*;
import de.dhbwstuttgart.syntaxtree.statement.literal.*; import de.dhbwstuttgart.syntaxtree.statement.literal.*;
import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.RefType;
@ -22,12 +20,13 @@ import java.util.*;
public class StatementGenerator { public class StatementGenerator {
private JavaClassRegistry reg; private JavaClassRegistry reg;
private Map<String, RefTypeOrTPHOrWildcardOrGeneric> localVars = new HashMap<>(); private Map<String, RefTypeOrTPHOrWildcardOrGeneric> localVars;
private GenericsRegistry generics; private GenericsRegistry generics;
public StatementGenerator(JavaClassRegistry reg, GenericsRegistry generics){ public StatementGenerator(JavaClassRegistry reg, GenericsRegistry generics, Map<String, RefTypeOrTPHOrWildcardOrGeneric> localVars){
this.reg = reg; this.reg = reg;
this.generics = generics; this.generics = generics;
this.localVars = localVars;
} }
public ParameterList convert(Java8Parser.FormalParameterListContext formalParameterListContext) { public ParameterList convert(Java8Parser.FormalParameterListContext formalParameterListContext) {
@ -124,26 +123,24 @@ public class StatementGenerator {
List<Statement> statements = new ArrayList<>(); List<Statement> statements = new ArrayList<>();
if(block.blockStatements() != null) if(block.blockStatements() != null)
for(Java8Parser.BlockStatementContext statementContext : block.blockStatements().blockStatement()){ for(Java8Parser.BlockStatementContext statementContext : block.blockStatements().blockStatement()){
Statement stmt = convert(statementContext); List<Statement> stmt = convert(statementContext);
statements.add(stmt); statements.addAll(stmt);
} }
statements = SyntacticSugar.addTrailingReturn(statements); statements = SyntacticSugar.addTrailingReturn(statements);
return new Block(statements, block.getStart()); return new Block(statements, block.getStart());
} }
private Statement convert(Java8Parser.BlockStatementContext statementContext) { private List<Statement> convert(Java8Parser.BlockStatementContext statementContext) {
List<de.dhbwstuttgart.syntaxtree.statement.Statement> ret = new ArrayList<>();
if(statementContext.localVariableDeclarationStatement() != null){ if(statementContext.localVariableDeclarationStatement() != null){
return convert(statementContext.localVariableDeclarationStatement()); return convert(statementContext.localVariableDeclarationStatement());
}else if(statementContext.classDeclaration() != null){ }else if(statementContext.classDeclaration() != null){
throw new NotImplementedException(); throw new NotImplementedException();
}else{ }else{
Java8Parser.StatementContext stmt = statementContext.statement(); return Arrays.asList(convert(statementContext.statement()));
return convert(stmt);
} }
} }
private Statement convert(Java8Parser.LocalVariableDeclarationStatementContext stmt) { private List<Statement> convert(Java8Parser.LocalVariableDeclarationStatementContext stmt) {
Java8Parser.LocalVariableDeclarationContext declaration = stmt.localVariableDeclaration(); Java8Parser.LocalVariableDeclarationContext declaration = stmt.localVariableDeclaration();
return convert(declaration); return convert(declaration);
} }
@ -232,8 +229,8 @@ public class StatementGenerator {
if(localVars.get(expression) != null){ if(localVars.get(expression) != null){
return new LocalVar(expression, localVars.get(expression), offset); return new LocalVar(expression, localVars.get(expression), offset);
}else{ }else{
//throw new NotImplementedException();
//Dann Muss es ein Feld sein! //Dann Muss es ein Feld sein!
return new FieldVar(new This(offset), expression, TypePlaceholder.fresh(offset), offset);
} }
} }
return generateFieldVarOrClassname(expression, offset); return generateFieldVarOrClassname(expression, offset);
@ -376,32 +373,42 @@ public class StatementGenerator {
throw new NotImplementedException(); throw new NotImplementedException();
} }
private Statement convert(Java8Parser.ForInitContext stmt){ private List<Statement> convert(Java8Parser.ForInitContext stmt){
if(stmt.statementExpressionList() != null){ if(stmt.statementExpressionList() != null){
return convert(stmt.statementExpressionList()); return Arrays.asList(convert(stmt.statementExpressionList()));
}else if(stmt.localVariableDeclaration() != null){ }else if(stmt.localVariableDeclaration() != null){
return convert(stmt.localVariableDeclaration()); return convert(stmt.localVariableDeclaration());
}else throw new NotImplementedException(); }else throw new NotImplementedException();
} }
private Statement convert(Java8Parser.LocalVariableDeclarationContext declaration) { private List<Statement> convert(Java8Parser.LocalVariableDeclarationContext declaration) {
List<LocalVarDecl> declarations = new ArrayList<>(); List<Statement> ret = new ArrayList<>();
if(declaration.variableModifier() != null && declaration.variableModifier().size() > 0){ if(declaration.variableModifier() != null && declaration.variableModifier().size() > 0){
//TODO //TODO
throw new NotImplementedException();
} }
RefTypeOrTPHOrWildcardOrGeneric type; RefTypeOrTPHOrWildcardOrGeneric type;
if(declaration.unannType()==null){ if(declaration.unannTypeOrAuto().unannType()==null){
type = TypePlaceholder.fresh(declaration.getStart()); type = TypePlaceholder.fresh(declaration.getStart());
}else{ }else{
type = TypeGenerator.convert(declaration.unannType(), reg, generics); type = TypeGenerator.convert(declaration.unannTypeOrAuto().unannType(), reg, generics);
} }
for(Java8Parser.VariableDeclaratorContext varDecl : declaration.variableDeclaratorList().variableDeclarator()){ for(Java8Parser.VariableDeclaratorContext varDecl : declaration.variableDeclaratorList().variableDeclarator()){
TerminalNode name = varDecl.variableDeclaratorId().Identifier(); TerminalNode name = varDecl.variableDeclaratorId().Identifier();
declarations.add(new LocalVarDecl(name.getText(), type, name.getSymbol()));
ret.add(new LocalVarDecl(name.getText(), type, name.getSymbol()));
this.localVars.put(name.getText(), type); this.localVars.put(name.getText(), type);
if(varDecl.variableInitializer() != null){
Expression initValue;
if(varDecl.variableInitializer().arrayInitializer() != null){
throw new NotImplementedException();
}else{
initValue = convert(varDecl.variableInitializer().expression());
}
ret.add(new Assign(new LocalVar(name.getText(), type, name.getSymbol()), initValue, name.getSymbol()));
}
} }
if(declarations.size()==1)return declarations.get(0); return ret;
return new LocalVarBunchDeclaration(declarations, declaration.getStart());
} }
private Statement convert(Java8Parser.ForUpdateContext stmt){ private Statement convert(Java8Parser.ForUpdateContext stmt){
@ -496,7 +503,7 @@ public class StatementGenerator {
return convert(expression.conditionalAndExpression()); return convert(expression.conditionalAndExpression());
}else{ }else{
return new Binary(convert(expression.conditionalOrExpression()), return new Binary(convert(expression.conditionalOrExpression()),
convert(expression.conditionalAndExpression()), new OrOp(null)); convert(expression.conditionalAndExpression()), Binary.Operator.OR);
} }
} }
@ -505,7 +512,7 @@ public class StatementGenerator {
return convert(expression.inclusiveOrExpression()); return convert(expression.inclusiveOrExpression());
}else{ }else{
return new Binary(convert(expression.conditionalAndExpression()), return new Binary(convert(expression.conditionalAndExpression()),
convert(expression.inclusiveOrExpression()), new AndOp(null)); convert(expression.inclusiveOrExpression()), Binary.Operator.AND);
} }
} }
@ -704,12 +711,19 @@ public class StatementGenerator {
} }
private Expression convert(Java8Parser.ClassInstanceCreationExpression_lfno_primaryContext newExpression) { private Expression convert(Java8Parser.ClassInstanceCreationExpression_lfno_primaryContext newExpression) {
Java8Parser.TypeArgumentsContext genericArgs = null;
if(newExpression.expressionName()!= null)throw new NotImplementedException(); if(newExpression.expressionName()!= null)throw new NotImplementedException();
if(newExpression.typeArgumentsOrDiamond()!= null)throw new NotImplementedException(); if(newExpression.typeArgumentsOrDiamond()!= null){
if(newExpression.typeArgumentsOrDiamond().typeArguments()!=null){
genericArgs = newExpression.typeArgumentsOrDiamond().typeArguments();
}else {
throw new NotImplementedException();
}
}
if(newExpression.typeArguments()!= null)throw new NotImplementedException(); if(newExpression.typeArguments()!= null)throw new NotImplementedException();
TerminalNode identifier = newExpression.Identifier(0); TerminalNode identifier = newExpression.Identifier(0);
RefType newClass = (RefType) TypeGenerator.convertTypeName(identifier.getText(),identifier.getSymbol(),reg,generics); RefType newClass = (RefType) TypeGenerator.convertTypeName(identifier.getText(),genericArgs,identifier.getSymbol(),reg,generics);
ArgumentList args = convert(newExpression.argumentList()); ArgumentList args = convert(newExpression.argumentList());
return new NewClass(newClass, args, newExpression.getStart()); return new NewClass(newClass, args, newExpression.getStart());
@ -783,14 +797,21 @@ public class StatementGenerator {
params = new ParameterList(new ArrayList<>(), expression.getStart()); params = new ParameterList(new ArrayList<>(), expression.getStart());
} }
HashMap<String,RefTypeOrTPHOrWildcardOrGeneric> lambdaLocals = new HashMap<>();
lambdaLocals.putAll(localVars);
for(FormalParameter param : params.getFormalparalist()){
lambdaLocals.put(param.getName(), param.getType());
}
StatementGenerator lambdaGenerator = new StatementGenerator(reg, generics, lambdaLocals);
Block block; Block block;
if(expression.lambdaBody().expression() != null){ if(expression.lambdaBody().expression() != null){
List<Statement> statements = new ArrayList<>(); List<Statement> statements = new ArrayList<>();
statements.add(new Return(convert(expression.lambdaBody().expression()), statements.add(new Return(lambdaGenerator.convert(expression.lambdaBody().expression()),
expression.lambdaBody().expression().getStart())); expression.lambdaBody().expression().getStart()));
block = new Block(statements, expression.lambdaBody().getStart()); block = new Block(statements, expression.lambdaBody().getStart());
}else{ }else{
block = convert(expression.lambdaBody().block()); block = lambdaGenerator.convert(expression.lambdaBody().block());
} }
List<RefTypeOrTPHOrWildcardOrGeneric> funNParams = new ArrayList<>(); List<RefTypeOrTPHOrWildcardOrGeneric> funNParams = new ArrayList<>();
funNParams.add(TypePlaceholder.fresh(expression.getStart()));//ret-Type funNParams.add(TypePlaceholder.fresh(expression.getStart()));//ret-Type
@ -798,7 +819,7 @@ public class StatementGenerator {
funNParams.add(TypePlaceholder.fresh(expression.getStart()))); funNParams.add(TypePlaceholder.fresh(expression.getStart())));
RefTypeOrTPHOrWildcardOrGeneric lambdaType = TypePlaceholder.fresh(expression.getStart()); RefTypeOrTPHOrWildcardOrGeneric lambdaType = TypePlaceholder.fresh(expression.getStart());
//RefType lambdaType = new RefType(reg.getName("Fun"+params.getFormalparalist().size()), //RefType lambdaType = new RefType(reg.getName("Fun"+params.getFormalparalist().size()),
//funNParams, expression.getStart()); //funNParams, name.getStart());
return new LambdaExpression(lambdaType, params, block, expression.getStart()); return new LambdaExpression(lambdaType, params, block, expression.getStart());
} }
} }

View File

@ -2,6 +2,7 @@ package de.dhbwstuttgart.parser.SyntaxTreeGenerator;
import de.dhbwstuttgart.exceptions.NotImplementedException; import de.dhbwstuttgart.exceptions.NotImplementedException;
import de.dhbwstuttgart.parser.ClassNotFoundException; import de.dhbwstuttgart.parser.ClassNotFoundException;
import de.dhbwstuttgart.parser.NullToken;
import de.dhbwstuttgart.parser.PackageCrawler; import de.dhbwstuttgart.parser.PackageCrawler;
import de.dhbwstuttgart.parser.antlr.Java8Parser; import de.dhbwstuttgart.parser.antlr.Java8Parser;
import de.dhbwstuttgart.syntaxtree.*; import de.dhbwstuttgart.syntaxtree.*;
@ -18,7 +19,8 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import jdk.internal.dynalink.support.TypeConverterFactory; //import jdk.internal.dynalink.support.TypeConverterFactory;
import org.antlr.v4.runtime.CommonToken;
import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.tree.TerminalNode; import org.antlr.v4.runtime.tree.TerminalNode;
@ -168,7 +170,7 @@ public class SyntaxTreeGenerator{
return ret; return ret;
} }
public SourceFile convert(Java8Parser.CompilationUnitContext ctx, File parsedFile) throws ClassNotFoundException{ public SourceFile convert(Java8Parser.CompilationUnitContext ctx) throws ClassNotFoundException{
List<ClassOrInterface> classes = new ArrayList<>(); List<ClassOrInterface> classes = new ArrayList<>();
this.getNames(ctx); this.getNames(ctx);
this.setImports(ctx); this.setImports(ctx);
@ -182,7 +184,7 @@ public class SyntaxTreeGenerator{
} }
classes.add(newClass); classes.add(newClass);
} }
return new SourceFile(parsedFile, this.pkgName, classes, this.imports); return new SourceFile(this.pkgName, classes, this.imports);
} }
public Method convert(Java8Parser.MethodDeclarationContext methodDeclarationContext, JavaClassName parentClass, GenericsRegistry generics) { public Method convert(Java8Parser.MethodDeclarationContext methodDeclarationContext, JavaClassName parentClass, GenericsRegistry generics) {
@ -207,12 +209,14 @@ public class SyntaxTreeGenerator{
private Method convert(int modifiers, Java8Parser.MethodHeaderContext header, Java8Parser.MethodBodyContext body, private Method convert(int modifiers, Java8Parser.MethodHeaderContext header, Java8Parser.MethodBodyContext body,
JavaClassName parentClass, GenericsRegistry localGenerics) { JavaClassName parentClass, GenericsRegistry localGenerics) {
StatementGenerator stmtGen = new StatementGenerator(reg, localGenerics); StatementGenerator stmtGen = new StatementGenerator(reg, localGenerics, new HashMap<>());
String name = header.methodDeclarator().Identifier().getText(); String name = header.methodDeclarator().Identifier().getText();
GenericDeclarationList gtvDeclarations = new GenericDeclarationList(new ArrayList<>(), header.getStart()); GenericDeclarationList gtvDeclarations = new GenericDeclarationList(new ArrayList<>(), header.getStart());
if(header.typeParameters() != null){ if(header.typeParameters() != null){
gtvDeclarations = TypeGenerator.convert(header.typeParameters(), parentClass, name,reg, localGenerics); gtvDeclarations = TypeGenerator.convert(header.typeParameters(), parentClass, name,reg, localGenerics);
}else{
gtvDeclarations = new GenericDeclarationList(new ArrayList<>(), header.getStart());
} }
RefTypeOrTPHOrWildcardOrGeneric retType; RefTypeOrTPHOrWildcardOrGeneric retType;
if(header.result() != null){ if(header.result() != null){
@ -233,6 +237,8 @@ public class SyntaxTreeGenerator{
block = stmtGen.convert(body.block()); block = stmtGen.convert(body.block());
} }
if(parentClass.equals(new JavaClassName(name))){ if(parentClass.equals(new JavaClassName(name))){
//TODO: Constructor darf nicht Rückgabetyp void bekommen: Hier als Rückgabetyp die Klasse inklusive generische Variablen
//retType = TypeGenerator.convertTypeName(name, gtvDeclarations, header.getStart(), reg, localGenerics);
return new Constructor(name, retType, modifiers, parameterList, block, gtvDeclarations, header.getStart()); return new Constructor(name, retType, modifiers, parameterList, block, gtvDeclarations, header.getStart());
}else{ }else{
return new Method(name, retType, modifiers, parameterList,block, gtvDeclarations, header.getStart()); return new Method(name, retType, modifiers, parameterList,block, gtvDeclarations, header.getStart());
@ -261,7 +267,12 @@ public class SyntaxTreeGenerator{
JavaClassName name = reg.getName(ctx.Identifier().getText()); JavaClassName name = reg.getName(ctx.Identifier().getText());
GenericsRegistry generics = createGenerics(ctx.typeParameters(), name, ""); GenericsRegistry generics = createGenerics(ctx.typeParameters(), name, "");
Token offset = ctx.getStart(); Token offset = ctx.getStart();
GenericDeclarationList genericClassParameters = TypeGenerator.convert(ctx.typeParameters(), name, "",reg, generics); GenericDeclarationList genericClassParameters;
if(ctx.typeParameters() == null){
genericClassParameters = createEmptyGenericDeclarationList(ctx.Identifier());
}else{
genericClassParameters = TypeGenerator.convert(ctx.typeParameters(), name, "",reg, generics);
}
List<Field> fielddecl = convertFields(ctx.classBody(), generics); List<Field> fielddecl = convertFields(ctx.classBody(), generics);
List<Method> methods = convertMethods(ctx.classBody(), name, generics); List<Method> methods = convertMethods(ctx.classBody(), name, generics);
List<Constructor> konstruktoren = new ArrayList<>(); List<Constructor> konstruktoren = new ArrayList<>();
@ -462,8 +473,12 @@ public class SyntaxTreeGenerator{
List<Field> fields = convertFields(ctx.interfaceBody()); List<Field> fields = convertFields(ctx.interfaceBody());
List<Method> methods = convertMethods(ctx.interfaceBody(), name, generics); List<Method> methods = convertMethods(ctx.interfaceBody(), name, generics);
GenericDeclarationList genericParams;
GenericDeclarationList genericParams = TypeGenerator.convert(ctx.typeParameters(), name, "",reg, generics); if(ctx.typeParameters() != null){
genericParams = TypeGenerator.convert(ctx.typeParameters(), name, "",reg, generics);
}else{
genericParams = createEmptyGenericDeclarationList(ctx.Identifier());
}
RefType superClass = new ASTFactory(reg).createObjectClass().getType(); RefType superClass = new ASTFactory(reg).createObjectClass().getType();
List<RefTypeOrTPHOrWildcardOrGeneric> extendedInterfaces = convert(ctx.extendsInterfaces(), generics); List<RefTypeOrTPHOrWildcardOrGeneric> extendedInterfaces = convert(ctx.extendsInterfaces(), generics);
@ -472,6 +487,13 @@ public class SyntaxTreeGenerator{
genericParams, superClass, true, extendedInterfaces, ctx.getStart()); genericParams, superClass, true, extendedInterfaces, ctx.getStart());
} }
private GenericDeclarationList createEmptyGenericDeclarationList(TerminalNode classNameIdentifier) {
CommonToken gtvOffset = new CommonToken(classNameIdentifier.getSymbol());
gtvOffset.setCharPositionInLine(gtvOffset.getCharPositionInLine()+classNameIdentifier.getText().length());
gtvOffset.setStartIndex(gtvOffset.getStopIndex()+1);
return new GenericDeclarationList(new ArrayList<>(), gtvOffset);
}
private GenericsRegistry createGenerics(Java8Parser.TypeParametersContext ctx, JavaClassName parentClass, String parentMethod) { private GenericsRegistry createGenerics(Java8Parser.TypeParametersContext ctx, JavaClassName parentClass, String parentMethod) {
GenericsRegistry ret = new GenericsRegistry(); GenericsRegistry ret = new GenericsRegistry();
if(ctx == null || ctx.typeParameterList() == null)return ret; if(ctx == null || ctx.typeParameterList() == null)return ret;

View File

@ -4,7 +4,6 @@ import de.dhbwstuttgart.exceptions.NotImplementedException;
import de.dhbwstuttgart.exceptions.TypeinferenceException; import de.dhbwstuttgart.exceptions.TypeinferenceException;
import de.dhbwstuttgart.parser.NullToken; import de.dhbwstuttgart.parser.NullToken;
import de.dhbwstuttgart.parser.antlr.Java8Parser; import de.dhbwstuttgart.parser.antlr.Java8Parser;
import de.dhbwstuttgart.syntaxtree.GTVDeclarationContext;
import de.dhbwstuttgart.syntaxtree.GenericDeclarationList; import de.dhbwstuttgart.syntaxtree.GenericDeclarationList;
import de.dhbwstuttgart.syntaxtree.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.GenericTypeVar;
import de.dhbwstuttgart.syntaxtree.factory.ASTFactory; import de.dhbwstuttgart.syntaxtree.factory.ASTFactory;
@ -36,11 +35,7 @@ public class TypeGenerator {
name = unannClassOrInterfaceTypeContext.unannInterfaceType_lfno_unannClassOrInterfaceType().unannClassType_lfno_unannClassOrInterfaceType().getText(); name = unannClassOrInterfaceTypeContext.unannInterfaceType_lfno_unannClassOrInterfaceType().unannClassType_lfno_unannClassOrInterfaceType().getText();
arguments = unannClassOrInterfaceTypeContext.unannInterfaceType_lfno_unannClassOrInterfaceType().unannClassType_lfno_unannClassOrInterfaceType().typeArguments(); arguments = unannClassOrInterfaceTypeContext.unannInterfaceType_lfno_unannClassOrInterfaceType().unannClassType_lfno_unannClassOrInterfaceType().typeArguments();
} }
if(arguments == null){ return convertTypeName(name, arguments, unannClassOrInterfaceTypeContext.getStart(), reg, generics);
return convertTypeName(name,unannClassOrInterfaceTypeContext.getStart(), reg, generics);
}else{
return null;
}
} }
public static RefTypeOrTPHOrWildcardOrGeneric convert(Java8Parser.UnannTypeContext unannTypeContext, JavaClassRegistry reg, GenericsRegistry genericsRegistry) { public static RefTypeOrTPHOrWildcardOrGeneric convert(Java8Parser.UnannTypeContext unannTypeContext, JavaClassRegistry reg, GenericsRegistry genericsRegistry) {
@ -48,6 +43,7 @@ public class TypeGenerator {
throw new NotImplementedException(); throw new NotImplementedException();
}else }else
if(unannTypeContext.unannReferenceType().unannArrayType()!=null){ if(unannTypeContext.unannReferenceType().unannArrayType()!=null){
System.out.println(unannTypeContext.getText());
throw new NotImplementedException(); throw new NotImplementedException();
}else }else
if(unannTypeContext.unannReferenceType().unannTypeVariable()!=null){ if(unannTypeContext.unannReferenceType().unannTypeVariable()!=null){
@ -58,9 +54,6 @@ public class TypeGenerator {
} }
public static GenericDeclarationList convert(Java8Parser.TypeParametersContext typeParametersContext, JavaClassName parentClass, String parentMethod, JavaClassRegistry reg, GenericsRegistry generics) { public static GenericDeclarationList convert(Java8Parser.TypeParametersContext typeParametersContext, JavaClassName parentClass, String parentMethod, JavaClassRegistry reg, GenericsRegistry generics) {
if(typeParametersContext == null){
return new GenericDeclarationList(new ArrayList<>(), new NullToken());
}
Token endOffset = typeParametersContext.getStop(); Token endOffset = typeParametersContext.getStop();
List<GenericTypeVar> typeVars = new ArrayList<>(); List<GenericTypeVar> typeVars = new ArrayList<>();
for(Java8Parser.TypeParameterContext typeParameter : typeParametersContext.typeParameterList().typeParameter()){ for(Java8Parser.TypeParameterContext typeParameter : typeParametersContext.typeParameterList().typeParameter()){

View File

@ -730,8 +730,13 @@ localVariableDeclarationStatement
: localVariableDeclaration ';' : localVariableDeclaration ';'
; ;
unannTypeOrAuto
: unannType
| 'auto'
;
localVariableDeclaration localVariableDeclaration
: variableModifier* unannType variableDeclaratorList : variableModifier* unannTypeOrAuto variableDeclaratorList
; ;
statement statement

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 'auto'=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,31 +17,31 @@ 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[] modeNames = { public static String[] modeNames = {
"DEFAULT_MODE" "DEFAULT_MODE"
}; };
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",
@ -68,8 +68,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, "'auto'", "'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'",
@ -84,21 +84,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);
@ -157,9 +157,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;
@ -184,7 +184,7 @@ public class Java8Lexer extends Lexer {
} }
public static final String _serializedATN = public static final String _serializedATN =
"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2m\u0448\b\1\4\2\t"+ "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2n\u044f\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"+
@ -203,376 +203,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\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"+
"\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\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"+
"\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\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"+
"\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\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"+
"\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\r\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\16\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"+
"\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\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"+
"\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\23\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"+
"\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\25\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"+
"\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\31\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\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"+
"\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\34\3\35\3\35\3\35\3\35\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\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\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/\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"+
"\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\61\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"+
"\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\63\3\64\3\64\3\64\3\64\3\64\3\64\3\65\3\65\3\65\3\65\5\65\u0294\n\65"+
"\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\3\66\5\66\u0298\n\66\3\67\3\67\5\67\u029c\n\67\38\38\58\u02a0\n"+
"\n:\3:\3:\3:\5:\u02a9\n:\5:\u02ab\n:\3;\3;\5;\u02af\n;\3;\5;\u02b2\n;"+ "8\39\39\59\u02a4\n9\3:\3:\3;\3;\3;\5;\u02ab\n;\3;\3;\3;\5;\u02b0\n;\5"+
"\3<\3<\5<\u02b6\n<\3=\3=\3>\6>\u02bb\n>\r>\16>\u02bc\3?\3?\5?\u02c1\n"+ ";\u02b2\n;\3<\3<\5<\u02b6\n<\3<\5<\u02b9\n<\3=\3=\5=\u02bd\n=\3>\3>\3"+
"?\3@\6@\u02c4\n@\r@\16@\u02c5\3A\3A\3A\3A\3B\3B\5B\u02ce\nB\3B\5B\u02d1"+ "?\6?\u02c2\n?\r?\16?\u02c3\3@\3@\5@\u02c8\n@\3A\6A\u02cb\nA\rA\16A\u02cc"+
"\nB\3C\3C\3D\6D\u02d6\nD\rD\16D\u02d7\3E\3E\5E\u02dc\nE\3F\3F\5F\u02e0"+ "\3B\3B\3B\3B\3C\3C\5C\u02d5\nC\3C\5C\u02d8\nC\3D\3D\3E\6E\u02dd\nE\rE"+
"\nF\3F\3F\3G\3G\5G\u02e6\nG\3G\5G\u02e9\nG\3H\3H\3I\6I\u02ee\nI\rI\16"+ "\16E\u02de\3F\3F\5F\u02e3\nF\3G\3G\5G\u02e7\nG\3G\3G\3H\3H\5H\u02ed\n"+
"I\u02ef\3J\3J\5J\u02f4\nJ\3K\3K\3K\3K\3L\3L\5L\u02fc\nL\3L\5L\u02ff\n"+ "H\3H\5H\u02f0\nH\3I\3I\3J\6J\u02f5\nJ\rJ\16J\u02f6\3K\3K\5K\u02fb\nK\3"+
"L\3M\3M\3N\6N\u0304\nN\rN\16N\u0305\3O\3O\5O\u030a\nO\3P\3P\5P\u030e\n"+ "L\3L\3L\3L\3M\3M\5M\u0303\nM\3M\5M\u0306\nM\3N\3N\3O\6O\u030b\nO\rO\16"+
"P\3Q\3Q\3Q\5Q\u0313\nQ\3Q\5Q\u0316\nQ\3Q\5Q\u0319\nQ\3Q\3Q\3Q\5Q\u031e"+ "O\u030c\3P\3P\5P\u0311\nP\3Q\3Q\5Q\u0315\nQ\3R\3R\3R\5R\u031a\nR\3R\5"+
"\nQ\3Q\5Q\u0321\nQ\3Q\3Q\3Q\5Q\u0326\nQ\3Q\3Q\3Q\5Q\u032b\nQ\3R\3R\3R"+ "R\u031d\nR\3R\5R\u0320\nR\3R\3R\3R\5R\u0325\nR\3R\5R\u0328\nR\3R\3R\3"+
"\3S\3S\3T\5T\u0333\nT\3T\3T\3U\3U\3V\3V\3W\3W\3W\5W\u033e\nW\3X\3X\5X"+ "R\5R\u032d\nR\3R\3R\3R\5R\u0332\nR\3S\3S\3S\3T\3T\3U\5U\u033a\nU\3U\3"+
"\u0342\nX\3X\3X\3X\5X\u0347\nX\3X\3X\5X\u034b\nX\3Y\3Y\3Y\3Z\3Z\3[\3["+ "U\3V\3V\3W\3W\3X\3X\3X\5X\u0345\nX\3Y\3Y\5Y\u0349\nY\3Y\3Y\3Y\5Y\u034e"+
"\3[\3[\3[\3[\3[\3[\3[\5[\u035b\n[\3\\\3\\\3\\\3\\\3\\\3\\\3\\\3\\\5\\"+ "\nY\3Y\3Y\5Y\u0352\nY\3Z\3Z\3Z\3[\3[\3\\\3\\\3\\\3\\\3\\\3\\\3\\\3\\\3"+
"\u0365\n\\\3]\3]\3^\3^\5^\u036b\n^\3^\3^\3_\6_\u0370\n_\r_\16_\u0371\3"+ "\\\5\\\u0362\n\\\3]\3]\3]\3]\3]\3]\3]\3]\5]\u036c\n]\3^\3^\3_\3_\5_\u0372"+
"`\3`\5`\u0376\n`\3a\3a\3a\3a\5a\u037c\na\3b\3b\3b\3b\3b\3b\3b\3b\3b\3"+ "\n_\3_\3_\3`\6`\u0377\n`\r`\16`\u0378\3a\3a\5a\u037d\na\3b\3b\3b\3b\5"+
"b\3b\5b\u0389\nb\3c\3c\3d\3d\3d\3d\3d\3d\3d\3e\3e\3e\3e\3e\3f\3f\3g\3"+ "b\u0383\nb\3c\3c\3c\3c\3c\3c\3c\3c\3c\3c\3c\5c\u0390\nc\3d\3d\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\3e\3e\3e\3f\3f\3f\3f\3f\3g\3g\3h\3h\3i\3i\3j\3j\3k\3k\3l\3l\3m\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"+ "m\3n\3n\3o\3o\3p\3p\3q\3q\3r\3r\3s\3s\3t\3t\3u\3u\3v\3v\3w\3w\3w\3x\3"+
"{\3|\3|\3|\3}\3}\3}\3~\3~\3\177\3\177\3\u0080\3\u0080\3\u0081\3\u0081"+ "x\3x\3y\3y\3y\3z\3z\3z\3{\3{\3{\3|\3|\3|\3}\3}\3}\3~\3~\3~\3\177\3\177"+
"\3\u0082\3\u0082\3\u0083\3\u0083\3\u0084\3\u0084\3\u0085\3\u0085\3\u0086"+ "\3\u0080\3\u0080\3\u0081\3\u0081\3\u0082\3\u0082\3\u0083\3\u0083\3\u0084"+
"\3\u0086\3\u0086\3\u0087\3\u0087\3\u0087\3\u0088\3\u0088\3\u0088\3\u0089"+ "\3\u0084\3\u0085\3\u0085\3\u0086\3\u0086\3\u0087\3\u0087\3\u0087\3\u0088"+
"\3\u0089\3\u0089\3\u008a\3\u008a\3\u008a\3\u008b\3\u008b\3\u008b\3\u008c"+ "\3\u0088\3\u0088\3\u0089\3\u0089\3\u0089\3\u008a\3\u008a\3\u008a\3\u008b"+
"\3\u008c\3\u008c\3\u008d\3\u008d\3\u008d\3\u008e\3\u008e\3\u008e\3\u008f"+ "\3\u008b\3\u008b\3\u008c\3\u008c\3\u008c\3\u008d\3\u008d\3\u008d\3\u008e"+
"\3\u008f\3\u008f\3\u0090\3\u0090\3\u0090\3\u0090\3\u0091\3\u0091\3\u0091"+ "\3\u008e\3\u008e\3\u008f\3\u008f\3\u008f\3\u0090\3\u0090\3\u0090\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\u0091\3\u0092\3\u0092\3\u0092\3\u0092\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\u0093\3\u0094\3\u0094\7\u0094\u0415\n\u0094\f\u0094"+
"\3\u0094\3\u0094\3\u0094\5\u0094\u0419\n\u0094\3\u0095\3\u0095\3\u0095"+ "\16\u0094\u0418\13\u0094\3\u0095\3\u0095\3\u0095\3\u0095\3\u0095\3\u0095"+
"\3\u0095\3\u0095\3\u0095\5\u0095\u0421\n\u0095\3\u0096\3\u0096\3\u0097"+ "\5\u0095\u0420\n\u0095\3\u0096\3\u0096\3\u0096\3\u0096\3\u0096\3\u0096"+
"\3\u0097\3\u0097\3\u0097\3\u0098\6\u0098\u042a\n\u0098\r\u0098\16\u0098"+ "\5\u0096\u0428\n\u0096\3\u0097\3\u0097\3\u0098\3\u0098\3\u0098\3\u0098"+
"\u042b\3\u0098\3\u0098\3\u0099\3\u0099\3\u0099\3\u0099\7\u0099\u0434\n"+ "\3\u0099\6\u0099\u0431\n\u0099\r\u0099\16\u0099\u0432\3\u0099\3\u0099"+
"\u0099\f\u0099\16\u0099\u0437\13\u0099\3\u0099\3\u0099\3\u0099\3\u0099"+ "\3\u009a\3\u009a\3\u009a\3\u009a\7\u009a\u043b\n\u009a\f\u009a\16\u009a"+
"\3\u0099\3\u009a\3\u009a\3\u009a\3\u009a\7\u009a\u0442\n\u009a\f\u009a"+ "\u043e\13\u009a\3\u009a\3\u009a\3\u009a\3\u009a\3\u009a\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\3\u009b\7\u009b\u0449\n\u009b\f\u009b\16\u009b\u044c\13\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\u009b\3\u043c\2\u009c\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23"+
"%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G"+ "\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31"+
"%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61a\62c\63e\64g\65i\2k\2m\2o\2q\2s\2u\2w\2"+ "\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60"+
"y\2{\2}\2\177\2\u0081\2\u0083\2\u0085\2\u0087\2\u0089\2\u008b\2\u008d"+ "_\61a\62c\63e\64g\65i\66k\2m\2o\2q\2s\2u\2w\2y\2{\2}\2\177\2\u0081\2\u0083"+
"\2\u008f\2\u0091\2\u0093\2\u0095\2\u0097\2\u0099\2\u009b\2\u009d\2\u009f"+ "\2\u0085\2\u0087\2\u0089\2\u008b\2\u008d\2\u008f\2\u0091\2\u0093\2\u0095"+
"\66\u00a1\2\u00a3\2\u00a5\2\u00a7\2\u00a9\2\u00ab\2\u00ad\2\u00af\2\u00b1"+ "\2\u0097\2\u0099\2\u009b\2\u009d\2\u009f\2\u00a1\67\u00a3\2\u00a5\2\u00a7"+
"\2\u00b3\2\u00b5\67\u00b78\u00b9\2\u00bb9\u00bd\2\u00bf\2\u00c1\2\u00c3"+ "\2\u00a9\2\u00ab\2\u00ad\2\u00af\2\u00b1\2\u00b3\2\u00b5\2\u00b78\u00b9"+
"\2\u00c5\2\u00c7\2\u00c9:\u00cb;\u00cd<\u00cf=\u00d1>\u00d3?\u00d5@\u00d7"+ "9\u00bb\2\u00bd:\u00bf\2\u00c1\2\u00c3\2\u00c5\2\u00c7\2\u00c9\2\u00cb"+
"A\u00d9B\u00dbC\u00ddD\u00dfE\u00e1F\u00e3G\u00e5H\u00e7I\u00e9J\u00eb"+ ";\u00cd<\u00cf=\u00d1>\u00d3?\u00d5@\u00d7A\u00d9B\u00dbC\u00ddD\u00df"+
"K\u00edL\u00efM\u00f1N\u00f3O\u00f5P\u00f7Q\u00f9R\u00fbS\u00fdT\u00ff"+ "E\u00e1F\u00e3G\u00e5H\u00e7I\u00e9J\u00ebK\u00edL\u00efM\u00f1N\u00f3"+
"U\u0101V\u0103W\u0105X\u0107Y\u0109Z\u010b[\u010d\\\u010f]\u0111^\u0113"+ "O\u00f5P\u00f7Q\u00f9R\u00fbS\u00fdT\u00ffU\u0101V\u0103W\u0105X\u0107"+
"_\u0115`\u0117a\u0119b\u011bc\u011dd\u011fe\u0121f\u0123g\u0125h\u0127"+ "Y\u0109Z\u010b[\u010d\\\u010f]\u0111^\u0113_\u0115`\u0117a\u0119b\u011b"+
"\2\u0129\2\u012bi\u012dj\u012fk\u0131l\u0133m\3\2\30\4\2NNnn\3\2\63;\4"+ "c\u011dd\u011fe\u0121f\u0123g\u0125h\u0127i\u0129\2\u012b\2\u012dj\u012f"+
"\2ZZzz\5\2\62;CHch\3\2\629\4\2DDdd\3\2\62\63\4\2GGgg\4\2--//\6\2FFHHf"+ "k\u0131l\u0133m\u0135n\3\2\30\4\2NNnn\3\2\63;\4\2ZZzz\5\2\62;CHch\3\2"+
"fhh\4\2RRrr\4\2))^^\4\2$$^^\n\2$$))^^ddhhppttvv\3\2\62\65\6\2&&C\\aac"+ "\629\4\2DDdd\3\2\62\63\4\2GGgg\4\2--//\6\2FFHHffhh\4\2RRrr\4\2))^^\4\2"+
"|\4\2\2\u0081\ud802\udc01\3\2\ud802\udc01\3\2\udc02\ue001\7\2&&\62;C\\"+ "$$^^\n\2$$))^^ddhhppttvv\3\2\62\65\6\2&&C\\aac|\4\2\2\u0081\ud802\udc01"+
"aac|\5\2\13\f\16\17\"\"\4\2\f\f\17\17\u0456\2\3\3\2\2\2\2\5\3\2\2\2\2"+ "\3\2\ud802\udc01\3\2\udc02\ue001\7\2&&\62;C\\aac|\5\2\13\f\16\17\"\"\4"+
"\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\2"+ "\2\f\f\17\17\u045d\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"+
"\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"+ "\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\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\2"+ "\2\2\27\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"+
"\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"+ "!\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-\3"+
"\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"+ "\2\2\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"+
"\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"+ "\29\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"+
"M\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\3"+ "\3\2\2\2\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\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\2\2S\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\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_\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\2\u00a1"+
"\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"+ "\3\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\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\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\u013c\3\2\2\2\7\u0145\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\u014c\3\2\2\2\13\u0154\3\2\2\2\r\u015a\3\2\2\2\17\u015f\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"+ "\u0164\3\2\2\2\23\u016a\3\2\2\2\25\u016f\3\2\2\2\27\u0175\3\2\2\2\31\u017b"+
"\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\u0184\3\2\2\2\35\u018c\3\2\2\2\37\u018f\3\2\2\2!\u0196\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#\u019b\3\2\2\2%\u01a0\3\2\2\2\'\u01a8\3\2\2\2)\u01ae\3\2\2\2+\u01b6"+
"\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-\u01bc\3\2\2\2/\u01c0\3\2\2\2\61\u01c3\3\2\2\2\63\u01c8\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\u01d3\3\2\2\2\67\u01da\3\2\2\29\u01e5\3\2\2\2;\u01e9\3\2\2\2=\u01f3"+
"\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?\u01f8\3\2\2\2A\u01ff\3\2\2\2C\u0203\3\2\2\2E\u020b\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"+ "\u0213\3\2\2\2I\u021d\3\2\2\2K\u0224\3\2\2\2M\u022b\3\2\2\2O\u0231\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\u0238\3\2\2\2S\u0241\3\2\2\2U\u0247\3\2\2\2W\u024e\3\2\2\2Y\u025b"+
"\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[\u0260\3\2\2\2]\u0266\3\2\2\2_\u026d\3\2\2\2a\u0277\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"+ "\u027b\3\2\2\2e\u0280\3\2\2\2g\u0289\3\2\2\2i\u0293\3\2\2\2k\u0295\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\u0299\3\2\2\2o\u029d\3\2\2\2q\u02a1\3\2\2\2s\u02a5\3\2\2\2u\u02b1"+
"\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\u02b3\3\2\2\2y\u02bc\3\2\2\2{\u02be\3\2\2\2}\u02c1\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"+ "\u02c7\3\2\2\2\u0081\u02ca\3\2\2\2\u0083\u02ce\3\2\2\2\u0085\u02d2\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\u02d9\3\2\2\2\u0089\u02dc\3\2\2\2\u008b\u02e2\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"+ "\u02e4\3\2\2\2\u008f\u02ea\3\2\2\2\u0091\u02f1\3\2\2\2\u0093\u02f4\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\u02fa\3\2\2\2\u0097\u02fc\3\2\2\2\u0099\u0300\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"+ "\u0307\3\2\2\2\u009d\u030a\3\2\2\2\u009f\u0310\3\2\2\2\u00a1\u0314\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\u0331\3\2\2\2\u00a5\u0333\3\2\2\2\u00a7\u0336\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"+ "\u0339\3\2\2\2\u00ab\u033d\3\2\2\2\u00ad\u033f\3\2\2\2\u00af\u0341\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\u0351\3\2\2\2\u00b3\u0353\3\2\2\2\u00b5\u0356\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"+ "\u0361\3\2\2\2\u00b9\u036b\3\2\2\2\u00bb\u036d\3\2\2\2\u00bd\u036f\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\u0376\3\2\2\2\u00c1\u037c\3\2\2\2\u00c3\u0382\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"+ "\u038f\3\2\2\2\u00c7\u0391\3\2\2\2\u00c9\u0393\3\2\2\2\u00cb\u039a\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\u039f\3\2\2\2\u00cf\u03a1\3\2\2\2\u00d1\u03a3\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"+ "\u03a5\3\2\2\2\u00d5\u03a7\3\2\2\2\u00d7\u03a9\3\2\2\2\u00d9\u03ab\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\u03ad\3\2\2\2\u00dd\u03af\3\2\2\2\u00df\u03b1\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"+ "\u03b3\3\2\2\2\u00e3\u03b5\3\2\2\2\u00e5\u03b7\3\2\2\2\u00e7\u03b9\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\u03bb\3\2\2\2\u00eb\u03bd\3\2\2\2\u00ed\u03bf\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"+ "\u03c2\3\2\2\2\u00f1\u03c5\3\2\2\2\u00f3\u03c8\3\2\2\2\u00f5\u03cb\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\u03ce\3\2\2\2\u00f9\u03d1\3\2\2\2\u00fb\u03d4\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"+ "\u03d7\3\2\2\2\u00ff\u03d9\3\2\2\2\u0101\u03db\3\2\2\2\u0103\u03dd\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\u03df\3\2\2\2\u0107\u03e1\3\2\2\2\u0109\u03e3\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"+ "\u03e5\3\2\2\2\u010d\u03e7\3\2\2\2\u010f\u03ea\3\2\2\2\u0111\u03ed\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\u03f0\3\2\2\2\u0115\u03f3\3\2\2\2\u0117\u03f6\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"+ "\u03f9\3\2\2\2\u011b\u03fc\3\2\2\2\u011d\u03ff\3\2\2\2\u011f\u0402\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\u0405\3\2\2\2\u0123\u0409\3\2\2\2\u0125\u040d\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"+ "\u0412\3\2\2\2\u0129\u041f\3\2\2\2\u012b\u0427\3\2\2\2\u012d\u0429\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\u042b\3\2\2\2\u0131\u0430\3\2\2\2\u0133\u0436\3\2\2\2\u0135"+
"\7u\2\2\u0138\u0139\7v\2\2\u0139\u013a\7t\2\2\u013a\u013b\7c\2\2\u013b"+ "\u0444\3\2\2\2\u0137\u0138\7c\2\2\u0138\u0139\7w\2\2\u0139\u013a\7v\2"+
"\u013c\7e\2\2\u013c\u013d\7v\2\2\u013d\4\3\2\2\2\u013e\u013f\7c\2\2\u013f"+ "\2\u013a\u013b\7q\2\2\u013b\4\3\2\2\2\u013c\u013d\7c\2\2\u013d\u013e\7"+
"\u0140\7u\2\2\u0140\u0141\7u\2\2\u0141\u0142\7g\2\2\u0142\u0143\7t\2\2"+ "d\2\2\u013e\u013f\7u\2\2\u013f\u0140\7v\2\2\u0140\u0141\7t\2\2\u0141\u0142"+
"\u0143\u0144\7v\2\2\u0144\6\3\2\2\2\u0145\u0146\7d\2\2\u0146\u0147\7q"+ "\7c\2\2\u0142\u0143\7e\2\2\u0143\u0144\7v\2\2\u0144\6\3\2\2\2\u0145\u0146"+
"\2\2\u0147\u0148\7q\2\2\u0148\u0149\7n\2\2\u0149\u014a\7g\2\2\u014a\u014b"+ "\7c\2\2\u0146\u0147\7u\2\2\u0147\u0148\7u\2\2\u0148\u0149\7g\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\7t\2\2\u014a\u014b\7v\2\2\u014b\b\3\2\2\2\u014c\u014d\7d\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\7q\2\2\u014f\u0150\7n\2\2\u0150\u0151\7g\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\7c\2\2\u0152\u0153\7p\2\2\u0153\n\3\2\2\2\u0154\u0155\7d"+
"\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\7t\2\2\u0156\u0157\7g\2\2\u0157\u0158\7c\2\2\u0158\u0159"+
"\u015b\7u\2\2\u015b\u015c\7g\2\2\u015c\16\3\2\2\2\u015d\u015e\7e\2\2\u015e"+ "\7m\2\2\u0159\f\3\2\2\2\u015a\u015b\7d\2\2\u015b\u015c\7{\2\2\u015c\u015d"+
"\u015f\7c\2\2\u015f\u0160\7v\2\2\u0160\u0161\7e\2\2\u0161\u0162\7j\2\2"+ "\7v\2\2\u015d\u015e\7g\2\2\u015e\16\3\2\2\2\u015f\u0160\7e\2\2\u0160\u0161"+
"\u0162\20\3\2\2\2\u0163\u0164\7e\2\2\u0164\u0165\7j\2\2\u0165\u0166\7"+ "\7c\2\2\u0161\u0162\7u\2\2\u0162\u0163\7g\2\2\u0163\20\3\2\2\2\u0164\u0165"+
"c\2\2\u0166\u0167\7t\2\2\u0167\22\3\2\2\2\u0168\u0169\7e\2\2\u0169\u016a"+ "\7e\2\2\u0165\u0166\7c\2\2\u0166\u0167\7v\2\2\u0167\u0168\7e\2\2\u0168"+
"\7n\2\2\u016a\u016b\7c\2\2\u016b\u016c\7u\2\2\u016c\u016d\7u\2\2\u016d"+ "\u0169\7j\2\2\u0169\22\3\2\2\2\u016a\u016b\7e\2\2\u016b\u016c\7j\2\2\u016c"+
"\24\3\2\2\2\u016e\u016f\7e\2\2\u016f\u0170\7q\2\2\u0170\u0171\7p\2\2\u0171"+ "\u016d\7c\2\2\u016d\u016e\7t\2\2\u016e\24\3\2\2\2\u016f\u0170\7e\2\2\u0170"+
"\u0172\7u\2\2\u0172\u0173\7v\2\2\u0173\26\3\2\2\2\u0174\u0175\7e\2\2\u0175"+ "\u0171\7n\2\2\u0171\u0172\7c\2\2\u0172\u0173\7u\2\2\u0173\u0174\7u\2\2"+
"\u0176\7q\2\2\u0176\u0177\7p\2\2\u0177\u0178\7v\2\2\u0178\u0179\7k\2\2"+ "\u0174\26\3\2\2\2\u0175\u0176\7e\2\2\u0176\u0177\7q\2\2\u0177\u0178\7"+
"\u0179\u017a\7p\2\2\u017a\u017b\7w\2\2\u017b\u017c\7g\2\2\u017c\30\3\2"+ "p\2\2\u0178\u0179\7u\2\2\u0179\u017a\7v\2\2\u017a\30\3\2\2\2\u017b\u017c"+
"\2\2\u017d\u017e\7f\2\2\u017e\u017f\7g\2\2\u017f\u0180\7h\2\2\u0180\u0181"+ "\7e\2\2\u017c\u017d\7q\2\2\u017d\u017e\7p\2\2\u017e\u017f\7v\2\2\u017f"+
"\7c\2\2\u0181\u0182\7w\2\2\u0182\u0183\7n\2\2\u0183\u0184\7v\2\2\u0184"+ "\u0180\7k\2\2\u0180\u0181\7p\2\2\u0181\u0182\7w\2\2\u0182\u0183\7g\2\2"+
"\32\3\2\2\2\u0185\u0186\7f\2\2\u0186\u0187\7q\2\2\u0187\34\3\2\2\2\u0188"+ "\u0183\32\3\2\2\2\u0184\u0185\7f\2\2\u0185\u0186\7g\2\2\u0186\u0187\7"+
"\u0189\7f\2\2\u0189\u018a\7q\2\2\u018a\u018b\7w\2\2\u018b\u018c\7d\2\2"+ "h\2\2\u0187\u0188\7c\2\2\u0188\u0189\7w\2\2\u0189\u018a\7n\2\2\u018a\u018b"+
"\u018c\u018d\7n\2\2\u018d\u018e\7g\2\2\u018e\36\3\2\2\2\u018f\u0190\7"+ "\7v\2\2\u018b\34\3\2\2\2\u018c\u018d\7f\2\2\u018d\u018e\7q\2\2\u018e\36"+
"g\2\2\u0190\u0191\7n\2\2\u0191\u0192\7u\2\2\u0192\u0193\7g\2\2\u0193 "+ "\3\2\2\2\u018f\u0190\7f\2\2\u0190\u0191\7q\2\2\u0191\u0192\7w\2\2\u0192"+
"\3\2\2\2\u0194\u0195\7g\2\2\u0195\u0196\7p\2\2\u0196\u0197\7w\2\2\u0197"+ "\u0193\7d\2\2\u0193\u0194\7n\2\2\u0194\u0195\7g\2\2\u0195 \3\2\2\2\u0196"+
"\u0198\7o\2\2\u0198\"\3\2\2\2\u0199\u019a\7g\2\2\u019a\u019b\7z\2\2\u019b"+ "\u0197\7g\2\2\u0197\u0198\7n\2\2\u0198\u0199\7u\2\2\u0199\u019a\7g\2\2"+
"\u019c\7v\2\2\u019c\u019d\7g\2\2\u019d\u019e\7p\2\2\u019e\u019f\7f\2\2"+ "\u019a\"\3\2\2\2\u019b\u019c\7g\2\2\u019c\u019d\7p\2\2\u019d\u019e\7w"+
"\u019f\u01a0\7u\2\2\u01a0$\3\2\2\2\u01a1\u01a2\7h\2\2\u01a2\u01a3\7k\2"+ "\2\2\u019e\u019f\7o\2\2\u019f$\3\2\2\2\u01a0\u01a1\7g\2\2\u01a1\u01a2"+
"\2\u01a3\u01a4\7p\2\2\u01a4\u01a5\7c\2\2\u01a5\u01a6\7n\2\2\u01a6&\3\2"+ "\7z\2\2\u01a2\u01a3\7v\2\2\u01a3\u01a4\7g\2\2\u01a4\u01a5\7p\2\2\u01a5"+
"\2\2\u01a7\u01a8\7h\2\2\u01a8\u01a9\7k\2\2\u01a9\u01aa\7p\2\2\u01aa\u01ab"+ "\u01a6\7f\2\2\u01a6\u01a7\7u\2\2\u01a7&\3\2\2\2\u01a8\u01a9\7h\2\2\u01a9"+
"\7c\2\2\u01ab\u01ac\7n\2\2\u01ac\u01ad\7n\2\2\u01ad\u01ae\7{\2\2\u01ae"+ "\u01aa\7k\2\2\u01aa\u01ab\7p\2\2\u01ab\u01ac\7c\2\2\u01ac\u01ad\7n\2\2"+
"(\3\2\2\2\u01af\u01b0\7h\2\2\u01b0\u01b1\7n\2\2\u01b1\u01b2\7q\2\2\u01b2"+ "\u01ad(\3\2\2\2\u01ae\u01af\7h\2\2\u01af\u01b0\7k\2\2\u01b0\u01b1\7p\2"+
"\u01b3\7c\2\2\u01b3\u01b4\7v\2\2\u01b4*\3\2\2\2\u01b5\u01b6\7h\2\2\u01b6"+ "\2\u01b1\u01b2\7c\2\2\u01b2\u01b3\7n\2\2\u01b3\u01b4\7n\2\2\u01b4\u01b5"+
"\u01b7\7q\2\2\u01b7\u01b8\7t\2\2\u01b8,\3\2\2\2\u01b9\u01ba\7k\2\2\u01ba"+ "\7{\2\2\u01b5*\3\2\2\2\u01b6\u01b7\7h\2\2\u01b7\u01b8\7n\2\2\u01b8\u01b9"+
"\u01bb\7h\2\2\u01bb.\3\2\2\2\u01bc\u01bd\7i\2\2\u01bd\u01be\7q\2\2\u01be"+ "\7q\2\2\u01b9\u01ba\7c\2\2\u01ba\u01bb\7v\2\2\u01bb,\3\2\2\2\u01bc\u01bd"+
"\u01bf\7v\2\2\u01bf\u01c0\7q\2\2\u01c0\60\3\2\2\2\u01c1\u01c2\7k\2\2\u01c2"+ "\7h\2\2\u01bd\u01be\7q\2\2\u01be\u01bf\7t\2\2\u01bf.\3\2\2\2\u01c0\u01c1"+
"\u01c3\7o\2\2\u01c3\u01c4\7r\2\2\u01c4\u01c5\7n\2\2\u01c5\u01c6\7g\2\2"+ "\7k\2\2\u01c1\u01c2\7h\2\2\u01c2\60\3\2\2\2\u01c3\u01c4\7i\2\2\u01c4\u01c5"+
"\u01c6\u01c7\7o\2\2\u01c7\u01c8\7g\2\2\u01c8\u01c9\7p\2\2\u01c9\u01ca"+ "\7q\2\2\u01c5\u01c6\7v\2\2\u01c6\u01c7\7q\2\2\u01c7\62\3\2\2\2\u01c8\u01c9"+
"\7v\2\2\u01ca\u01cb\7u\2\2\u01cb\62\3\2\2\2\u01cc\u01cd\7k\2\2\u01cd\u01ce"+ "\7k\2\2\u01c9\u01ca\7o\2\2\u01ca\u01cb\7r\2\2\u01cb\u01cc\7n\2\2\u01cc"+
"\7o\2\2\u01ce\u01cf\7r\2\2\u01cf\u01d0\7q\2\2\u01d0\u01d1\7t\2\2\u01d1"+ "\u01cd\7g\2\2\u01cd\u01ce\7o\2\2\u01ce\u01cf\7g\2\2\u01cf\u01d0\7p\2\2"+
"\u01d2\7v\2\2\u01d2\64\3\2\2\2\u01d3\u01d4\7k\2\2\u01d4\u01d5\7p\2\2\u01d5"+ "\u01d0\u01d1\7v\2\2\u01d1\u01d2\7u\2\2\u01d2\64\3\2\2\2\u01d3\u01d4\7"+
"\u01d6\7u\2\2\u01d6\u01d7\7v\2\2\u01d7\u01d8\7c\2\2\u01d8\u01d9\7p\2\2"+ "k\2\2\u01d4\u01d5\7o\2\2\u01d5\u01d6\7r\2\2\u01d6\u01d7\7q\2\2\u01d7\u01d8"+
"\u01d9\u01da\7e\2\2\u01da\u01db\7g\2\2\u01db\u01dc\7q\2\2\u01dc\u01dd"+ "\7t\2\2\u01d8\u01d9\7v\2\2\u01d9\66\3\2\2\2\u01da\u01db\7k\2\2\u01db\u01dc"+
"\7h\2\2\u01dd\66\3\2\2\2\u01de\u01df\7k\2\2\u01df\u01e0\7p\2\2\u01e0\u01e1"+ "\7p\2\2\u01dc\u01dd\7u\2\2\u01dd\u01de\7v\2\2\u01de\u01df\7c\2\2\u01df"+
"\7v\2\2\u01e18\3\2\2\2\u01e2\u01e3\7k\2\2\u01e3\u01e4\7p\2\2\u01e4\u01e5"+ "\u01e0\7p\2\2\u01e0\u01e1\7e\2\2\u01e1\u01e2\7g\2\2\u01e2\u01e3\7q\2\2"+
"\7v\2\2\u01e5\u01e6\7g\2\2\u01e6\u01e7\7t\2\2\u01e7\u01e8\7h\2\2\u01e8"+ "\u01e3\u01e4\7h\2\2\u01e48\3\2\2\2\u01e5\u01e6\7k\2\2\u01e6\u01e7\7p\2"+
"\u01e9\7c\2\2\u01e9\u01ea\7e\2\2\u01ea\u01eb\7g\2\2\u01eb:\3\2\2\2\u01ec"+ "\2\u01e7\u01e8\7v\2\2\u01e8:\3\2\2\2\u01e9\u01ea\7k\2\2\u01ea\u01eb\7"+
"\u01ed\7n\2\2\u01ed\u01ee\7q\2\2\u01ee\u01ef\7p\2\2\u01ef\u01f0\7i\2\2"+ "p\2\2\u01eb\u01ec\7v\2\2\u01ec\u01ed\7g\2\2\u01ed\u01ee\7t\2\2\u01ee\u01ef"+
"\u01f0<\3\2\2\2\u01f1\u01f2\7p\2\2\u01f2\u01f3\7c\2\2\u01f3\u01f4\7v\2"+ "\7h\2\2\u01ef\u01f0\7c\2\2\u01f0\u01f1\7e\2\2\u01f1\u01f2\7g\2\2\u01f2"+
"\2\u01f4\u01f5\7k\2\2\u01f5\u01f6\7x\2\2\u01f6\u01f7\7g\2\2\u01f7>\3\2"+ "<\3\2\2\2\u01f3\u01f4\7n\2\2\u01f4\u01f5\7q\2\2\u01f5\u01f6\7p\2\2\u01f6"+
"\2\2\u01f8\u01f9\7p\2\2\u01f9\u01fa\7g\2\2\u01fa\u01fb\7y\2\2\u01fb@\3"+ "\u01f7\7i\2\2\u01f7>\3\2\2\2\u01f8\u01f9\7p\2\2\u01f9\u01fa\7c\2\2\u01fa"+
"\2\2\2\u01fc\u01fd\7r\2\2\u01fd\u01fe\7c\2\2\u01fe\u01ff\7e\2\2\u01ff"+ "\u01fb\7v\2\2\u01fb\u01fc\7k\2\2\u01fc\u01fd\7x\2\2\u01fd\u01fe\7g\2\2"+
"\u0200\7m\2\2\u0200\u0201\7c\2\2\u0201\u0202\7i\2\2\u0202\u0203\7g\2\2"+ "\u01fe@\3\2\2\2\u01ff\u0200\7p\2\2\u0200\u0201\7g\2\2\u0201\u0202\7y\2"+
"\u0203B\3\2\2\2\u0204\u0205\7r\2\2\u0205\u0206\7t\2\2\u0206\u0207\7k\2"+ "\2\u0202B\3\2\2\2\u0203\u0204\7r\2\2\u0204\u0205\7c\2\2\u0205\u0206\7"+
"\2\u0207\u0208\7x\2\2\u0208\u0209\7c\2\2\u0209\u020a\7v\2\2\u020a\u020b"+ "e\2\2\u0206\u0207\7m\2\2\u0207\u0208\7c\2\2\u0208\u0209\7i\2\2\u0209\u020a"+
"\7g\2\2\u020bD\3\2\2\2\u020c\u020d\7r\2\2\u020d\u020e\7t\2\2\u020e\u020f"+ "\7g\2\2\u020aD\3\2\2\2\u020b\u020c\7r\2\2\u020c\u020d\7t\2\2\u020d\u020e"+
"\7q\2\2\u020f\u0210\7v\2\2\u0210\u0211\7g\2\2\u0211\u0212\7e\2\2\u0212"+ "\7k\2\2\u020e\u020f\7x\2\2\u020f\u0210\7c\2\2\u0210\u0211\7v\2\2\u0211"+
"\u0213\7v\2\2\u0213\u0214\7g\2\2\u0214\u0215\7f\2\2\u0215F\3\2\2\2\u0216"+ "\u0212\7g\2\2\u0212F\3\2\2\2\u0213\u0214\7r\2\2\u0214\u0215\7t\2\2\u0215"+
"\u0217\7r\2\2\u0217\u0218\7w\2\2\u0218\u0219\7d\2\2\u0219\u021a\7n\2\2"+ "\u0216\7q\2\2\u0216\u0217\7v\2\2\u0217\u0218\7g\2\2\u0218\u0219\7e\2\2"+
"\u021a\u021b\7k\2\2\u021b\u021c\7e\2\2\u021cH\3\2\2\2\u021d\u021e\7t\2"+ "\u0219\u021a\7v\2\2\u021a\u021b\7g\2\2\u021b\u021c\7f\2\2\u021cH\3\2\2"+
"\2\u021e\u021f\7g\2\2\u021f\u0220\7v\2\2\u0220\u0221\7w\2\2\u0221\u0222"+ "\2\u021d\u021e\7r\2\2\u021e\u021f\7w\2\2\u021f\u0220\7d\2\2\u0220\u0221"+
"\7t\2\2\u0222\u0223\7p\2\2\u0223J\3\2\2\2\u0224\u0225\7u\2\2\u0225\u0226"+ "\7n\2\2\u0221\u0222\7k\2\2\u0222\u0223\7e\2\2\u0223J\3\2\2\2\u0224\u0225"+
"\7j\2\2\u0226\u0227\7q\2\2\u0227\u0228\7t\2\2\u0228\u0229\7v\2\2\u0229"+ "\7t\2\2\u0225\u0226\7g\2\2\u0226\u0227\7v\2\2\u0227\u0228\7w\2\2\u0228"+
"L\3\2\2\2\u022a\u022b\7u\2\2\u022b\u022c\7v\2\2\u022c\u022d\7c\2\2\u022d"+ "\u0229\7t\2\2\u0229\u022a\7p\2\2\u022aL\3\2\2\2\u022b\u022c\7u\2\2\u022c"+
"\u022e\7v\2\2\u022e\u022f\7k\2\2\u022f\u0230\7e\2\2\u0230N\3\2\2\2\u0231"+ "\u022d\7j\2\2\u022d\u022e\7q\2\2\u022e\u022f\7t\2\2\u022f\u0230\7v\2\2"+
"\u0232\7u\2\2\u0232\u0233\7v\2\2\u0233\u0234\7t\2\2\u0234\u0235\7k\2\2"+ "\u0230N\3\2\2\2\u0231\u0232\7u\2\2\u0232\u0233\7v\2\2\u0233\u0234\7c\2"+
"\u0235\u0236\7e\2\2\u0236\u0237\7v\2\2\u0237\u0238\7h\2\2\u0238\u0239"+ "\2\u0234\u0235\7v\2\2\u0235\u0236\7k\2\2\u0236\u0237\7e\2\2\u0237P\3\2"+
"\7r\2\2\u0239P\3\2\2\2\u023a\u023b\7u\2\2\u023b\u023c\7w\2\2\u023c\u023d"+ "\2\2\u0238\u0239\7u\2\2\u0239\u023a\7v\2\2\u023a\u023b\7t\2\2\u023b\u023c"+
"\7r\2\2\u023d\u023e\7g\2\2\u023e\u023f\7t\2\2\u023fR\3\2\2\2\u0240\u0241"+ "\7k\2\2\u023c\u023d\7e\2\2\u023d\u023e\7v\2\2\u023e\u023f\7h\2\2\u023f"+
"\7u\2\2\u0241\u0242\7y\2\2\u0242\u0243\7k\2\2\u0243\u0244\7v\2\2\u0244"+ "\u0240\7r\2\2\u0240R\3\2\2\2\u0241\u0242\7u\2\2\u0242\u0243\7w\2\2\u0243"+
"\u0245\7e\2\2\u0245\u0246\7j\2\2\u0246T\3\2\2\2\u0247\u0248\7u\2\2\u0248"+ "\u0244\7r\2\2\u0244\u0245\7g\2\2\u0245\u0246\7t\2\2\u0246T\3\2\2\2\u0247"+
"\u0249\7{\2\2\u0249\u024a\7p\2\2\u024a\u024b\7e\2\2\u024b\u024c\7j\2\2"+ "\u0248\7u\2\2\u0248\u0249\7y\2\2\u0249\u024a\7k\2\2\u024a\u024b\7v\2\2"+
"\u024c\u024d\7t\2\2\u024d\u024e\7q\2\2\u024e\u024f\7p\2\2\u024f\u0250"+ "\u024b\u024c\7e\2\2\u024c\u024d\7j\2\2\u024dV\3\2\2\2\u024e\u024f\7u\2"+
"\7k\2\2\u0250\u0251\7|\2\2\u0251\u0252\7g\2\2\u0252\u0253\7f\2\2\u0253"+ "\2\u024f\u0250\7{\2\2\u0250\u0251\7p\2\2\u0251\u0252\7e\2\2\u0252\u0253"+
"V\3\2\2\2\u0254\u0255\7v\2\2\u0255\u0256\7j\2\2\u0256\u0257\7k\2\2\u0257"+ "\7j\2\2\u0253\u0254\7t\2\2\u0254\u0255\7q\2\2\u0255\u0256\7p\2\2\u0256"+
"\u0258\7u\2\2\u0258X\3\2\2\2\u0259\u025a\7v\2\2\u025a\u025b\7j\2\2\u025b"+ "\u0257\7k\2\2\u0257\u0258\7|\2\2\u0258\u0259\7g\2\2\u0259\u025a\7f\2\2"+
"\u025c\7t\2\2\u025c\u025d\7q\2\2\u025d\u025e\7y\2\2\u025eZ\3\2\2\2\u025f"+ "\u025aX\3\2\2\2\u025b\u025c\7v\2\2\u025c\u025d\7j\2\2\u025d\u025e\7k\2"+
"\u0260\7v\2\2\u0260\u0261\7j\2\2\u0261\u0262\7t\2\2\u0262\u0263\7q\2\2"+ "\2\u025e\u025f\7u\2\2\u025fZ\3\2\2\2\u0260\u0261\7v\2\2\u0261\u0262\7"+
"\u0263\u0264\7y\2\2\u0264\u0265\7u\2\2\u0265\\\3\2\2\2\u0266\u0267\7v"+ "j\2\2\u0262\u0263\7t\2\2\u0263\u0264\7q\2\2\u0264\u0265\7y\2\2\u0265\\"+
"\2\2\u0267\u0268\7t\2\2\u0268\u0269\7c\2\2\u0269\u026a\7p\2\2\u026a\u026b"+ "\3\2\2\2\u0266\u0267\7v\2\2\u0267\u0268\7j\2\2\u0268\u0269\7t\2\2\u0269"+
"\7u\2\2\u026b\u026c\7k\2\2\u026c\u026d\7g\2\2\u026d\u026e\7p\2\2\u026e"+ "\u026a\7q\2\2\u026a\u026b\7y\2\2\u026b\u026c\7u\2\2\u026c^\3\2\2\2\u026d"+
"\u026f\7v\2\2\u026f^\3\2\2\2\u0270\u0271\7v\2\2\u0271\u0272\7t\2\2\u0272"+ "\u026e\7v\2\2\u026e\u026f\7t\2\2\u026f\u0270\7c\2\2\u0270\u0271\7p\2\2"+
"\u0273\7{\2\2\u0273`\3\2\2\2\u0274\u0275\7x\2\2\u0275\u0276\7q\2\2\u0276"+ "\u0271\u0272\7u\2\2\u0272\u0273\7k\2\2\u0273\u0274\7g\2\2\u0274\u0275"+
"\u0277\7k\2\2\u0277\u0278\7f\2\2\u0278b\3\2\2\2\u0279\u027a\7x\2\2\u027a"+ "\7p\2\2\u0275\u0276\7v\2\2\u0276`\3\2\2\2\u0277\u0278\7v\2\2\u0278\u0279"+
"\u027b\7q\2\2\u027b\u027c\7n\2\2\u027c\u027d\7c\2\2\u027d\u027e\7v\2\2"+ "\7t\2\2\u0279\u027a\7{\2\2\u027ab\3\2\2\2\u027b\u027c\7x\2\2\u027c\u027d"+
"\u027e\u027f\7k\2\2\u027f\u0280\7n\2\2\u0280\u0281\7g\2\2\u0281d\3\2\2"+ "\7q\2\2\u027d\u027e\7k\2\2\u027e\u027f\7f\2\2\u027fd\3\2\2\2\u0280\u0281"+
"\2\u0282\u0283\7y\2\2\u0283\u0284\7j\2\2\u0284\u0285\7k\2\2\u0285\u0286"+ "\7x\2\2\u0281\u0282\7q\2\2\u0282\u0283\7n\2\2\u0283\u0284\7c\2\2\u0284"+
"\7n\2\2\u0286\u0287\7g\2\2\u0287f\3\2\2\2\u0288\u028d\5i\65\2\u0289\u028d"+ "\u0285\7v\2\2\u0285\u0286\7k\2\2\u0286\u0287\7n\2\2\u0287\u0288\7g\2\2"+
"\5k\66\2\u028a\u028d\5m\67\2\u028b\u028d\5o8\2\u028c\u0288\3\2\2\2\u028c"+ "\u0288f\3\2\2\2\u0289\u028a\7y\2\2\u028a\u028b\7j\2\2\u028b\u028c\7k\2"+
"\u0289\3\2\2\2\u028c\u028a\3\2\2\2\u028c\u028b\3\2\2\2\u028dh\3\2\2\2"+ "\2\u028c\u028d\7n\2\2\u028d\u028e\7g\2\2\u028eh\3\2\2\2\u028f\u0294\5"+
"\u028e\u0290\5s:\2\u028f\u0291\5q9\2\u0290\u028f\3\2\2\2\u0290\u0291\3"+ "k\66\2\u0290\u0294\5m\67\2\u0291\u0294\5o8\2\u0292\u0294\5q9\2\u0293\u028f"+
"\2\2\2\u0291j\3\2\2\2\u0292\u0294\5\u0081A\2\u0293\u0295\5q9\2\u0294\u0293"+ "\3\2\2\2\u0293\u0290\3\2\2\2\u0293\u0291\3\2\2\2\u0293\u0292\3\2\2\2\u0294"+
"\3\2\2\2\u0294\u0295\3\2\2\2\u0295l\3\2\2\2\u0296\u0298\5\u008bF\2\u0297"+ "j\3\2\2\2\u0295\u0297\5u;\2\u0296\u0298\5s:\2\u0297\u0296\3\2\2\2\u0297"+
"\u0299\5q9\2\u0298\u0297\3\2\2\2\u0298\u0299\3\2\2\2\u0299n\3\2\2\2\u029a"+ "\u0298\3\2\2\2\u0298l\3\2\2\2\u0299\u029b\5\u0083B\2\u029a\u029c\5s:\2"+
"\u029c\5\u0095K\2\u029b\u029d\5q9\2\u029c\u029b\3\2\2\2\u029c\u029d\3"+ "\u029b\u029a\3\2\2\2\u029b\u029c\3\2\2\2\u029cn\3\2\2\2\u029d\u029f\5"+
"\2\2\2\u029dp\3\2\2\2\u029e\u029f\t\2\2\2\u029fr\3\2\2\2\u02a0\u02ab\7"+ "\u008dG\2\u029e\u02a0\5s:\2\u029f\u029e\3\2\2\2\u029f\u02a0\3\2\2\2\u02a0"+
"\62\2\2\u02a1\u02a8\5y=\2\u02a2\u02a4\5u;\2\u02a3\u02a2\3\2\2\2\u02a3"+ "p\3\2\2\2\u02a1\u02a3\5\u0097L\2\u02a2\u02a4\5s:\2\u02a3\u02a2\3\2\2\2"+
"\u02a4\3\2\2\2\u02a4\u02a9\3\2\2\2\u02a5\u02a6\5\177@\2\u02a6\u02a7\5"+ "\u02a3\u02a4\3\2\2\2\u02a4r\3\2\2\2\u02a5\u02a6\t\2\2\2\u02a6t\3\2\2\2"+
"u;\2\u02a7\u02a9\3\2\2\2\u02a8\u02a3\3\2\2\2\u02a8\u02a5\3\2\2\2\u02a9"+ "\u02a7\u02b2\7\62\2\2\u02a8\u02af\5{>\2\u02a9\u02ab\5w<\2\u02aa\u02a9"+
"\u02ab\3\2\2\2\u02aa\u02a0\3\2\2\2\u02aa\u02a1\3\2\2\2\u02abt\3\2\2\2"+ "\3\2\2\2\u02aa\u02ab\3\2\2\2\u02ab\u02b0\3\2\2\2\u02ac\u02ad\5\u0081A"+
"\u02ac\u02b1\5w<\2\u02ad\u02af\5{>\2\u02ae\u02ad\3\2\2\2\u02ae\u02af\3"+ "\2\u02ad\u02ae\5w<\2\u02ae\u02b0\3\2\2\2\u02af\u02aa\3\2\2\2\u02af\u02ac"+
"\2\2\2\u02af\u02b0\3\2\2\2\u02b0\u02b2\5w<\2\u02b1\u02ae\3\2\2\2\u02b1"+ "\3\2\2\2\u02b0\u02b2\3\2\2\2\u02b1\u02a7\3\2\2\2\u02b1\u02a8\3\2\2\2\u02b2"+
"\u02b2\3\2\2\2\u02b2v\3\2\2\2\u02b3\u02b6\7\62\2\2\u02b4\u02b6\5y=\2\u02b5"+ "v\3\2\2\2\u02b3\u02b8\5y=\2\u02b4\u02b6\5}?\2\u02b5\u02b4\3\2\2\2\u02b5"+
"\u02b3\3\2\2\2\u02b5\u02b4\3\2\2\2\u02b6x\3\2\2\2\u02b7\u02b8\t\3\2\2"+ "\u02b6\3\2\2\2\u02b6\u02b7\3\2\2\2\u02b7\u02b9\5y=\2\u02b8\u02b5\3\2\2"+
"\u02b8z\3\2\2\2\u02b9\u02bb\5}?\2\u02ba\u02b9\3\2\2\2\u02bb\u02bc\3\2"+ "\2\u02b8\u02b9\3\2\2\2\u02b9x\3\2\2\2\u02ba\u02bd\7\62\2\2\u02bb\u02bd"+
"\2\2\u02bc\u02ba\3\2\2\2\u02bc\u02bd\3\2\2\2\u02bd|\3\2\2\2\u02be\u02c1"+ "\5{>\2\u02bc\u02ba\3\2\2\2\u02bc\u02bb\3\2\2\2\u02bdz\3\2\2\2\u02be\u02bf"+
"\5w<\2\u02bf\u02c1\7a\2\2\u02c0\u02be\3\2\2\2\u02c0\u02bf\3\2\2\2\u02c1"+ "\t\3\2\2\u02bf|\3\2\2\2\u02c0\u02c2\5\177@\2\u02c1\u02c0\3\2\2\2\u02c2"+
"~\3\2\2\2\u02c2\u02c4\7a\2\2\u02c3\u02c2\3\2\2\2\u02c4\u02c5\3\2\2\2\u02c5"+ "\u02c3\3\2\2\2\u02c3\u02c1\3\2\2\2\u02c3\u02c4\3\2\2\2\u02c4~\3\2\2\2"+
"\u02c3\3\2\2\2\u02c5\u02c6\3\2\2\2\u02c6\u0080\3\2\2\2\u02c7\u02c8\7\62"+ "\u02c5\u02c8\5y=\2\u02c6\u02c8\7a\2\2\u02c7\u02c5\3\2\2\2\u02c7\u02c6"+
"\2\2\u02c8\u02c9\t\4\2\2\u02c9\u02ca\5\u0083B\2\u02ca\u0082\3\2\2\2\u02cb"+ "\3\2\2\2\u02c8\u0080\3\2\2\2\u02c9\u02cb\7a\2\2\u02ca\u02c9\3\2\2\2\u02cb"+
"\u02d0\5\u0085C\2\u02cc\u02ce\5\u0087D\2\u02cd\u02cc\3\2\2\2\u02cd\u02ce"+ "\u02cc\3\2\2\2\u02cc\u02ca\3\2\2\2\u02cc\u02cd\3\2\2\2\u02cd\u0082\3\2"+
"\3\2\2\2\u02ce\u02cf\3\2\2\2\u02cf\u02d1\5\u0085C\2\u02d0\u02cd\3\2\2"+ "\2\2\u02ce\u02cf\7\62\2\2\u02cf\u02d0\t\4\2\2\u02d0\u02d1\5\u0085C\2\u02d1"+
"\2\u02d0\u02d1\3\2\2\2\u02d1\u0084\3\2\2\2\u02d2\u02d3\t\5\2\2\u02d3\u0086"+ "\u0084\3\2\2\2\u02d2\u02d7\5\u0087D\2\u02d3\u02d5\5\u0089E\2\u02d4\u02d3"+
"\3\2\2\2\u02d4\u02d6\5\u0089E\2\u02d5\u02d4\3\2\2\2\u02d6\u02d7\3\2\2"+ "\3\2\2\2\u02d4\u02d5\3\2\2\2\u02d5\u02d6\3\2\2\2\u02d6\u02d8\5\u0087D"+
"\2\u02d7\u02d5\3\2\2\2\u02d7\u02d8\3\2\2\2\u02d8\u0088\3\2\2\2\u02d9\u02dc"+ "\2\u02d7\u02d4\3\2\2\2\u02d7\u02d8\3\2\2\2\u02d8\u0086\3\2\2\2\u02d9\u02da"+
"\5\u0085C\2\u02da\u02dc\7a\2\2\u02db\u02d9\3\2\2\2\u02db\u02da\3\2\2\2"+ "\t\5\2\2\u02da\u0088\3\2\2\2\u02db\u02dd\5\u008bF\2\u02dc\u02db\3\2\2"+
"\u02dc\u008a\3\2\2\2\u02dd\u02df\7\62\2\2\u02de\u02e0\5\177@\2\u02df\u02de"+ "\2\u02dd\u02de\3\2\2\2\u02de\u02dc\3\2\2\2\u02de\u02df\3\2\2\2\u02df\u008a"+
"\3\2\2\2\u02df\u02e0\3\2\2\2\u02e0\u02e1\3\2\2\2\u02e1\u02e2\5\u008dG"+ "\3\2\2\2\u02e0\u02e3\5\u0087D\2\u02e1\u02e3\7a\2\2\u02e2\u02e0\3\2\2\2"+
"\2\u02e2\u008c\3\2\2\2\u02e3\u02e8\5\u008fH\2\u02e4\u02e6\5\u0091I\2\u02e5"+ "\u02e2\u02e1\3\2\2\2\u02e3\u008c\3\2\2\2\u02e4\u02e6\7\62\2\2\u02e5\u02e7"+
"\u02e4\3\2\2\2\u02e5\u02e6\3\2\2\2\u02e6\u02e7\3\2\2\2\u02e7\u02e9\5\u008f"+ "\5\u0081A\2\u02e6\u02e5\3\2\2\2\u02e6\u02e7\3\2\2\2\u02e7\u02e8\3\2\2"+
"H\2\u02e8\u02e5\3\2\2\2\u02e8\u02e9\3\2\2\2\u02e9\u008e\3\2\2\2\u02ea"+ "\2\u02e8\u02e9\5\u008fH\2\u02e9\u008e\3\2\2\2\u02ea\u02ef\5\u0091I\2\u02eb"+
"\u02eb\t\6\2\2\u02eb\u0090\3\2\2\2\u02ec\u02ee\5\u0093J\2\u02ed\u02ec"+ "\u02ed\5\u0093J\2\u02ec\u02eb\3\2\2\2\u02ec\u02ed\3\2\2\2\u02ed\u02ee"+
"\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\u02ee\u02f0\5\u0091I\2\u02ef\u02ec\3\2\2\2\u02ef\u02f0\3\2\2"+
"\u0092\3\2\2\2\u02f1\u02f4\5\u008fH\2\u02f2\u02f4\7a\2\2\u02f3\u02f1\3"+ "\2\u02f0\u0090\3\2\2\2\u02f1\u02f2\t\6\2\2\u02f2\u0092\3\2\2\2\u02f3\u02f5"+
"\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\u02f4\u02f3\3\2\2\2\u02f5\u02f6\3\2\2\2\u02f6\u02f4\3\2\2"+
"\u02f7\t\7\2\2\u02f7\u02f8\5\u0097L\2\u02f8\u0096\3\2\2\2\u02f9\u02fe"+ "\2\u02f6\u02f7\3\2\2\2\u02f7\u0094\3\2\2\2\u02f8\u02fb\5\u0091I\2\u02f9"+
"\5\u0099M\2\u02fa\u02fc\5\u009bN\2\u02fb\u02fa\3\2\2\2\u02fb\u02fc\3\2"+ "\u02fb\7a\2\2\u02fa\u02f8\3\2\2\2\u02fa\u02f9\3\2\2\2\u02fb\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\u02fc\u02fd\7\62\2\2\u02fd\u02fe\t\7\2\2\u02fe\u02ff\5\u0099M\2\u02ff"+
"\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\u0300\u0305\5\u009bN\2\u0301\u0303\5\u009dO\2\u0302\u0301"+
"\2\2\u0302\u0304\5\u009dO\2\u0303\u0302\3\2\2\2\u0304\u0305\3\2\2\2\u0305"+ "\3\2\2\2\u0302\u0303\3\2\2\2\u0303\u0304\3\2\2\2\u0304\u0306\5\u009bN"+
"\u0303\3\2\2\2\u0305\u0306\3\2\2\2\u0306\u009c\3\2\2\2\u0307\u030a\5\u0099"+ "\2\u0305\u0302\3\2\2\2\u0305\u0306\3\2\2\2\u0306\u009a\3\2\2\2\u0307\u0308"+
"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\u0308\u009c\3\2\2\2\u0309\u030b\5\u009fP\2\u030a\u0309\3\2\2"+
"\3\2\2\2\u030b\u030e\5\u00a1Q\2\u030c\u030e\5\u00adW\2\u030d\u030b\3\2"+ "\2\u030b\u030c\3\2\2\2\u030c\u030a\3\2\2\2\u030c\u030d\3\2\2\2\u030d\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\u030e\u0311\5\u009bN\2\u030f\u0311\7a\2\2\u0310\u030e\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"+ "\u0310\u030f\3\2\2\2\u0311\u00a0\3\2\2\2\u0312\u0315\5\u00a3R\2\u0313"+
"\u0315\3\2\2\2\u0314\u0316\5\u00a3R\2\u0315\u0314\3\2\2\2\u0315\u0316"+ "\u0315\5\u00afX\2\u0314\u0312\3\2\2\2\u0314\u0313\3\2\2\2\u0315\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\u0316\u0317\5w<\2\u0317\u0319\7\60\2\2\u0318\u031a\5w<\2\u0319"+
"\2\u0318\u0319\3\2\2\2\u0319\u032b\3\2\2\2\u031a\u031b\7\60\2\2\u031b"+ "\u0318\3\2\2\2\u0319\u031a\3\2\2\2\u031a\u031c\3\2\2\2\u031b\u031d\5\u00a5"+
"\u031d\5u;\2\u031c\u031e\5\u00a3R\2\u031d\u031c\3\2\2\2\u031d\u031e\3"+ "S\2\u031c\u031b\3\2\2\2\u031c\u031d\3\2\2\2\u031d\u031f\3\2\2\2\u031e"+
"\2\2\2\u031e\u0320\3\2\2\2\u031f\u0321\5\u00abV\2\u0320\u031f\3\2\2\2"+ "\u0320\5\u00adW\2\u031f\u031e\3\2\2\2\u031f\u0320\3\2\2\2\u0320\u0332"+
"\u0320\u0321\3\2\2\2\u0321\u032b\3\2\2\2\u0322\u0323\5u;\2\u0323\u0325"+ "\3\2\2\2\u0321\u0322\7\60\2\2\u0322\u0324\5w<\2\u0323\u0325\5\u00a5S\2"+
"\5\u00a3R\2\u0324\u0326\5\u00abV\2\u0325\u0324\3\2\2\2\u0325\u0326\3\2"+ "\u0324\u0323\3\2\2\2\u0324\u0325\3\2\2\2\u0325\u0327\3\2\2\2\u0326\u0328"+
"\2\2\u0326\u032b\3\2\2\2\u0327\u0328\5u;\2\u0328\u0329\5\u00abV\2\u0329"+ "\5\u00adW\2\u0327\u0326\3\2\2\2\u0327\u0328\3\2\2\2\u0328\u0332\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\u0329\u032a\5w<\2\u032a\u032c\5\u00a5S\2\u032b\u032d\5\u00adW\2\u032c"+
"\2\2\u032a\u0327\3\2\2\2\u032b\u00a2\3\2\2\2\u032c\u032d\5\u00a5S\2\u032d"+ "\u032b\3\2\2\2\u032c\u032d\3\2\2\2\u032d\u0332\3\2\2\2\u032e\u032f\5w"+
"\u032e\5\u00a7T\2\u032e\u00a4\3\2\2\2\u032f\u0330\t\t\2\2\u0330\u00a6"+ "<\2\u032f\u0330\5\u00adW\2\u0330\u0332\3\2\2\2\u0331\u0316\3\2\2\2\u0331"+
"\3\2\2\2\u0331\u0333\5\u00a9U\2\u0332\u0331\3\2\2\2\u0332\u0333\3\2\2"+ "\u0321\3\2\2\2\u0331\u0329\3\2\2\2\u0331\u032e\3\2\2\2\u0332\u00a4\3\2"+
"\2\u0333\u0334\3\2\2\2\u0334\u0335\5u;\2\u0335\u00a8\3\2\2\2\u0336\u0337"+ "\2\2\u0333\u0334\5\u00a7T\2\u0334\u0335\5\u00a9U\2\u0335\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"+ "\u0336\u0337\t\t\2\2\u0337\u00a8\3\2\2\2\u0338\u033a\5\u00abV\2\u0339"+
"\u033a\u033b\5\u00afX\2\u033b\u033d\5\u00b1Y\2\u033c\u033e\5\u00abV\2"+ "\u0338\3\2\2\2\u0339\u033a\3\2\2\2\u033a\u033b\3\2\2\2\u033b\u033c\5w"+
"\u033d\u033c\3\2\2\2\u033d\u033e\3\2\2\2\u033e\u00ae\3\2\2\2\u033f\u0341"+ "<\2\u033c\u00aa\3\2\2\2\u033d\u033e\t\n\2\2\u033e\u00ac\3\2\2\2\u033f"+
"\5\u0081A\2\u0340\u0342\7\60\2\2\u0341\u0340\3\2\2\2\u0341\u0342\3\2\2"+ "\u0340\t\13\2\2\u0340\u00ae\3\2\2\2\u0341\u0342\5\u00b1Y\2\u0342\u0344"+
"\2\u0342\u034b\3\2\2\2\u0343\u0344\7\62\2\2\u0344\u0346\t\4\2\2\u0345"+ "\5\u00b3Z\2\u0343\u0345\5\u00adW\2\u0344\u0343\3\2\2\2\u0344\u0345\3\2"+
"\u0347\5\u0083B\2\u0346\u0345\3\2\2\2\u0346\u0347\3\2\2\2\u0347\u0348"+ "\2\2\u0345\u00b0\3\2\2\2\u0346\u0348\5\u0083B\2\u0347\u0349\7\60\2\2\u0348"+
"\3\2\2\2\u0348\u0349\7\60\2\2\u0349\u034b\5\u0083B\2\u034a\u033f\3\2\2"+ "\u0347\3\2\2\2\u0348\u0349\3\2\2\2\u0349\u0352\3\2\2\2\u034a\u034b\7\62"+
"\2\u034a\u0343\3\2\2\2\u034b\u00b0\3\2\2\2\u034c\u034d\5\u00b3Z\2\u034d"+ "\2\2\u034b\u034d\t\4\2\2\u034c\u034e\5\u0085C\2\u034d\u034c\3\2\2\2\u034d"+
"\u034e\5\u00a7T\2\u034e\u00b2\3\2\2\2\u034f\u0350\t\f\2\2\u0350\u00b4"+ "\u034e\3\2\2\2\u034e\u034f\3\2\2\2\u034f\u0350\7\60\2\2\u0350\u0352\5"+
"\3\2\2\2\u0351\u0352\7v\2\2\u0352\u0353\7t\2\2\u0353\u0354\7w\2\2\u0354"+ "\u0085C\2\u0351\u0346\3\2\2\2\u0351\u034a\3\2\2\2\u0352\u00b2\3\2\2\2"+
"\u035b\7g\2\2\u0355\u0356\7h\2\2\u0356\u0357\7c\2\2\u0357\u0358\7n\2\2"+ "\u0353\u0354\5\u00b5[\2\u0354\u0355\5\u00a9U\2\u0355\u00b4\3\2\2\2\u0356"+
"\u0358\u0359\7u\2\2\u0359\u035b\7g\2\2\u035a\u0351\3\2\2\2\u035a\u0355"+ "\u0357\t\f\2\2\u0357\u00b6\3\2\2\2\u0358\u0359\7v\2\2\u0359\u035a\7t\2"+
"\3\2\2\2\u035b\u00b6\3\2\2\2\u035c\u035d\7)\2\2\u035d\u035e\5\u00b9]\2"+ "\2\u035a\u035b\7w\2\2\u035b\u0362\7g\2\2\u035c\u035d\7h\2\2\u035d\u035e"+
"\u035e\u035f\7)\2\2\u035f\u0365\3\2\2\2\u0360\u0361\7)\2\2\u0361\u0362"+ "\7c\2\2\u035e\u035f\7n\2\2\u035f\u0360\7u\2\2\u0360\u0362\7g\2\2\u0361"+
"\5\u00c1a\2\u0362\u0363\7)\2\2\u0363\u0365\3\2\2\2\u0364\u035c\3\2\2\2"+ "\u0358\3\2\2\2\u0361\u035c\3\2\2\2\u0362\u00b8\3\2\2\2\u0363\u0364\7)"+
"\u0364\u0360\3\2\2\2\u0365\u00b8\3\2\2\2\u0366\u0367\n\r\2\2\u0367\u00ba"+ "\2\2\u0364\u0365\5\u00bb^\2\u0365\u0366\7)\2\2\u0366\u036c\3\2\2\2\u0367"+
"\3\2\2\2\u0368\u036a\7$\2\2\u0369\u036b\5\u00bd_\2\u036a\u0369\3\2\2\2"+ "\u0368\7)\2\2\u0368\u0369\5\u00c3b\2\u0369\u036a\7)\2\2\u036a\u036c\3"+
"\u036a\u036b\3\2\2\2\u036b\u036c\3\2\2\2\u036c\u036d\7$\2\2\u036d\u00bc"+ "\2\2\2\u036b\u0363\3\2\2\2\u036b\u0367\3\2\2\2\u036c\u00ba\3\2\2\2\u036d"+
"\3\2\2\2\u036e\u0370\5\u00bf`\2\u036f\u036e\3\2\2\2\u0370\u0371\3\2\2"+ "\u036e\n\r\2\2\u036e\u00bc\3\2\2\2\u036f\u0371\7$\2\2\u0370\u0372\5\u00bf"+
"\2\u0371\u036f\3\2\2\2\u0371\u0372\3\2\2\2\u0372\u00be\3\2\2\2\u0373\u0376"+ "`\2\u0371\u0370\3\2\2\2\u0371\u0372\3\2\2\2\u0372\u0373\3\2\2\2\u0373"+
"\n\16\2\2\u0374\u0376\5\u00c1a\2\u0375\u0373\3\2\2\2\u0375\u0374\3\2\2"+ "\u0374\7$\2\2\u0374\u00be\3\2\2\2\u0375\u0377\5\u00c1a\2\u0376\u0375\3"+
"\2\u0376\u00c0\3\2\2\2\u0377\u0378\7^\2\2\u0378\u037c\t\17\2\2\u0379\u037c"+ "\2\2\2\u0377\u0378\3\2\2\2\u0378\u0376\3\2\2\2\u0378\u0379\3\2\2\2\u0379"+
"\5\u00c3b\2\u037a\u037c\5\u00c7d\2\u037b\u0377\3\2\2\2\u037b\u0379\3\2"+ "\u00c0\3\2\2\2\u037a\u037d\n\16\2\2\u037b\u037d\5\u00c3b\2\u037c\u037a"+
"\2\2\u037b\u037a\3\2\2\2\u037c\u00c2\3\2\2\2\u037d\u037e\7^\2\2\u037e"+ "\3\2\2\2\u037c\u037b\3\2\2\2\u037d\u00c2\3\2\2\2\u037e\u037f\7^\2\2\u037f"+
"\u0389\5\u008fH\2\u037f\u0380\7^\2\2\u0380\u0381\5\u008fH\2\u0381\u0382"+ "\u0383\t\17\2\2\u0380\u0383\5\u00c5c\2\u0381\u0383\5\u00c9e\2\u0382\u037e"+
"\5\u008fH\2\u0382\u0389\3\2\2\2\u0383\u0384\7^\2\2\u0384\u0385\5\u00c5"+ "\3\2\2\2\u0382\u0380\3\2\2\2\u0382\u0381\3\2\2\2\u0383\u00c4\3\2\2\2\u0384"+
"c\2\u0385\u0386\5\u008fH\2\u0386\u0387\5\u008fH\2\u0387\u0389\3\2\2\2"+ "\u0385\7^\2\2\u0385\u0390\5\u0091I\2\u0386\u0387\7^\2\2\u0387\u0388\5"+
"\u0388\u037d\3\2\2\2\u0388\u037f\3\2\2\2\u0388\u0383\3\2\2\2\u0389\u00c4"+ "\u0091I\2\u0388\u0389\5\u0091I\2\u0389\u0390\3\2\2\2\u038a\u038b\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\u038b\u038c\5\u00c7d\2\u038c\u038d\5\u0091I\2\u038d\u038e\5\u0091I"+
"\u038e\7w\2\2\u038e\u038f\5\u0085C\2\u038f\u0390\5\u0085C\2\u0390\u0391"+ "\2\u038e\u0390\3\2\2\2\u038f\u0384\3\2\2\2\u038f\u0386\3\2\2\2\u038f\u038a"+
"\5\u0085C\2\u0391\u0392\5\u0085C\2\u0392\u00c8\3\2\2\2\u0393\u0394\7p"+ "\3\2\2\2\u0390\u00c6\3\2\2\2\u0391\u0392\t\20\2\2\u0392\u00c8\3\2\2\2"+
"\2\2\u0394\u0395\7w\2\2\u0395\u0396\7n\2\2\u0396\u0397\7n\2\2\u0397\u00ca"+ "\u0393\u0394\7^\2\2\u0394\u0395\7w\2\2\u0395\u0396\5\u0087D\2\u0396\u0397"+
"\3\2\2\2\u0398\u0399\7*\2\2\u0399\u00cc\3\2\2\2\u039a\u039b\7+\2\2\u039b"+ "\5\u0087D\2\u0397\u0398\5\u0087D\2\u0398\u0399\5\u0087D\2\u0399\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\u039a\u039b\7p\2\2\u039b\u039c\7w\2\2\u039c\u039d\7n\2\2\u039d"+
"\2\2\u039f\u00d2\3\2\2\2\u03a0\u03a1\7]\2\2\u03a1\u00d4\3\2\2\2\u03a2"+ "\u039e\7n\2\2\u039e\u00cc\3\2\2\2\u039f\u03a0\7*\2\2\u03a0\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\u03a1\u03a2\7+\2\2\u03a2\u00d0\3\2\2\2\u03a3\u03a4\7}\2\2\u03a4\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\u03a5\u03a6\7\177\2\2\u03a6\u00d4\3\2\2\2\u03a7\u03a8\7]\2\2"+
"\3\2\2\2\u03aa\u03ab\7?\2\2\u03ab\u00de\3\2\2\2\u03ac\u03ad\7@\2\2\u03ad"+ "\u03a8\u00d6\3\2\2\2\u03a9\u03aa\7_\2\2\u03aa\u00d8\3\2\2\2\u03ab\u03ac"+
"\u00e0\3\2\2\2\u03ae\u03af\7>\2\2\u03af\u00e2\3\2\2\2\u03b0\u03b1\7#\2"+ "\7=\2\2\u03ac\u00da\3\2\2\2\u03ad\u03ae\7.\2\2\u03ae\u00dc\3\2\2\2\u03af"+
"\2\u03b1\u00e4\3\2\2\2\u03b2\u03b3\7\u0080\2\2\u03b3\u00e6\3\2\2\2\u03b4"+ "\u03b0\7\60\2\2\u03b0\u00de\3\2\2\2\u03b1\u03b2\7?\2\2\u03b2\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\u03b3\u03b4\7@\2\2\u03b4\u00e2\3\2\2\2\u03b5\u03b6\7>\2\2\u03b6\u00e4"+
"\2\u03b8\u03b9\7?\2\2\u03b9\u03ba\7?\2\2\u03ba\u00ec\3\2\2\2\u03bb\u03bc"+ "\3\2\2\2\u03b7\u03b8\7#\2\2\u03b8\u00e6\3\2\2\2\u03b9\u03ba\7\u0080\2"+
"\7>\2\2\u03bc\u03bd\7?\2\2\u03bd\u00ee\3\2\2\2\u03be\u03bf\7@\2\2\u03bf"+ "\2\u03ba\u00e8\3\2\2\2\u03bb\u03bc\7A\2\2\u03bc\u00ea\3\2\2\2\u03bd\u03be"+
"\u03c0\7?\2\2\u03c0\u00f0\3\2\2\2\u03c1\u03c2\7#\2\2\u03c2\u03c3\7?\2"+ "\7<\2\2\u03be\u00ec\3\2\2\2\u03bf\u03c0\7?\2\2\u03c0\u03c1\7?\2\2\u03c1"+
"\2\u03c3\u00f2\3\2\2\2\u03c4\u03c5\7(\2\2\u03c5\u03c6\7(\2\2\u03c6\u00f4"+ "\u00ee\3\2\2\2\u03c2\u03c3\7>\2\2\u03c3\u03c4\7?\2\2\u03c4\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\u03c5\u03c6\7@\2\2\u03c6\u03c7\7?\2\2\u03c7\u00f2\3\2\2\2\u03c8\u03c9"+
"\u03cb\7-\2\2\u03cb\u03cc\7-\2\2\u03cc\u00f8\3\2\2\2\u03cd\u03ce\7/\2"+ "\7#\2\2\u03c9\u03ca\7?\2\2\u03ca\u00f4\3\2\2\2\u03cb\u03cc\7(\2\2\u03cc"+
"\2\u03ce\u03cf\7/\2\2\u03cf\u00fa\3\2\2\2\u03d0\u03d1\7-\2\2\u03d1\u00fc"+ "\u03cd\7(\2\2\u03cd\u00f6\3\2\2\2\u03ce\u03cf\7~\2\2\u03cf\u03d0\7~\2"+
"\3\2\2\2\u03d2\u03d3\7/\2\2\u03d3\u00fe\3\2\2\2\u03d4\u03d5\7,\2\2\u03d5"+ "\2\u03d0\u00f8\3\2\2\2\u03d1\u03d2\7-\2\2\u03d2\u03d3\7-\2\2\u03d3\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\u03d4\u03d5\7/\2\2\u03d5\u03d6\7/\2\2\u03d6\u00fc\3\2\2\2\u03d7"+
"(\2\2\u03d9\u0104\3\2\2\2\u03da\u03db\7~\2\2\u03db\u0106\3\2\2\2\u03dc"+ "\u03d8\7-\2\2\u03d8\u00fe\3\2\2\2\u03d9\u03da\7/\2\2\u03da\u0100\3\2\2"+
"\u03dd\7`\2\2\u03dd\u0108\3\2\2\2\u03de\u03df\7\'\2\2\u03df\u010a\3\2"+ "\2\u03db\u03dc\7,\2\2\u03dc\u0102\3\2\2\2\u03dd\u03de\7\61\2\2\u03de\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\u03df\u03e0\7(\2\2\u03e0\u0106\3\2\2\2\u03e1\u03e2\7~\2\2\u03e2"+
"\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\u03e3\u03e4\7`\2\2\u03e4\u010a\3\2\2\2\u03e5\u03e6\7\'"+
"\u03e8\7?\2\2\u03e8\u0110\3\2\2\2\u03e9\u03ea\7/\2\2\u03ea\u03eb\7?\2"+ "\2\2\u03e6\u010c\3\2\2\2\u03e7\u03e8\7/\2\2\u03e8\u03e9\7@\2\2\u03e9\u010e"+
"\2\u03eb\u0112\3\2\2\2\u03ec\u03ed\7,\2\2\u03ed\u03ee\7?\2\2\u03ee\u0114"+ "\3\2\2\2\u03ea\u03eb\7<\2\2\u03eb\u03ec\7<\2\2\u03ec\u0110\3\2\2\2\u03ed"+
"\3\2\2\2\u03ef\u03f0\7\61\2\2\u03f0\u03f1\7?\2\2\u03f1\u0116\3\2\2\2\u03f2"+ "\u03ee\7-\2\2\u03ee\u03ef\7?\2\2\u03ef\u0112\3\2\2\2\u03f0\u03f1\7/\2"+
"\u03f3\7(\2\2\u03f3\u03f4\7?\2\2\u03f4\u0118\3\2\2\2\u03f5\u03f6\7~\2"+ "\2\u03f1\u03f2\7?\2\2\u03f2\u0114\3\2\2\2\u03f3\u03f4\7,\2\2\u03f4\u03f5"+
"\2\u03f6\u03f7\7?\2\2\u03f7\u011a\3\2\2\2\u03f8\u03f9\7`\2\2\u03f9\u03fa"+ "\7?\2\2\u03f5\u0116\3\2\2\2\u03f6\u03f7\7\61\2\2\u03f7\u03f8\7?\2\2\u03f8"+
"\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\u03f9\u03fa\7(\2\2\u03fa\u03fb\7?\2\2\u03fb\u011a\3\2\2"+
"\u011e\3\2\2\2\u03fe\u03ff\7>\2\2\u03ff\u0400\7>\2\2\u0400\u0401\7?\2"+ "\2\u03fc\u03fd\7~\2\2\u03fd\u03fe\7?\2\2\u03fe\u011c\3\2\2\2\u03ff\u0400"+
"\2\u0401\u0120\3\2\2\2\u0402\u0403\7@\2\2\u0403\u0404\7@\2\2\u0404\u0405"+ "\7`\2\2\u0400\u0401\7?\2\2\u0401\u011e\3\2\2\2\u0402\u0403\7\'\2\2\u0403"+
"\7?\2\2\u0405\u0122\3\2\2\2\u0406\u0407\7@\2\2\u0407\u0408\7@\2\2\u0408"+ "\u0404\7?\2\2\u0404\u0120\3\2\2\2\u0405\u0406\7>\2\2\u0406\u0407\7>\2"+
"\u0409\7@\2\2\u0409\u040a\7?\2\2\u040a\u0124\3\2\2\2\u040b\u040f\5\u0127"+ "\2\u0407\u0408\7?\2\2\u0408\u0122\3\2\2\2\u0409\u040a\7@\2\2\u040a\u040b"+
"\u0094\2\u040c\u040e\5\u0129\u0095\2\u040d\u040c\3\2\2\2\u040e\u0411\3"+ "\7@\2\2\u040b\u040c\7?\2\2\u040c\u0124\3\2\2\2\u040d\u040e\7@\2\2\u040e"+
"\2\2\2\u040f\u040d\3\2\2\2\u040f\u0410\3\2\2\2\u0410\u0126\3\2\2\2\u0411"+ "\u040f\7@\2\2\u040f\u0410\7@\2\2\u0410\u0411\7?\2\2\u0411\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\u0412\u0416\5\u0129\u0095\2\u0413\u0415\5\u012b\u0096\2\u0414\u0413"+
"\u0094\2\2\u0415\u0416\t\23\2\2\u0416\u0417\t\24\2\2\u0417\u0419\6\u0094"+ "\3\2\2\2\u0415\u0418\3\2\2\2\u0416\u0414\3\2\2\2\u0416\u0417\3\2\2\2\u0417"+
"\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\u0418\u0416\3\2\2\2\u0419\u0420\t\21\2\2\u041a\u041b\n"+
"\u0128\3\2\2\2\u041a\u0421\t\25\2\2\u041b\u041c\n\22\2\2\u041c\u0421\6"+ "\22\2\2\u041b\u0420\6\u0095\2\2\u041c\u041d\t\23\2\2\u041d\u041e\t\24"+
"\u0095\4\2\u041d\u041e\t\23\2\2\u041e\u041f\t\24\2\2\u041f\u0421\6\u0095"+ "\2\2\u041e\u0420\6\u0095\3\2\u041f\u0419\3\2\2\2\u041f\u041a\3\2\2\2\u041f"+
"\5\2\u0420\u041a\3\2\2\2\u0420\u041b\3\2\2\2\u0420\u041d\3\2\2\2\u0421"+ "\u041c\3\2\2\2\u0420\u012a\3\2\2\2\u0421\u0428\t\25\2\2\u0422\u0423\n"+
"\u012a\3\2\2\2\u0422\u0423\7B\2\2\u0423\u012c\3\2\2\2\u0424\u0425\7\60"+ "\22\2\2\u0423\u0428\6\u0096\4\2\u0424\u0425\t\23\2\2\u0425\u0426\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\u0426\u0428\6\u0096\5\2\u0427\u0421\3\2\2\2\u0427\u0422\3\2\2\2\u0427"+
"\u042a\t\26\2\2\u0429\u0428\3\2\2\2\u042a\u042b\3\2\2\2\u042b\u0429\3"+ "\u0424\3\2\2\2\u0428\u012c\3\2\2\2\u0429\u042a\7B\2\2\u042a\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\u042b\u042c\7\60\2\2\u042c\u042d\7\60\2\2\u042d\u042e\7\60\2\2\u042e"+
"\u042e\u0130\3\2\2\2\u042f\u0430\7\61\2\2\u0430\u0431\7,\2\2\u0431\u0435"+ "\u0130\3\2\2\2\u042f\u0431\t\26\2\2\u0430\u042f\3\2\2\2\u0431\u0432\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\u0432\u0430\3\2\2\2\u0432\u0433\3\2\2\2\u0433\u0434\3\2\2\2\u0434"+
"\u0435\u0436\3\2\2\2\u0435\u0433\3\2\2\2\u0436\u0438\3\2\2\2\u0437\u0435"+ "\u0435\b\u0099\2\2\u0435\u0132\3\2\2\2\u0436\u0437\7\61\2\2\u0437\u0438"+
"\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\u0438\u043c\3\2\2\2\u0439\u043b\13\2\2\2\u043a\u0439\3\2\2\2\u043b"+
"\u043c\b\u0099\2\2\u043c\u0132\3\2\2\2\u043d\u043e\7\61\2\2\u043e\u043f"+ "\u043e\3\2\2\2\u043c\u043d\3\2\2\2\u043c\u043a\3\2\2\2\u043d\u043f\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\u043e\u043c\3\2\2\2\u043f\u0440\7,\2\2\u0440\u0441\7\61\2\2\u0441"+
"\u0442\u0445\3\2\2\2\u0443\u0441\3\2\2\2\u0443\u0444\3\2\2\2\u0444\u0446"+ "\u0442\3\2\2\2\u0442\u0443\b\u009a\2\2\u0443\u0134\3\2\2\2\u0444\u0445"+
"\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\u0445\u0446\7\61\2\2\u0446\u044a\3\2\2\2\u0447\u0449\n\27\2"+
"\28\2\u028c\u0290\u0294\u0298\u029c\u02a3\u02a8\u02aa\u02ae\u02b1\u02b5"+ "\2\u0448\u0447\3\2\2\2\u0449\u044c\3\2\2\2\u044a\u0448\3\2\2\2\u044a\u044b"+
"\u02bc\u02c0\u02c5\u02cd\u02d0\u02d7\u02db\u02df\u02e5\u02e8\u02ef\u02f3"+ "\3\2\2\2\u044b\u044d\3\2\2\2\u044c\u044a\3\2\2\2\u044d\u044e\b\u009b\2"+
"\u02fb\u02fe\u0305\u0309\u030d\u0312\u0315\u0318\u031d\u0320\u0325\u032a"+ "\2\u044e\u0136\3\2\2\28\2\u0293\u0297\u029b\u029f\u02a3\u02aa\u02af\u02b1"+
"\u0332\u033d\u0341\u0346\u034a\u035a\u0364\u036a\u0371\u0375\u037b\u0388"+ "\u02b5\u02b8\u02bc\u02c3\u02c7\u02cc\u02d4\u02d7\u02de\u02e2\u02e6\u02ec"+
"\u040f\u0418\u0420\u042b\u0435\u0443\3\b\2\2"; "\u02ef\u02f6\u02fa\u0302\u0305\u030c\u0310\u0314\u0319\u031c\u031f\u0324"+
"\u0327\u032c\u0331\u0339\u0344\u0348\u034d\u0351\u0361\u036b\u0371\u0378"+
"\u037c\u0382\u038f\u0416\u041f\u0427\u0432\u043c\u044a\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 'auto'=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

@ -0,0 +1,37 @@
package de.dhbwstuttgart.syntaxtree;
import de.dhbwstuttgart.syntaxtree.statement.*;
import de.dhbwstuttgart.syntaxtree.statement.literal.Literal;
import de.dhbwstuttgart.syntaxtree.statement.literal.Null;
import de.dhbwstuttgart.syntaxtree.type.*;
public interface ASTVisitor extends StatementVisitor{
void visit(SourceFile sourceFile);
void visit(ArgumentList argumentList);
void visit(GenericTypeVar genericTypeVar);
void visit(FormalParameter formalParameter);
void visit(GenericDeclarationList genericTypeVars);
void visit(Field field);
void visit(Method field);
void visit(ParameterList formalParameters);
void visit(ClassOrInterface classOrInterface);
void visit(RefType refType);
void visit(SuperWildcardType superWildcardType);
void visit(TypePlaceholder typePlaceholder);
void visit(ExtendsWildcardType extendsWildcardType);
void visit(GenericRefType genericRefType);
}

View File

@ -0,0 +1,145 @@
package de.dhbwstuttgart.syntaxtree;
import de.dhbwstuttgart.syntaxtree.statement.*;
import de.dhbwstuttgart.syntaxtree.statement.literal.Literal;
import de.dhbwstuttgart.syntaxtree.statement.literal.Null;
import de.dhbwstuttgart.syntaxtree.type.*;
import java.lang.reflect.Modifier;
import java.util.Iterator;
public abstract class AbstractASTWalker implements ASTVisitor{
@Override
public void visit(SourceFile sourceFile) {
for(ClassOrInterface cl : sourceFile.getClasses()){
cl.accept(this);
}
}
@Override
public void visit(ArgumentList argumentList) {
for(Expression expr : argumentList.getArguments()){
expr.accept(this);
}
}
@Override
public void visit(FormalParameter formalParameter) {
formalParameter.getType().accept(this);
}
@Override
public void visit(GenericDeclarationList genericTypeVars) {
Iterator<GenericTypeVar> genericIterator = genericTypeVars.iterator();
if(genericIterator.hasNext()){
while(genericIterator.hasNext()){
genericIterator.next().accept(this);
}
}
}
@Override
public void visit(Field field) {
field.getType().accept(this);
}
@Override
public void visit(Method method) {
method.getType().accept(this);
method.getParameterList().accept(this);
method.block.accept(this);
}
@Override
public void visit(ParameterList formalParameters) {
Iterator<FormalParameter> genericIterator = formalParameters.getFormalparalist().iterator();
if(genericIterator.hasNext()){
while(genericIterator.hasNext()){
genericIterator.next().accept(this);
}
}
}
@Override
public void visit(ClassOrInterface classOrInterface) {
classOrInterface.getGenerics().accept(this);
for(Field f : classOrInterface.getFieldDecl()){
f.accept(this);
}
for(Method m : classOrInterface.getMethods()){
m.accept(this);
}
}
@Override
public void visit(RefType refType) {
Iterator<RefTypeOrTPHOrWildcardOrGeneric> genericIterator = refType.getParaList().iterator();
if(genericIterator.hasNext()){
while(genericIterator.hasNext()){
genericIterator.next().accept(this);
}
}
}
@Override
public void visit(SuperWildcardType superWildcardType) {
superWildcardType.getInnerType().accept(this);
}
@Override
public void visit(ExtendsWildcardType extendsWildcardType) {
extendsWildcardType.getInnerType().accept(this);
}
@Override
public void visit(LambdaExpression lambdaExpression) {
lambdaExpression.params.accept(this);
lambdaExpression.methodBody.accept(this);
}
@Override
public void visit(Assign assign) {
assign.lefSide.accept(this);
assign.rightSide.accept(this);
}
@Override
public void visit(Block block) {
for(Statement stmt : block.getStatements()){
stmt.accept(this);
}
}
@Override
public void visit(FieldVar fieldVar) {
fieldVar.receiver.accept(this);
}
@Override
public void visit(LocalVarDecl localVarDecl) {
localVarDecl.getType().accept(this);
}
@Override
public void visit(MethodCall methodCall) {
methodCall.receiver.accept(this);
methodCall.getArgumentList().accept(this);
}
@Override
public void visit(NewClass methodCall) {
visit((MethodCall) methodCall);
}
@Override
public void visit(Receiver receiver) {
receiver.expr.accept(this);
}
@Override
public void visit(Return aReturn) {
aReturn.retexpr.accept(this);
}
}

View File

@ -2,6 +2,7 @@ package de.dhbwstuttgart.syntaxtree;
import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.core.IItemWithOffset;
import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.RefType;
import de.dhbwstuttgart.syntaxtree.visual.ASTPrinter;
import de.dhbwstuttgart.typecheck.JavaClassName; import de.dhbwstuttgart.typecheck.JavaClassName;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric; import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
import de.dhbwstuttgart.typeinference.constraints.Constraint; import de.dhbwstuttgart.typeinference.constraints.Constraint;
@ -15,13 +16,12 @@ import java.util.List;
/** /**
* Stellt jede Art von Klasse dar. Auch abstrakte Klassen und Interfaces * Stellt jede Art von Klasse dar. Auch abstrakte Klassen und Interfaces
*/ */
public class ClassOrInterface extends GTVDeclarationContext implements IItemWithOffset, Generic{ public class ClassOrInterface extends SyntaxTreeNode {
protected int modifiers; protected int modifiers;
protected JavaClassName name; protected JavaClassName name;
private List<Field> fields = new ArrayList<>(); private List<Field> fields = new ArrayList<>();
private List<Method> methods = new ArrayList<>(); private List<Method> methods = new ArrayList<>();
private GenericDeclarationList genericClassParameters; private GenericDeclarationList genericClassParameters;
private Token offset;
private RefTypeOrTPHOrWildcardOrGeneric superClass; private RefTypeOrTPHOrWildcardOrGeneric superClass;
protected boolean isInterface; protected boolean isInterface;
private List<? extends RefTypeOrTPHOrWildcardOrGeneric> implementedInterfaces; private List<? extends RefTypeOrTPHOrWildcardOrGeneric> implementedInterfaces;
@ -31,23 +31,12 @@ public class ClassOrInterface extends GTVDeclarationContext implements IItemWith
RefTypeOrTPHOrWildcardOrGeneric superClass, Boolean isInterface, List<? extends RefTypeOrTPHOrWildcardOrGeneric> implementedInterfaces, Token offset){ RefTypeOrTPHOrWildcardOrGeneric superClass, Boolean isInterface, List<? extends RefTypeOrTPHOrWildcardOrGeneric> implementedInterfaces, Token offset){
super(offset); super(offset);
this.modifiers = modifiers; this.modifiers = modifiers;
if(name != null){
this.name = name; this.name = name;
}
if(fielddecl != null){
this.fields = fielddecl; this.fields = fielddecl;
} this.genericClassParameters = genericClassParameters;
if(genericClassParameters != null){
this.genericClassParameters = genericClassParameters;
}
this.offset = offset;
if(superClass != null){
this.superClass = superClass; this.superClass = superClass;
}
this.isInterface = isInterface; this.isInterface = isInterface;
if(implementedInterfaces != null){
this.implementedInterfaces = implementedInterfaces; this.implementedInterfaces = implementedInterfaces;
}
this.methods = methods; this.methods = methods;
this.constructors = constructors; this.constructors = constructors;
} }
@ -96,4 +85,9 @@ public class ClassOrInterface extends GTVDeclarationContext implements IItemWith
public List<? extends Method> getConstructors() { public List<? extends Method> getConstructors() {
return constructors; return constructors;
} }
@Override
public void accept(ASTVisitor visitor) {
visitor.visit(this);
}
} }

View File

@ -3,7 +3,7 @@ package de.dhbwstuttgart.syntaxtree;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric; import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Token;
public class Field extends GTVDeclarationContext implements Generic { public class Field extends SyntaxTreeNode{
private String name; private String name;
private RefTypeOrTPHOrWildcardOrGeneric type; private RefTypeOrTPHOrWildcardOrGeneric type;
@ -24,5 +24,10 @@ public class Field extends GTVDeclarationContext implements Generic {
public RefTypeOrTPHOrWildcardOrGeneric getType() { public RefTypeOrTPHOrWildcardOrGeneric getType() {
return type; return type;
} }
@Override
public void accept(ASTVisitor visitor) {
visitor.visit(this);
}
} }

View File

@ -17,4 +17,13 @@ public class FormalParameter extends SyntaxTreeNode
public RefTypeOrTPHOrWildcardOrGeneric getType() { public RefTypeOrTPHOrWildcardOrGeneric getType() {
return type; return type;
} }
public String getName() {
return name;
}
@Override
public void accept(ASTVisitor visitor) {
visitor.visit(this);
}
} }

View File

@ -1,13 +0,0 @@
package de.dhbwstuttgart.syntaxtree;
import org.antlr.v4.runtime.Token;
/**
* Beischreibt eine SyntaxTreeNode, welcher die Eigenschaft besitzt,
* dass bei seiner Deklaration auch Generische Typvariablen deklariert wurden.
*/
public abstract class GTVDeclarationContext extends SyntaxTreeNode {
public GTVDeclarationContext(Token offset) {
super(offset);
}
}

View File

@ -1,9 +0,0 @@
package de.dhbwstuttgart.syntaxtree;
/**
* Wird von allen Klassen implementiert, welche generische Parameter halten nnen. (Class, Method und Field)
* @author janulrich
*
*/
public interface Generic {
}

View File

@ -26,4 +26,9 @@ public class GenericDeclarationList extends SyntaxTreeNode implements Iterable<G
public Iterator<GenericTypeVar> iterator() { public Iterator<GenericTypeVar> iterator() {
return gtvs.iterator(); return gtvs.iterator();
} }
@Override
public void accept(ASTVisitor visitor) {
visitor.visit(this);
}
} }

View File

@ -51,4 +51,9 @@ public class GenericTypeVar extends SyntaxTreeNode
public GenericTypeName getName() { public GenericTypeName getName() {
return name; return name;
} }
@Override
public void accept(ASTVisitor visitor) {
visitor.visit(this);
}
} }

View File

@ -23,7 +23,7 @@ import de.dhbwstuttgart.syntaxtree.statement.Block;
*/ */
public class Method extends Field implements IItemWithOffset, TypeScope public class Method extends Field implements IItemWithOffset, TypeScope
{ {
private Block block; public final Block block;
private ParameterList parameterlist = new ParameterList(new ArrayList<>(), new NullToken()); private ParameterList parameterlist = new ParameterList(new ArrayList<>(), new NullToken());
private ExceptionList exceptionlist; private ExceptionList exceptionlist;
private GenericDeclarationList generics; private GenericDeclarationList generics;
@ -56,4 +56,9 @@ public class Method extends Field implements IItemWithOffset, TypeScope
public RefTypeOrTPHOrWildcardOrGeneric getReturnType() { public RefTypeOrTPHOrWildcardOrGeneric getReturnType() {
return this.getType(); return this.getType();
} }
@Override
public void accept(ASTVisitor visitor) {
visitor.visit(this);
}
} }

View File

@ -32,6 +32,11 @@ public class ParameterList extends SyntaxTreeNode implements Iterable<FormalPara
@Override @Override
public Iterator<FormalParameter> iterator() { public Iterator<FormalParameter> iterator() {
return null; return formalparameter.iterator();
} }
@Override
public void accept(ASTVisitor visitor) {
visitor.visit(this);
}
} }

View File

@ -7,7 +7,7 @@ import de.dhbwstuttgart.parser.NullToken;
import de.dhbwstuttgart.typecheck.JavaClassName; import de.dhbwstuttgart.typecheck.JavaClassName;
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet; import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation; import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation;
import sun.security.x509.X509CertInfo; //import sun.security.x509.X509CertInfo;
public class SourceFile extends SyntaxTreeNode{ public class SourceFile extends SyntaxTreeNode{
@ -15,18 +15,16 @@ public class SourceFile extends SyntaxTreeNode{
private final List<ClassOrInterface> KlassenVektor; private final List<ClassOrInterface> KlassenVektor;
private final List<JavaClassName> imports; private final List<JavaClassName> imports;
private final File file;
/** /**
* Die SourceFile repräsntiert eine zu einem Syntaxbaum eingelesene Java-Datei. * Die SourceFile repräsntiert eine zu einem Syntaxbaum eingelesene Java-Datei.
* SourceFile stellt dabei den Wurzelknoten des Syntaxbaumes dar. * SourceFile stellt dabei den Wurzelknoten des Syntaxbaumes dar.
*/ */
public SourceFile(File file, String pkgName, List<ClassOrInterface> classDefinitions, List<JavaClassName> imports){ public SourceFile(String pkgName, List<ClassOrInterface> classDefinitions, List<JavaClassName> imports){
super(new NullToken()); super(new NullToken());
this.KlassenVektor = classDefinitions; this.KlassenVektor = classDefinitions;
this.pkgName = pkgName; this.pkgName = pkgName;
this.imports = imports; this.imports = imports;
this.file = file;
} }
public String getPkgName(){ public String getPkgName(){
@ -59,7 +57,8 @@ public class SourceFile extends SyntaxTreeNode{
return KlassenVektor; return KlassenVektor;
} }
public File getFile() { @Override
return file; public void accept(ASTVisitor visitor) {
visitor.visit(this);
} }
} }

View File

@ -27,8 +27,6 @@ public interface StatementVisitor {
void visit(InstanceOf instanceOf); void visit(InstanceOf instanceOf);
void visit(InstVar instVar);
void visit(LocalVar localVar); void visit(LocalVar localVar);
void visit(LocalVarDecl localVarDecl); void visit(LocalVarDecl localVarDecl);
@ -55,8 +53,6 @@ public interface StatementVisitor {
void visit(WhileStmt whileStmt); void visit(WhileStmt whileStmt);
void visit(LocalVarBunchDeclaration localVarBunchDeclaration);
void visit(Null aNull); void visit(Null aNull);
void visit(Literal literal); void visit(Literal literal);

View File

@ -19,4 +19,5 @@ public abstract class SyntaxTreeNode implements IItemWithOffset{
return offset; return offset;
} }
public abstract void accept(ASTVisitor visitor);
} }

View File

@ -101,8 +101,7 @@ public class UnifyTypeFactory {
} }
public static UnifyType convert(GenericRefType t){ public static UnifyType convert(GenericRefType t){
throw new NotImplementedException(); return new ReferenceType(t.getUniqueIdentifier());
//return new PlaceholderType(TypePlaceholder.fresh(t.getOffset()).getName());
} }
public static UnifyType convert(WildcardType t){ public static UnifyType convert(WildcardType t){
@ -119,16 +118,15 @@ public class UnifyTypeFactory {
} }
public static UnifyPair convert(Pair p) { public static UnifyPair convert(Pair p) {
if(p.OperatorSmaller()) { if(p.GetOperator().equals(PairOperator.SMALLERDOT)) {
UnifyPair ret = generateSmallerDotPair(UnifyTypeFactory.convert(p.TA1) UnifyPair ret = generateSmallerDotPair(UnifyTypeFactory.convert(p.TA1)
, UnifyTypeFactory.convert(p.TA2)); , UnifyTypeFactory.convert(p.TA2));
return ret; return ret;
}else if(p.OperatorEqual()){ }else if(p.GetOperator().equals(PairOperator.EQUALSDOT)){
UnifyPair ret = generateEqualDotPair(UnifyTypeFactory.convert(p.TA1) UnifyPair ret = generateEqualDotPair(UnifyTypeFactory.convert(p.TA1)
, UnifyTypeFactory.convert(p.TA2)); , UnifyTypeFactory.convert(p.TA2));
return ret; return ret;
}else throw new NotImplementedException(); }else throw new NotImplementedException();
} }
/** /**
@ -151,7 +149,7 @@ public class UnifyTypeFactory {
public static RefTypeOrTPHOrWildcardOrGeneric convert(ReferenceType t, Map<String,TypePlaceholder> tphs) { public static RefTypeOrTPHOrWildcardOrGeneric convert(ReferenceType t, Map<String,TypePlaceholder> tphs) {
if(JavaClassName.Void.equals(t.getName()))return new Void(new NullToken()); if(JavaClassName.Void.equals(t.getName()))return new Void(new NullToken());
RefType ret = new RefType(JavaClassName.Void,convert(t.getTypeParams(), tphs),new NullToken()); RefType ret = new RefType(new JavaClassName(t.getName()),convert(t.getTypeParams(), tphs),new NullToken());
return ret; return ret;
} }
@ -174,6 +172,7 @@ public class UnifyTypeFactory {
TypePlaceholder ret = tphs.get(t.getName()); TypePlaceholder ret = tphs.get(t.getName());
if(ret == null){ //Dieser TPH wurde vom Unifikationsalgorithmus erstellt if(ret == null){ //Dieser TPH wurde vom Unifikationsalgorithmus erstellt
ret = TypePlaceholder.fresh(new NullToken()); ret = TypePlaceholder.fresh(new NullToken());
tphs.put(t.getName(), ret);
} }
return ret; return ret;
} }

View File

@ -1,23 +0,0 @@
package de.dhbwstuttgart.syntaxtree.operator;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import org.antlr.v4.runtime.Token;
import org.apache.bcel.Constants;
import org.apache.bcel.generic.ArithmeticInstruction;
import org.apache.bcel.generic.DUP;
import org.apache.bcel.generic.IADD;
import org.apache.bcel.generic.InstructionList;
import org.apache.bcel.generic.InvokeInstruction;
import org.apache.bcel.generic.ObjectType;
public abstract class AddOp extends Operator
{
public AddOp(Token offset) {
super(offset);
}
}

View File

@ -1,18 +0,0 @@
package de.dhbwstuttgart.syntaxtree.operator;
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
import de.dhbwstuttgart.syntaxtree.statement.Binary;
import org.antlr.v4.runtime.Token;
import org.apache.bcel.generic.InstructionList;
public class AndOp extends LogOp
{
public AndOp(Token offset)
{
super(offset);
}
}

View File

@ -1,12 +0,0 @@
package de.dhbwstuttgart.syntaxtree.operator;
import org.antlr.v4.runtime.Token;
public class DivideOp extends MulOp
{
public DivideOp(Token offset) {
super(offset);
}
}

View File

@ -1,15 +0,0 @@
package de.dhbwstuttgart.syntaxtree.operator;
import org.antlr.v4.runtime.Token;
import org.apache.bcel.generic.BranchInstruction;
import org.apache.bcel.generic.IF_ICMPNE;
public class EqualOp extends RelOp
{
public EqualOp(Token offset) {
super(offset);
}
}

View File

@ -1,13 +0,0 @@
package de.dhbwstuttgart.syntaxtree.operator;
import org.antlr.v4.runtime.Token;
public class GreaterEquOp extends RelOp
{
public GreaterEquOp(Token offset) {
super(offset);
}
}

View File

@ -1,14 +0,0 @@
package de.dhbwstuttgart.syntaxtree.operator;
import org.antlr.v4.runtime.Token;
public class GreaterOp extends RelOp
{
public GreaterOp(Token offset) {
super(offset);
}
}

View File

@ -1,15 +0,0 @@
package de.dhbwstuttgart.syntaxtree.operator;
import org.antlr.v4.runtime.Token;
public class LessEquOp extends RelOp
{
public LessEquOp(Token offset) {
super(offset);
}
}

View File

@ -1,14 +0,0 @@
package de.dhbwstuttgart.syntaxtree.operator;
import org.antlr.v4.runtime.Token;
public class LessOp extends RelOp
{
public LessOp(Token offset)
{
super(offset);
}
}

View File

@ -1,18 +0,0 @@
package de.dhbwstuttgart.syntaxtree.operator;
import org.antlr.v4.runtime.Token;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
public abstract class LogOp extends Operator
{
public LogOp(Token offset)
{
super(offset);
}
}

View File

@ -1,11 +0,0 @@
package de.dhbwstuttgart.syntaxtree.operator;
import org.antlr.v4.runtime.Token;
public class MinusOp extends AddOp
{
public MinusOp(Token offset) {
super(offset);
}
}

View File

@ -1,15 +0,0 @@
package de.dhbwstuttgart.syntaxtree.operator;
import org.antlr.v4.runtime.Token;
public class ModuloOp extends MulOp
{
public ModuloOp(Token offset)
{
super(offset);
}
}

View File

@ -1,10 +0,0 @@
package de.dhbwstuttgart.syntaxtree.operator;
import org.antlr.v4.runtime.Token;
public abstract class MulOp extends Operator
{
public MulOp(Token offset) {
super(offset);
}
}

View File

@ -1,11 +0,0 @@
package de.dhbwstuttgart.syntaxtree.operator;
import org.antlr.v4.runtime.Token;
public class NotEqualOp extends RelOp
{
public NotEqualOp(Token offset) {
super(offset);
}
}

View File

@ -1,13 +0,0 @@
package de.dhbwstuttgart.syntaxtree.operator;
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
import org.antlr.v4.runtime.Token;
public abstract class Operator extends SyntaxTreeNode
{
public Operator(Token offset) {
super(offset);
}
}

View File

@ -1,15 +0,0 @@
package de.dhbwstuttgart.syntaxtree.operator;
import org.antlr.v4.runtime.Token;
public class OrOp extends LogOp
{
public OrOp(Token offset)
{
super(offset);
}
}

View File

@ -1,12 +0,0 @@
package de.dhbwstuttgart.syntaxtree.operator;
import org.antlr.v4.runtime.Token;
public class PlusOp extends AddOp
{
public PlusOp(Token offset)
{
super(offset);
}
}

View File

@ -1,11 +0,0 @@
package de.dhbwstuttgart.syntaxtree.operator;
import org.antlr.v4.runtime.Token;
public abstract class RelOp extends Operator
{
public RelOp(Token offset) {
super(offset);
}
}

View File

@ -1,11 +0,0 @@
package de.dhbwstuttgart.syntaxtree.operator;
import org.antlr.v4.runtime.Token;
public class TimesOp extends MulOp
{
public TimesOp(Token offset)
{
super(offset);
}
}

View File

@ -1,6 +1,7 @@
package de.dhbwstuttgart.syntaxtree.statement; package de.dhbwstuttgart.syntaxtree.statement;
import de.dhbwstuttgart.syntaxtree.ASTVisitor;
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Token;
@ -19,4 +20,8 @@ public class ArgumentList extends SyntaxTreeNode
return expr; return expr;
} }
@Override
public void accept(ASTVisitor visitor) {
visitor.visit(this);
}
} }

View File

@ -6,12 +6,16 @@ import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet; import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation; import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation;
import de.dhbwstuttgart.syntaxtree.operator.Operator;
// neu von Felix // neu von Felix
public class Binary extends Expression public class Binary extends Expression
{ {
public enum Operator{
ADD,
SUB,
MUL,
AND, OR, DIV
}
public Binary(Expression expr1, Expression expr2, Operator op){ public Binary(Expression expr1, Expression expr2, Operator op){
super(null, null); super(null, null);
} }

View File

@ -1,6 +1,7 @@
package de.dhbwstuttgart.syntaxtree.statement; package de.dhbwstuttgart.syntaxtree.statement;
import de.dhbwstuttgart.syntaxtree.ASTVisitor;
import de.dhbwstuttgart.syntaxtree.StatementVisitor; import de.dhbwstuttgart.syntaxtree.StatementVisitor;
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric; import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
@ -23,4 +24,9 @@ public abstract class Expression extends SyntaxTreeNode
} }
public abstract void accept(StatementVisitor visitor); public abstract void accept(StatementVisitor visitor);
@Override
public void accept(ASTVisitor visitor) {
this.accept((StatementVisitor)visitor);
}
} }

View File

@ -1,24 +0,0 @@
package de.dhbwstuttgart.syntaxtree.statement;
import de.dhbwstuttgart.exceptions.NotImplementedException;
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation;
import org.antlr.v4.runtime.Token;
public class InstVar extends Expression
{
private Expression expr;
public InstVar(Expression instanz, String name, Token offset)
{
super(instanz.getType(),offset);
expr = instanz;
}
@Override
public void accept(StatementVisitor visitor) {
visitor.visit(this);
}
}

View File

@ -8,7 +8,7 @@ import de.dhbwstuttgart.typeinference.constraints.Constraint;
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet; import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
import de.dhbwstuttgart.typeinference.constraints.Pair; import de.dhbwstuttgart.typeinference.constraints.Pair;
import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Token;
import sun.reflect.generics.reflectiveObjects.NotImplementedException; //import sun.reflect.generics.reflectiveObjects.NotImplementedException;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -1,28 +1,23 @@
package de.dhbwstuttgart.syntaxtree.statement; package de.dhbwstuttgart.syntaxtree.statement;
import de.dhbwstuttgart.exceptions.NotImplementedException;
import de.dhbwstuttgart.syntaxtree.StatementVisitor; import de.dhbwstuttgart.syntaxtree.StatementVisitor;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric; import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation;
import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Token;
public class LocalVar extends Statement{ public class LocalVar extends Statement{
protected final String expression; public final String name;
public LocalVar(String n, RefTypeOrTPHOrWildcardOrGeneric type, Token offset) public LocalVar(String n, RefTypeOrTPHOrWildcardOrGeneric type, Token offset)
{ {
super(type,offset); super(type,offset);
this.expression = n; this.name = n;
} }
public LocalVar(Expression e1, RefTypeOrTPHOrWildcardOrGeneric type, String access) public LocalVar(Expression e1, RefTypeOrTPHOrWildcardOrGeneric type, String access)
{ {
super(type,e1.getOffset()); super(type,e1.getOffset());
this.expression = access; this.name = access;
} }
@Override @Override

View File

@ -1,23 +0,0 @@
package de.dhbwstuttgart.syntaxtree.statement;
import de.dhbwstuttgart.exceptions.NotImplementedException;
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
import de.dhbwstuttgart.syntaxtree.type.Void;
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation;
import org.antlr.v4.runtime.Token;
import java.util.List;
public class LocalVarBunchDeclaration extends Statement {
public LocalVarBunchDeclaration(List<LocalVarDecl> declarations, Token start) {
super(new Void(start), start);
}
@Override
public void accept(StatementVisitor visitor) {
visitor.visit(this);
}
}

View File

@ -24,4 +24,8 @@ public class LocalVarDecl extends Statement
public void accept(StatementVisitor visitor) { public void accept(StatementVisitor visitor) {
visitor.visit(this); visitor.visit(this);
} }
public String getName() {
return name;
}
} }

View File

@ -2,6 +2,7 @@ package de.dhbwstuttgart.syntaxtree.statement;
import de.dhbwstuttgart.exceptions.TypeinferenceException; import de.dhbwstuttgart.exceptions.TypeinferenceException;
import de.dhbwstuttgart.syntaxtree.*; import de.dhbwstuttgart.syntaxtree.*;
import de.dhbwstuttgart.syntaxtree.statement.literal.Null;
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.typeinference.assumptions.TypeInferenceBlockInformation; import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
@ -23,7 +24,6 @@ public class MethodCall extends Statement
public final String name; public final String name;
public final Receiver receiver; public final Receiver receiver;
public final ArgumentList arglist; public final ArgumentList arglist;
private ArgumentList argumentList;
public MethodCall(RefTypeOrTPHOrWildcardOrGeneric retType, Receiver receiver, String methodName, ArgumentList argumentList, Token offset){ public MethodCall(RefTypeOrTPHOrWildcardOrGeneric retType, Receiver receiver, String methodName, ArgumentList argumentList, Token offset){
super(retType,offset); super(retType,offset);
@ -38,6 +38,6 @@ public class MethodCall extends Statement
} }
public ArgumentList getArgumentList() { public ArgumentList getArgumentList() {
return argumentList; return arglist;
} }
} }

View File

@ -31,7 +31,7 @@ public class NewClass extends MethodCall
* @param start * @param start
*/ */
public NewClass(RefType newClass, ArgumentList args, Token start) { public NewClass(RefType newClass, ArgumentList args, Token start) {
super(newClass, new Receiver(new EmptyStmt(start)), "new "+newClass.getName().toString(), args, start); super(newClass, new Receiver(new EmptyStmt(start)), newClass.getName().toString(), args, start);
} }
@Override @Override

View File

@ -1,7 +1,6 @@
package de.dhbwstuttgart.syntaxtree.statement; package de.dhbwstuttgart.syntaxtree.statement;
import de.dhbwstuttgart.syntaxtree.StatementVisitor; import de.dhbwstuttgart.syntaxtree.StatementVisitor;
import de.dhbwstuttgart.syntaxtree.operator.Operator;
import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.RefType;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation; import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;

View File

@ -1,6 +1,7 @@
package de.dhbwstuttgart.syntaxtree.type; package de.dhbwstuttgart.syntaxtree.type;
import de.dhbwstuttgart.syntaxtree.ASTVisitor;
import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Token;
/** /**
@ -33,4 +34,8 @@ public class ExtendsWildcardType extends WildcardType{
} }
@Override
public void accept(ASTVisitor visitor) {
visitor.visit(this);
}
} }

View File

@ -1,6 +1,9 @@
package de.dhbwstuttgart.syntaxtree.type; package de.dhbwstuttgart.syntaxtree.type;
import de.dhbwstuttgart.parser.NullToken;
import de.dhbwstuttgart.typecheck.JavaClassName;
import java.util.List; import java.util.List;
/** /**
@ -13,20 +16,15 @@ import java.util.List;
* *
*/ */
public class FunN extends RefType { public class FunN extends RefType {
private RefTypeOrTPHOrWildcardOrGeneric R;
private List<? extends RefTypeOrTPHOrWildcardOrGeneric> T;
/** /**
* @author Andreas Stadelmeier, a10023 * @author Andreas Stadelmeier, a10023
* BenÃtigt ¼r den Typinferenzalgorithmus ¼r Java 8 * BenÃtigt ¼r den Typinferenzalgorithmus ¼r Java 8
* Generiert einen RefType auf eine FunN<R,T1,...,TN> - Klasse. * Generiert einen RefType auf eine FunN<R,T1,...,TN> - Klasse.
* @param R * @param params
* @param T
* @return * @return
*/ */
public FunN(RefTypeOrTPHOrWildcardOrGeneric R, List<? extends RefTypeOrTPHOrWildcardOrGeneric> T) { public FunN(List<RefTypeOrTPHOrWildcardOrGeneric> params) {
super(null,null); super(new JavaClassName("Fun"+params.size()), params, new NullToken());
} }
/** /**

View File

@ -1,42 +0,0 @@
package de.dhbwstuttgart.syntaxtree.type;
import java.util.ArrayList;
import java.util.List;
/**
* FunVoid<T1,...,TN> {
* void apply(T1 arg1, ... TN argN);
* }
* @author A10023 - Andreas Stadelmeier
*
*/
public class FunVoidN extends FunN {
private RefTypeOrTPHOrWildcardOrGeneric R;
private List<RefTypeOrTPHOrWildcardOrGeneric> T;
/**
* @author Andreas Stadelmeier, a10023
* BenÃtigt ¼r den Typinferenzalgorithmus ¼r Java 8
* Generiert einen RefType auf eine FunVoidN<T1,...,TN> - Klasse.
* @param T
* @return
*/
public FunVoidN(List<RefTypeOrTPHOrWildcardOrGeneric> T) {
super(null,T);
}
/**
* Muss nach jeder Änderung von T oder R aufgerufen werden.
* Dabei werden bestimmte, von RefType geerbte, Parameter angepasst. Dies ist wichtig ¼r den Typinferenzalgorithmus.
*/
private void calculateNewParalist(){
List<RefTypeOrTPHOrWildcardOrGeneric> t = new ArrayList<>();
if(T!=null)t.addAll(T);
this.parameter = t;
}
}

View File

@ -1,5 +1,6 @@
package de.dhbwstuttgart.syntaxtree.type; package de.dhbwstuttgart.syntaxtree.type;
import de.dhbwstuttgart.syntaxtree.ASTVisitor;
import de.dhbwstuttgart.typecheck.GenericTypeName; import de.dhbwstuttgart.typecheck.GenericTypeName;
import de.dhbwstuttgart.typecheck.JavaClassName; import de.dhbwstuttgart.typecheck.JavaClassName;
import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Token;
@ -17,5 +18,13 @@ public class GenericRefType extends RefTypeOrTPHOrWildcardOrGeneric
return name; return name;
} }
public String getUniqueIdentifier(){
return name.toString();
}
@Override
public void accept(ASTVisitor visitor) {
visitor.visit(this);
}
} }

View File

@ -1,5 +1,6 @@
package de.dhbwstuttgart.syntaxtree.type; package de.dhbwstuttgart.syntaxtree.type;
import de.dhbwstuttgart.syntaxtree.ASTVisitor;
import de.dhbwstuttgart.typecheck.JavaClassName; import de.dhbwstuttgart.typecheck.JavaClassName;
import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Token;
@ -16,8 +17,8 @@ public class RefType extends RefTypeOrTPHOrWildcardOrGeneric
* Bsp.: 9| tag = CONSTANT_Utf8, length = 21, (Ljava/lang/String;)V * Bsp.: 9| tag = CONSTANT_Utf8, length = 21, (Ljava/lang/String;)V
*/ */
private boolean IsArray = false; private boolean IsArray = false;
protected JavaClassName name; protected final JavaClassName name;
protected List<RefTypeOrTPHOrWildcardOrGeneric> parameter = null; protected final List<RefTypeOrTPHOrWildcardOrGeneric> parameter;
/** /**
* Ist primitiveFlag auf true, muss beim Codegen dieser Reftype durch * Ist primitiveFlag auf true, muss beim Codegen dieser Reftype durch
* den primitiven Datentyp ersetzt werden * den primitiven Datentyp ersetzt werden
@ -28,8 +29,7 @@ public class RefType extends RefTypeOrTPHOrWildcardOrGeneric
public RefType(JavaClassName fullyQualifiedName, Token offset) public RefType(JavaClassName fullyQualifiedName, Token offset)
{ {
super(offset); this(fullyQualifiedName, null, offset);
this.name = (fullyQualifiedName);
} }
@Override @Override
@ -42,13 +42,14 @@ public class RefType extends RefTypeOrTPHOrWildcardOrGeneric
int hash = 0; int hash = 0;
hash += super.hashCode(); hash += super.hashCode();
hash += this.name.hashCode();//Nur den Name hashen. Sorgt ¼r langsame, aber funktionierende HashMaps hash += this.name.hashCode();//Nur den Name hashen. Sorgt ¼r langsame, aber funktionierende HashMaps
return hash; return hash;
} }
public RefType(JavaClassName fullyQualifiedName, List<RefTypeOrTPHOrWildcardOrGeneric> parameter, Token offset) public RefType(JavaClassName fullyQualifiedName, List<RefTypeOrTPHOrWildcardOrGeneric> parameter, Token offset)
{ {
this(fullyQualifiedName, offset); super(offset);
if(parameter != null && parameter.size()>0)this.parameter = parameter; this.name = (fullyQualifiedName);
this.parameter = parameter;
} }
public JavaClassName getName() public JavaClassName getName()
@ -100,5 +101,9 @@ public class RefType extends RefTypeOrTPHOrWildcardOrGeneric
} }
@Override
public void accept(ASTVisitor visitor) {
visitor.visit(this);
}
} }

View File

@ -1,10 +1,14 @@
package de.dhbwstuttgart.syntaxtree.type; package de.dhbwstuttgart.syntaxtree.type;
import de.dhbwstuttgart.syntaxtree.ASTVisitor;
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Token;
public class RefTypeOrTPHOrWildcardOrGeneric extends SyntaxTreeNode{ public abstract class RefTypeOrTPHOrWildcardOrGeneric extends SyntaxTreeNode{
public RefTypeOrTPHOrWildcardOrGeneric(Token offset) { public RefTypeOrTPHOrWildcardOrGeneric(Token offset) {
super(offset); super(offset);
} }
@Override
public abstract void accept(ASTVisitor visitor);
} }

View File

@ -1,6 +1,7 @@
package de.dhbwstuttgart.syntaxtree.type; package de.dhbwstuttgart.syntaxtree.type;
import de.dhbwstuttgart.syntaxtree.ASTVisitor;
import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Token;
/** /**
@ -42,4 +43,9 @@ public class SuperWildcardType extends WildcardType{
public boolean isSuper() { public boolean isSuper() {
return true; return true;
} }
@Override
public void accept(ASTVisitor visitor) {
visitor.visit(this);
}
} }

View File

@ -1,6 +1,7 @@
package de.dhbwstuttgart.syntaxtree.type; package de.dhbwstuttgart.syntaxtree.type;
import java.util.Hashtable; import java.util.Hashtable;
import de.dhbwstuttgart.syntaxtree.ASTVisitor;
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
import de.dhbwstuttgart.syntaxtree.factory.NameGenerator; import de.dhbwstuttgart.syntaxtree.factory.NameGenerator;
import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Token;
@ -65,4 +66,9 @@ public class TypePlaceholder extends RefTypeOrTPHOrWildcardOrGeneric
public String getName() { public String getName() {
return name; return name;
} }
@Override
public void accept(ASTVisitor visitor) {
visitor.visit(this);
}
} }

View File

@ -0,0 +1,13 @@
package de.dhbwstuttgart.syntaxtree.visual;
import de.dhbwstuttgart.syntaxtree.*;
public class ASTPrinter {
public static String print(SourceFile toPrint){
StringBuilder output = new StringBuilder();
new OutputGenerator(output).visit(toPrint);
return output.toString();
}
}

View File

@ -0,0 +1,20 @@
package de.dhbwstuttgart.syntaxtree.visual;
import de.dhbwstuttgart.syntaxtree.*;
import de.dhbwstuttgart.syntaxtree.statement.*;
import de.dhbwstuttgart.syntaxtree.statement.literal.Literal;
import de.dhbwstuttgart.syntaxtree.statement.literal.Null;
import de.dhbwstuttgart.syntaxtree.type.*;
import java.lang.reflect.Modifier;
import java.util.Iterator;
public class ASTTypePrinter extends ASTPrinter{
public static String print(SourceFile toPrint){
StringBuilder output = new StringBuilder();
new TypeOutputGenerator(output).visit(toPrint);
return output.toString();
}
}

View File

@ -0,0 +1,307 @@
package de.dhbwstuttgart.syntaxtree.visual;
import de.dhbwstuttgart.syntaxtree.*;
import de.dhbwstuttgart.syntaxtree.statement.*;
import de.dhbwstuttgart.syntaxtree.statement.literal.Literal;
import de.dhbwstuttgart.syntaxtree.statement.literal.Null;
import de.dhbwstuttgart.syntaxtree.type.*;
import java.lang.reflect.Modifier;
import java.util.Iterator;
public class OutputGenerator implements ASTVisitor {
private static final String TAB = " ";
String tabs = "";
protected final StringBuilder out;
public OutputGenerator(StringBuilder out){
this.out = out;
}
public void tab() {
tabs += TAB;
}
public void untab() {
tabs = tabs.substring(0,tabs.length()-TAB.length());
}
@Override
public void visit(SourceFile sourceFile) {
for(ClassOrInterface cl : sourceFile.getClasses()){
cl.accept(this);
}
}
@Override
public void visit(ArgumentList argumentList) {
out.append("(");
Iterator<Expression> expressionIterator = argumentList.getArguments().iterator();
while(expressionIterator.hasNext()){
expressionIterator.next().accept(this);
if(expressionIterator.hasNext())out.append(", ");
}
out.append(")");
}
@Override
public void visit(GenericTypeVar genericTypeVar) {
out.append(genericTypeVar.getName().toString());
}
@Override
public void visit(FormalParameter formalParameter) {
formalParameter.getType().accept(this);
out.append(" ");
out.append(formalParameter.getName());
}
@Override
public void visit(GenericDeclarationList genericTypeVars) {
Iterator<GenericTypeVar> genericIterator = genericTypeVars.iterator();
if(genericIterator.hasNext()){
out.append("<");
while(genericIterator.hasNext()){
genericIterator.next().accept(this);
if(genericIterator.hasNext())out.append(", ");
}
out.append(">");
}
}
@Override
public void visit(Field field) {
field.getType().accept(this);
out.append(" ");
out.append(field.getName());
out.append(";");
}
@Override
public void visit(Method method) {
method.getType().accept(this);
out.append(" " + method.getName());
method.getParameterList().accept(this);
method.block.accept(this);
out.append("\n");
}
@Override
public void visit(ParameterList formalParameters) {
out.append("(");
Iterator<FormalParameter> genericIterator = formalParameters.getFormalparalist().iterator();
if(genericIterator.hasNext()){
while(genericIterator.hasNext()){
genericIterator.next().accept(this);
if(genericIterator.hasNext())out.append(", ");
}
}
out.append(")");
}
@Override
public void visit(ClassOrInterface classOrInterface) {
if((Modifier.INTERFACE & classOrInterface.getModifiers()) == 1){
out.append("interface ");
}else{
out.append("class ");
}
out.append(classOrInterface.getClassName().toString());
classOrInterface.getGenerics().accept(this);
out.append(" {\n\n");
tab();
for(Field f : classOrInterface.getFieldDecl()){
out.append(tabs);
f.accept(this);
out.append("\n");
}
for(Method m : classOrInterface.getMethods()){
out.append(tabs);
m.accept(this);
out.append("\n");
}
untab();
out.append("}");
}
@Override
public void visit(RefType refType) {
out.append(refType.getName().toString());
Iterator<RefTypeOrTPHOrWildcardOrGeneric> genericIterator = refType.getParaList().iterator();
if(genericIterator.hasNext()){
out.append("<");
while(genericIterator.hasNext()){
genericIterator.next().accept(this);
if(genericIterator.hasNext())out.append(", ");
}
out.append(">");
}
}
@Override
public void visit(SuperWildcardType superWildcardType) {
out.append("? super ");
superWildcardType.getInnerType().accept(this);
}
@Override
public void visit(TypePlaceholder typePlaceholder) {
out.append("TPH "+ typePlaceholder.getName());
}
@Override
public void visit(ExtendsWildcardType extendsWildcardType) {
out.append("? extends ");
extendsWildcardType.getInnerType().accept(this);
}
@Override
public void visit(GenericRefType genericRefType) {
out.append(genericRefType.getName().toString());
}
@Override
public void visit(LambdaExpression lambdaExpression) {
lambdaExpression.params.accept(this);
out.append(" -> ");
lambdaExpression.methodBody.accept(this);
}
@Override
public void visit(Assign assign) {
assign.lefSide.accept(this);
out.append(" = ");
assign.rightSide.accept(this);
}
@Override
public void visit(Binary binary) {
}
@Override
public void visit(Block block) {
tab();
out.append("{\n");
for(Statement stmt : block.getStatements()){
out.append(tabs);
stmt.accept(this);
out.append(";\n");
}
untab();
out.append(tabs);
out.append("}");
}
@Override
public void visit(CastExpr castExpr) {
}
@Override
public void visit(EmptyStmt emptyStmt) {
}
@Override
public void visit(FieldVar fieldVar) {
fieldVar.receiver.accept(this);
out.append("." + fieldVar.fieldVarName);
}
@Override
public void visit(ForStmt forStmt) {
}
@Override
public void visit(IfStmt ifStmt) {
}
@Override
public void visit(InstanceOf instanceOf) {
}
@Override
public void visit(LocalVar localVar) {
out.append(localVar.name);
}
@Override
public void visit(LocalVarDecl localVarDecl) {
localVarDecl.getType().accept(this);
out.append(" " + localVarDecl.getName());
}
@Override
public void visit(MethodCall methodCall) {
methodCall.receiver.accept(this);
out.append("."+methodCall.name);
methodCall.getArgumentList().accept(this);
}
@Override
public void visit(NewClass methodCall) {
out.append("new ");
out.append(methodCall.name);
methodCall.getArgumentList().accept(this);
}
@Override
public void visit(NewArray newArray) {
}
@Override
public void visit(Receiver receiver) {
receiver.expr.accept(this);
}
@Override
public void visit(Return aReturn) {
out.append("return ");
aReturn.retexpr.accept(this);
}
@Override
public void visit(ReturnVoid aReturn) {
out.append("return");
}
@Override
public void visit(StaticClassName staticClassName) {
}
@Override
public void visit(Super aSuper) {
}
@Override
public void visit(This aThis) {
out.append("this");
}
@Override
public void visit(UnaryPlus unaryPlus) {
}
@Override
public void visit(WhileStmt whileStmt) {
}
@Override
public void visit(Null aNull) {
}
@Override
public void visit(Literal literal) {
}
}

View File

@ -0,0 +1,236 @@
package de.dhbwstuttgart.syntaxtree.visual;
import de.dhbwstuttgart.syntaxtree.*;
import de.dhbwstuttgart.syntaxtree.statement.*;
import de.dhbwstuttgart.syntaxtree.statement.literal.Literal;
import de.dhbwstuttgart.syntaxtree.statement.literal.Null;
import de.dhbwstuttgart.syntaxtree.type.*;
import java.lang.reflect.Modifier;
import java.util.Iterator;
public class TypeOutputGenerator extends OutputGenerator {
TypeOutputGenerator(StringBuilder out){
super(out);
}
@Override
public void visit(SourceFile sourceFile) {
super.visit(sourceFile);
}
@Override
public void visit(ArgumentList argumentList) {
super.visit(argumentList);
}
@Override
public void visit(GenericTypeVar genericTypeVar) {
super.visit(genericTypeVar);
}
@Override
public void visit(FormalParameter formalParameter) {
super.visit(formalParameter);
}
@Override
public void visit(GenericDeclarationList genericTypeVars) {
super.visit(genericTypeVars);
}
@Override
public void visit(Field field) {
super.visit(field);
}
@Override
public void visit(Method method) {
super.visit(method);
}
@Override
public void visit(ParameterList formalParameters) {
super.visit(formalParameters);
}
@Override
public void visit(ClassOrInterface classOrInterface) {
super.visit(classOrInterface);
}
@Override
public void visit(RefType refType) {
super.visit(refType);
}
@Override
public void visit(SuperWildcardType superWildcardType) {
super.visit(superWildcardType);
}
@Override
public void visit(TypePlaceholder typePlaceholder) {
super.visit(typePlaceholder);
}
@Override
public void visit(ExtendsWildcardType extendsWildcardType) {
super.visit(extendsWildcardType);
}
@Override
public void visit(GenericRefType genericRefType) {
super.visit(genericRefType);
}
@Override
public void visit(LambdaExpression lambdaExpression) {
out.append("(");
super.visit(lambdaExpression);
out.append(")");
this.out.append("::");
lambdaExpression.getType().accept(this);
}
@Override
public void visit(Assign assign) {
super.visit(assign);
}
@Override
public void visit(Binary binary) {
super.visit(binary);
}
@Override
public void visit(Block block) {
out.append("(");
super.visit(block);
out.append(")");
this.out.append("::");
block.getType().accept(this);
}
@Override
public void visit(CastExpr castExpr) {
super.visit(castExpr);
}
@Override
public void visit(EmptyStmt emptyStmt) {
super.visit(emptyStmt);
}
@Override
public void visit(FieldVar fieldVar) {
out.append("(");
super.visit(fieldVar);
out.append(")");
this.out.append("::");
fieldVar.getType().accept(this);
}
@Override
public void visit(ForStmt forStmt) {
super.visit(forStmt);
}
@Override
public void visit(IfStmt ifStmt) {
super.visit(ifStmt);
}
@Override
public void visit(InstanceOf instanceOf) {
super.visit(instanceOf);
}
@Override
public void visit(LocalVar localVar) {
out.append("(");
super.visit(localVar);
out.append(")");
this.out.append("::");
localVar.getType().accept(this);
}
@Override
public void visit(LocalVarDecl localVarDecl) {
super.visit(localVarDecl);
}
@Override
public void visit(MethodCall methodCall) {
out.append("(");
super.visit(methodCall);
out.append(")");
this.out.append("::");
methodCall.getType().accept(this);
}
@Override
public void visit(NewClass methodCall) {
super.visit(methodCall);
}
@Override
public void visit(NewArray newArray) {
super.visit(newArray);
}
@Override
public void visit(Receiver receiver) {
super.visit(receiver);
}
@Override
public void visit(Return aReturn) {
super.visit(aReturn);
}
@Override
public void visit(ReturnVoid aReturn) {
super.visit(aReturn);
}
@Override
public void visit(StaticClassName staticClassName) {
super.visit(staticClassName);
}
@Override
public void visit(Super aSuper) {
super.visit(aSuper);
}
@Override
public void visit(This aThis) {
out.append("(");
super.visit(aThis);
out.append(")");
this.out.append("::");
aThis.getType().accept(this);
}
@Override
public void visit(UnaryPlus unaryPlus) {
super.visit(unaryPlus);
}
@Override
public void visit(WhileStmt whileStmt) {
super.visit(whileStmt);
}
@Override
public void visit(Null aNull) {
super.visit(aNull);
}
@Override
public void visit(Literal literal) {
super.visit(literal);
}
}

View File

@ -1,6 +1,7 @@
package de.dhbwstuttgart.typecheck; package de.dhbwstuttgart.typecheck;
import de.dhbwstuttgart.parser.SyntaxTreeGenerator.GenericContext; import de.dhbwstuttgart.parser.SyntaxTreeGenerator.GenericContext;
//import jdk.nashorn.internal.ir.Node;
public class GenericTypeName extends JavaClassName { public class GenericTypeName extends JavaClassName {
private final static String DELIMITER = "%"; private final static String DELIMITER = "%";
@ -8,10 +9,10 @@ public class GenericTypeName extends JavaClassName {
private final JavaClassName parentClass; private final JavaClassName parentClass;
private final String methodName; private final String methodName;
public GenericTypeName(GenericContext parentClass, String name) { public GenericTypeName(GenericContext genericContext, String name) {
super(name); super(name);
this.parentClass = parentClass.parentClass; this.parentClass = genericContext.parentClass;
this.methodName = parentClass.parentMethod; this.methodName = genericContext.parentMethod;
} }
public String toString(){ public String toString(){
@ -19,4 +20,8 @@ public class GenericTypeName extends JavaClassName {
+ DELIMITER + methodName + DELIMITER + methodName
+ DELIMITER + super.toString(); + DELIMITER + super.toString();
} }
public String getShortName() {
return super.toString();
}
} }

View File

@ -0,0 +1,35 @@
package de.dhbwstuttgart.typedeployment;
import org.antlr.v4.runtime.Token;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class TypeInsert {
/**
* point wird hauptsächlich zur Anzeige einer Annotation im Eclipse-plugin benutzt.
*/
public final TypeInsertPoint point;
Set<TypeInsertPoint> inserts;
public TypeInsert(TypeInsertPoint point, Set<TypeInsertPoint> additionalPoints){
this.point = point;
inserts = additionalPoints;
}
public String insert(String intoSource){
String ret = intoSource;
List<TypeInsertPoint> offsets = new ArrayList<>();
for(TypeInsertPoint insertPoint : inserts){
ret = insertPoint.insert(ret, offsets);
offsets.add(insertPoint);
}
return ret;
}
public String getInsertString(){
return point.getInsertString();
}
}

View File

@ -1,51 +1,192 @@
package de.dhbwstuttgart.typedeployment; package de.dhbwstuttgart.typedeployment;
import de.dhbwstuttgart.exceptions.DebugException;
import de.dhbwstuttgart.exceptions.NotImplementedException; import de.dhbwstuttgart.exceptions.NotImplementedException;
import de.dhbwstuttgart.syntaxtree.*; import de.dhbwstuttgart.syntaxtree.*;
import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.*;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.ResultSet;
import de.dhbwstuttgart.typeinference.constraints.Pair;
import org.antlr.v4.runtime.Token;
import java.util.ArrayList; import java.lang.reflect.Type;
import java.util.List; import java.util.*;
/**
* TODO:
* Falls in Feldern Generics entstehen, dann werden diese als Klassenparameter eingesetzt
* Für die Instanzierung von Klassen kann man dann beispielsweise nur noch den Diamond-Operator verwenden
*
* Es müssen zu einem TPH alle in Beziehung stehenden Constraints gefunden werden
*
* Anmekung: Es wird nur ein RefType gleichzeitug eingesetzt.
* Steht dieser mit anderen Typen in Verbindung, so müssen diese nicht eingesetzt werden
* im Result set können nur TPHs mit <. Beziehung stehen
* Steht ein Typ A über TPHs mit anderen Typen B in Verbindung, so lassen sich diese auch im nächsten Durchgang
* inferieren, wenn A bereits eingesetzt wurde. Es werden dann eben zusätzliche Generics entstehen
*/
public class TypeInsertFactory { public class TypeInsertFactory {
public static List<TypeInsertPoint> createTypeInsertPoints(SourceFile forSourcefile, ResultSet withResults){ public static List<TypeInsert> createTypeInsertPoints(SourceFile forSourcefile, ResultSet withResults){
List<TypeInsertPoint> ret = new ArrayList<>(); List<TypeInsert> ret = new ArrayList<>();
for(ClassOrInterface cl : forSourcefile.getClasses()){ for(ClassOrInterface cl : forSourcefile.getClasses()){
//Felder: //Felder:
for(Field field : cl.getFieldDecl()){ for(Field field : cl.getFieldDecl()){
if(field.getType() instanceof TypePlaceholder){ if(field.getType() instanceof TypePlaceholder){
RefTypeOrTPHOrWildcardOrGeneric resolved = withResults.resolveType(field.getType()); for(Set<Pair> pairs : withResults.results)
String toInsert = getString(resolved) + " "; ret.add(createInsertPoints(
ret.add(new TypeInsertPoint(field.getType().getOffset(), toInsert)); field.getType(), field.getType().getOffset(), cl, null, pairs));
} }
} }
for(Method m : cl.getMethods()){ for(Method m : cl.getMethods()){
RefTypeOrTPHOrWildcardOrGeneric resolved = withResults.resolveType(m.getReturnType()); if(m.getReturnType() instanceof TypePlaceholder)for(Set<Pair> pairs : withResults.results) {
String toInsert = getString(resolved) + " "; ret.add(createInsertPoints(
ret.add(new TypeInsertPoint(m.getReturnType().getOffset(), toInsert)); m.getReturnType(), m.getReturnType().getOffset(), cl, m, pairs));
}
for(FormalParameter param : m.getParameterList().getFormalparalist()){ for(FormalParameter param : m.getParameterList().getFormalparalist()){
resolved = withResults.resolveType(param.getType()); if(param.getType() instanceof TypePlaceholder)for(Set<Pair> pairs : withResults.results)
toInsert = getString(resolved) + " "; ret.add(createInsertPoints(
ret.add(new TypeInsertPoint(param.getType().getOffset(), toInsert)); param.getType(), param.getType().getOffset(), cl, m, pairs));
} }
} }
} }
return ret; return ret;
} }
private static String getString(RefTypeOrTPHOrWildcardOrGeneric resolved) { private static TypeInsert createInsertPoints(RefTypeOrTPHOrWildcardOrGeneric type, Token offset, ClassOrInterface cl, Method m,
if(resolved instanceof RefType){ Set<Pair> pairs) {
return ((RefType) resolved).getName().toString(); Set<TypeInsertPoint> ret = new HashSet<>();
}else if(resolved instanceof TypePlaceholder){ TypeInsertPoint insertPoint = null;
return ((TypePlaceholder) resolved).getName(); Set<TypePlaceholder> additionalInserts = new HashSet<>();
}else{ for (Pair pair : pairs) {
throw new NotImplementedException(); RefTypeOrTPHOrWildcardOrGeneric relatedType = null;
if (pair.TA1.equals(type)) {
relatedType = pair.TA2;
} else if (pair.TA2.equals(type)) {
relatedType = pair.TA1;
}
if (relatedType != null) {
//Es wurde ein direkter Treffer gefunden:
if (pair.OperatorEqual()) { //resolved ist vom Typ RefType
RefType resolved = ((RefType) relatedType);
String insert = createInsertString(resolved, additionalInserts);
insertPoint = new TypeInsertPoint(offset, insert);
break;
} else { //Ansonsten ist es ein TPH
//additionalInserts.add((TypePlaceholder) relatedType); //Sollte nicht notwendig sein
//Dann wurde er nicht aufgelöst und es kann nur der TPH als Generic eingesetzt werden:
insertPoint = new TypeInsertPoint(offset, ((TypePlaceholder) type).getName());
break;
}
}
} }
if(insertPoint == null){ //Dann muss es ein TPH sein, welcher nicht im Result auftaucht
insertPoint = new TypeInsertPoint(offset, ((TypePlaceholder) type).getName());
additionalInserts.add(((TypePlaceholder) type));
}
//Alle Bounds finden:
Set<Pair> newGenerics = new HashSet<>();
boolean added = true;
while(added){
added = false;
for(Pair pair : pairs){
if (additionalInserts.contains(pair.TA1) || additionalInserts.contains(pair.TA2)) {
newGenerics.add(pair);
added |= additionalInserts.add((TypePlaceholder) pair.TA1);
added |= additionalInserts.add((TypePlaceholder) pair.TA2);
}
}
}
//Alle TPHs die man noch als Generics anfügen muss einsetzen:
additionalInserts.clear();
for(Pair subtypings : newGenerics){
if(additionalInserts.contains(subtypings.TA1)){
additionalInserts.remove(subtypings.TA1);
}
}
for(TypePlaceholder tph : additionalInserts){
newGenerics.add(new Pair(tph, null));
}
ret.add(createGenericInsert(newGenerics, cl, m));
//return ret;
return new TypeInsert(insertPoint, ret);
}
private static String createInsertString(RefType resolved, Set<TypePlaceholder> additionalInserts) {
String insert = resolved.getName().toString();
if(resolved.getParaList().size() > 0){
insert += "<";
Iterator<RefTypeOrTPHOrWildcardOrGeneric> iterator = resolved.getParaList().iterator();
while(iterator.hasNext()){
RefTypeOrTPHOrWildcardOrGeneric typeParam = iterator.next();
if(typeParam instanceof TypePlaceholder){
insert += ((TypePlaceholder) typeParam).getName();
additionalInserts.add((TypePlaceholder) typeParam);
}else if(typeParam instanceof RefType) {
insert += createInsertString((RefType) typeParam, additionalInserts);
}else if(typeParam instanceof SuperWildcardType){
insert += "? super " + createInsertString(((SuperWildcardType) typeParam).getInnerType(), additionalInserts);
}else if(typeParam instanceof ExtendsWildcardType){
insert += "? extends " + createInsertString(((ExtendsWildcardType) typeParam).getInnerType(), additionalInserts);
}else throw new NotImplementedException();
if(iterator.hasNext())insert += ", ";
}
insert += ">";
}
return insert;
}
private static TypeInsertPoint createGenericInsert(Set<Pair> toInsert, ClassOrInterface cl, Method m){
//Momentan wird Methode ignoriert. Parameter werden immer als Klassenparameter angefügt:
//Offset zum Einstzen bestimmen:
Token offset;
String insert = "";
String end;
if(cl.getGenerics().iterator().hasNext()){
//offset = cl.getGenerics().iterator().next().getOffset();
offset = cl.getGenerics().getOffset();
end=",";
}else{
offset = cl.getGenerics().getOffset();
insert += "<";
end = ">";
}
//Alle einzusetzenden Generics und deren Bounds bestimmen:
HashMap<TypePlaceholder, HashSet<TypePlaceholder>> genericsAndBounds = new HashMap<>();
for(Pair p : toInsert){
if(!genericsAndBounds.containsKey(p.TA1)){
genericsAndBounds.put((TypePlaceholder) p.TA1, new HashSet<>());
}
if(p.TA2 != null){
genericsAndBounds.get(p.TA1).add((TypePlaceholder) p.TA2);
if(!genericsAndBounds.containsKey(p.TA2)){
genericsAndBounds.put((TypePlaceholder) p.TA2, new HashSet<>());
}
}
}
//String zum Einsetzen (Generics mit bounds) generieren:
Iterator<TypePlaceholder> it = genericsAndBounds.keySet().iterator();
if(! it.hasNext())return new TypeInsertPoint(offset, "");
while(it.hasNext()){
TypePlaceholder tph = it.next();
insert += tph.getName();
Set<TypePlaceholder> bounds = genericsAndBounds.get(tph);
if(bounds.size() > 0){
insert += " extends ";
Iterator<TypePlaceholder> boundIt = bounds.iterator();
while(boundIt.hasNext()){
TypePlaceholder bound = boundIt.next();
insert += bound.getName();
if(boundIt.hasNext())insert += " & ";
}
}
if(it.hasNext())insert+=",";
}
return new TypeInsertPoint(offset, insert + end);
} }
} }

View File

@ -2,16 +2,27 @@ package de.dhbwstuttgart.typedeployment;
import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Token;
import java.util.List;
import java.util.stream.Collectors;
public class TypeInsertPoint { public class TypeInsertPoint {
Token point; public final Token point;
private String insertString; private String insertString;
public TypeInsertPoint(Token point, String toInsert){ public TypeInsertPoint(Token point, String toInsert){
this.point = point; this.point = point;
this.insertString = toInsert; this.insertString = (toInsert.length()>1) ? toInsert + " " : toInsert;
} }
public String insert(String intoSource){ public String insert(String intoSource, List<TypeInsertPoint> additionalOffset){
return new StringBuilder(intoSource).insert(point.getStartIndex(), insertString).toString(); int offset = additionalOffset.stream().filter((token ->
//token.point.getLine() != point.getLine() && token.point.getCharPositionInLine() <= point.getCharPositionInLine()))
token.point.getStartIndex() <= point.getStartIndex()))
.mapToInt((typeInsertPoint -> typeInsertPoint.insertString.length())).sum();
return new StringBuilder(intoSource).insert(point.getStartIndex()+offset, insertString).toString();
}
public String getInsertString() {
return insertString;
} }
} }

View File

@ -7,30 +7,30 @@ import de.dhbwstuttgart.typeinference.constraints.Pair;
import de.dhbwstuttgart.typeinference.unify.model.PairOperator; import de.dhbwstuttgart.typeinference.unify.model.PairOperator;
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair; import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
import java.util.ArrayList;
import java.util.List;
import java.util.Set; import java.util.Set;
public class ResultSet { public class ResultSet {
Set<Set<Pair>> results; public final Set<Set<Pair>> results;
public ResultSet(Set<Set<Pair>> results){ public ResultSet(Set<Set<Pair>> results){
this.results = results; this.results = results;
} }
public RefTypeOrTPHOrWildcardOrGeneric resolveType(RefTypeOrTPHOrWildcardOrGeneric type) { public List<Pair> resolveType(RefTypeOrTPHOrWildcardOrGeneric type) {
/*//Probleme: /*//Probleme:
* Es müssen teilweise mehrere TPH eingesetzt werden * Es müssen teilweise mehrere TPH eingesetzt werden
* Es werden alle eingesetzt, welch in der Kette stehen! * Es werden alle eingesetzt, welch in der Kette stehen!
* TPHs müssen zu eindeutigen Namen aufgelöst werden * TPHs müssen zu eindeutigen Namen aufgelöst werden
*/ */
final RefTypeOrTPHOrWildcardOrGeneric ret; final List<Pair> ret = new ArrayList<>();
for(Set<Pair> pairs : results)for(Pair pair : pairs){ for(Set<Pair> pairs : results)for(Pair pair : pairs){
if(pair.OperatorEqual()){ //type ist vom Typ TypePlaceholder //if(pair.OperatorEqual()){ //type ist vom Typ TypePlaceholder
if(pair.TA1.equals(type)){ if(pair.TA1.equals(type) || pair.TA2.equals(type)){
return pair.TA2; ret.add(pair);
}else if(pair.TA2.equals(type)){
return pair.TA1;
}
} }
//}
} }
return type; return ret;
} }
} }

View File

@ -14,7 +14,7 @@ import java.util.List;
public class ConstraintsFactory { public class ConstraintsFactory {
public static Pair createPair(RefTypeOrTPHOrWildcardOrGeneric t1, RefTypeOrTPHOrWildcardOrGeneric t2, PairOperator equalsdot, TypeInferenceBlockInformation info){ public static Pair createPair(RefTypeOrTPHOrWildcardOrGeneric t1, RefTypeOrTPHOrWildcardOrGeneric t2, PairOperator equalsdot, TypeInferenceBlockInformation info){
//Check whether Generics are in the same class: //Check whether Generics are in the same class:
return new Pair(checkGeneric(t1, info), checkGeneric(t2, info)); return new Pair(checkGeneric(t1, info), checkGeneric(t2, info), equalsdot);
} }
public static Pair createPair(RefTypeOrTPHOrWildcardOrGeneric t1, public static Pair createPair(RefTypeOrTPHOrWildcardOrGeneric t1,
RefTypeOrTPHOrWildcardOrGeneric t2, TypeInferenceBlockInformation info){ RefTypeOrTPHOrWildcardOrGeneric t2, TypeInferenceBlockInformation info){

View File

@ -1,13 +1,17 @@
package de.dhbwstuttgart.typeinference.typeAlgo; package de.dhbwstuttgart.typeinference.typeAlgo;
//import com.sun.org.apache.xpath.internal.Arg;
import de.dhbwstuttgart.exceptions.NotImplementedException; import de.dhbwstuttgart.exceptions.NotImplementedException;
import de.dhbwstuttgart.exceptions.TypeinferenceException; import de.dhbwstuttgart.exceptions.TypeinferenceException;
import de.dhbwstuttgart.parser.NullToken;
import de.dhbwstuttgart.syntaxtree.*; import de.dhbwstuttgart.syntaxtree.*;
import de.dhbwstuttgart.syntaxtree.statement.*; import de.dhbwstuttgart.syntaxtree.statement.*;
import de.dhbwstuttgart.syntaxtree.statement.literal.Literal; import de.dhbwstuttgart.syntaxtree.statement.literal.Literal;
import de.dhbwstuttgart.syntaxtree.statement.literal.Null; import de.dhbwstuttgart.syntaxtree.statement.literal.Null;
import de.dhbwstuttgart.syntaxtree.type.FunN;
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.TypePlaceholder;
import de.dhbwstuttgart.typeinference.assumptions.FieldAssumption; import de.dhbwstuttgart.typeinference.assumptions.FieldAssumption;
import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption; import de.dhbwstuttgart.typeinference.assumptions.MethodAssumption;
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation; import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
@ -17,10 +21,8 @@ import de.dhbwstuttgart.typeinference.constraints.ConstraintsFactory;
import de.dhbwstuttgart.typeinference.constraints.Pair; import de.dhbwstuttgart.typeinference.constraints.Pair;
import de.dhbwstuttgart.typeinference.unify.model.PairOperator; import de.dhbwstuttgart.typeinference.unify.model.PairOperator;
import java.util.ArrayList; import java.util.*;
import java.util.HashSet; import java.util.stream.Collectors;
import java.util.List;
import java.util.Set;
public class TYPE implements StatementVisitor{ public class TYPE implements StatementVisitor{
@ -37,6 +39,18 @@ public class TYPE implements StatementVisitor{
@Override @Override
public void visit(LambdaExpression lambdaExpression) { public void visit(LambdaExpression lambdaExpression) {
TypePlaceholder tphRetType = TypePlaceholder.fresh(new NullToken());
List<RefTypeOrTPHOrWildcardOrGeneric> lambdaParams = lambdaExpression.params.getFormalparalist().stream().map((formalParameter -> formalParameter.getType())).collect(Collectors.toList());
//lambdaParams.add(tphRetType);
lambdaParams.add(0,tphRetType);
constraintsSet.addUndConstraint(
ConstraintsFactory.createPair(lambdaExpression.getType(),
new FunN(lambdaParams),PairOperator.EQUALSDOT,info));
constraintsSet.addUndConstraint(
ConstraintsFactory.createPair(lambdaExpression.getReturnType(),
tphRetType,info));
//Constraints des Bodys generieren:
TYPE lambdaScope = new TYPE(new TypeInferenceBlockInformation(info, lambdaExpression)); TYPE lambdaScope = new TYPE(new TypeInferenceBlockInformation(info, lambdaExpression));
lambdaExpression.methodBody.accept(lambdaScope); lambdaExpression.methodBody.accept(lambdaScope);
constraintsSet.addAll(lambdaScope.getConstraints()); constraintsSet.addAll(lambdaScope.getConstraints());
@ -104,11 +118,6 @@ public class TYPE implements StatementVisitor{
throw new NotImplementedException(); throw new NotImplementedException();
} }
@Override
public void visit(InstVar instVar) {
throw new NotImplementedException();
}
@Override @Override
public void visit(LocalVar localVar) { public void visit(LocalVar localVar) {
// Es werden nur bei Feldvariablen Constraints generiert. Lokale Variablen sind eindeutig // Es werden nur bei Feldvariablen Constraints generiert. Lokale Variablen sind eindeutig
@ -116,7 +125,7 @@ public class TYPE implements StatementVisitor{
@Override @Override
public void visit(LocalVarDecl localVarDecl) { public void visit(LocalVarDecl localVarDecl) {
throw new NotImplementedException(); //Hier ist nichts zu tun. Allen lokalen Variablen bekommen beim parsen schon den korrekten Typ
} }
@Override @Override
@ -162,7 +171,7 @@ public class TYPE implements StatementVisitor{
public void visit(Return returnExpr) { public void visit(Return returnExpr) {
returnExpr.retexpr.accept(this); returnExpr.retexpr.accept(this);
constraintsSet.addUndConstraint(ConstraintsFactory.createPair( constraintsSet.addUndConstraint(ConstraintsFactory.createPair(
returnExpr.getType(),info.getCurrentTypeScope().getReturnType(), info)); returnExpr.getType(),info.getCurrentTypeScope().getReturnType(), PairOperator.EQUALSDOT, info));
} }
@Override @Override
@ -195,11 +204,6 @@ public class TYPE implements StatementVisitor{
throw new NotImplementedException(); throw new NotImplementedException();
} }
@Override
public void visit(LocalVarBunchDeclaration localVarBunchDeclaration) {
throw new NotImplementedException();
}
@Override @Override
public void visit(Null aNull) { public void visit(Null aNull) {
throw new NotImplementedException(); throw new NotImplementedException();
@ -217,7 +221,7 @@ public class TYPE implements StatementVisitor{
protected Constraint<Pair> generateConstraint(MethodCall forMethod, MethodAssumption assumption, TypeInferenceBlockInformation info){ protected Constraint<Pair> generateConstraint(MethodCall forMethod, MethodAssumption assumption, TypeInferenceBlockInformation info){
Constraint methodConstraint = new Constraint(); Constraint methodConstraint = new Constraint();
methodConstraint.add(ConstraintsFactory.createPair(forMethod.receiver.getType(), assumption.getReceiverType(), PairOperator.SMALLERDOT, info)); methodConstraint.add(ConstraintsFactory.createPair(forMethod.receiver.getType(), assumption.getReceiverType(), PairOperator.SMALLERDOT, info));
methodConstraint.add(ConstraintsFactory.createPair(assumption.getReturnType(), forMethod.getType(), PairOperator.SMALLERDOT, info)); methodConstraint.add(ConstraintsFactory.createPair(assumption.getReturnType(), forMethod.getType(), PairOperator.EQUALSDOT, info));
methodConstraint.addAll(generateParameterConstraints(forMethod, assumption, info)); methodConstraint.addAll(generateParameterConstraints(forMethod, assumption, info));
return methodConstraint; return methodConstraint;
} }
@ -225,19 +229,26 @@ public class TYPE implements StatementVisitor{
protected Set<Pair> generateParameterConstraints(MethodCall foMethod, MethodAssumption assumption, TypeInferenceBlockInformation info) { protected Set<Pair> generateParameterConstraints(MethodCall foMethod, MethodAssumption assumption, TypeInferenceBlockInformation info) {
Set<Pair> ret = new HashSet<>(); Set<Pair> ret = new HashSet<>();
for(int i = 0;i<foMethod.arglist.getArguments().size();i++){ for(int i = 0;i<foMethod.arglist.getArguments().size();i++){
ret.add(ConstraintsFactory.createPair(assumption.getArgTypes().get(i), ret.add(ConstraintsFactory.createPair(foMethod.arglist.getArguments().get(i).getType(),
foMethod.arglist.getArguments().get(i).getType(), PairOperator.SMALLERDOT, info)); assumption.getArgTypes().get(i), PairOperator.SMALLERDOT, info));
} }
return ret; return ret;
} }
public static List<MethodAssumption> getMethods(String name, ArgumentList arglist, TypeInferenceBlockInformation info) { public static List<MethodAssumption> getMethods(String name, int numArgs, TypeInferenceBlockInformation info) {
List<MethodAssumption> ret = new ArrayList<>(); List<MethodAssumption> ret = new ArrayList<>();
if(name.equals("apply")){
List<RefTypeOrTPHOrWildcardOrGeneric> funNParams = new ArrayList<>();
for(int i = 0; i< numArgs + 1 ; i++){
funNParams.add(TypePlaceholder.fresh(new NullToken()));
}
ret.add(new MethodAssumption(new FunN(funNParams), funNParams.get(0), funNParams.subList(1, funNParams.size())));
}
for(ClassOrInterface cl : info.getAvailableClasses()){ for(ClassOrInterface cl : info.getAvailableClasses()){
for(Method m : cl.getMethods()){ for(Method m : cl.getMethods()){
if(m.getName().equals(name) && if(m.getName().equals(name) &&
m.getParameterList().getFormalparalist().size() == arglist.getArguments().size()){ m.getParameterList().getFormalparalist().size() == numArgs){
RefTypeOrTPHOrWildcardOrGeneric retType = info.checkGTV(m.getType()); RefTypeOrTPHOrWildcardOrGeneric retType = info.checkGTV(m.getType());
ret.add(new MethodAssumption(cl.getType(), retType, convertParams(m.getParameterList(),info))); ret.add(new MethodAssumption(cl.getType(), retType, convertParams(m.getParameterList(),info)));
@ -247,7 +258,11 @@ public class TYPE implements StatementVisitor{
return ret; return ret;
} }
protected static List<RefTypeOrTPHOrWildcardOrGeneric> convertParams(ParameterList parameterList, TypeInferenceBlockInformation info){ public static List<MethodAssumption> getMethods(String name, ArgumentList arglist, TypeInferenceBlockInformation info) {
return getMethods(name, arglist.getArguments().size(), info);
}
protected static List<RefTypeOrTPHOrWildcardOrGeneric> convertParams(ParameterList parameterList, TypeInferenceBlockInformation info){
List<RefTypeOrTPHOrWildcardOrGeneric> params = new ArrayList<>(); List<RefTypeOrTPHOrWildcardOrGeneric> params = new ArrayList<>();
for(FormalParameter fp : parameterList.getFormalparalist()){ for(FormalParameter fp : parameterList.getFormalparalist()){
params.add(info.checkGTV(fp.getType())); params.add(info.checkGTV(fp.getType()));

View File

@ -1,6 +1,6 @@
package astfactory; package astfactory;
import javafx.collections.ObservableList; //import javafx.collections.ObservableList;
import org.junit.Test; import org.junit.Test;
import java.lang.reflect.ParameterizedType; import java.lang.reflect.ParameterizedType;

13
test/javFiles/Faculty.jav Normal file
View File

@ -0,0 +1,13 @@
class Faculty {
Integer mul(Integer x, Integer y) {
return x;
}
m () {
auto fact = (Integer x) -> {
return mul(x, fact.apply(x));
};
return fact;
}
}

View File

@ -1,20 +1,18 @@
class Lambda{ class Lambda{
String var;
methode(){ methode(){
return () -> (f) -> { return ((f) -> f);
f.apply(this, var);
return var;
};
} }
}
/*
interface Fun0<A>{
A apply();
} }
interface Fun1<A,B>{ interface Fun1<A,B>{
A apply(B b); A apply(B b);
} }
*/
interface Fun2<A,B,C>{ interface Fun2<A,B,C>{
A apply(B b, C c); A apply(B b, C c);
} }

32
test/javFiles/Lambda2.jav Normal file
View File

@ -0,0 +1,32 @@
public class Lambda2
{
public static void main(List<String> args){
auto listOfStrings = new List<String>();
auto listOfObjects;
listOfObjects = map(listOfStrings, (a) -> a);
}
public map(a , b){
b.apply(a);
return a;
}
/*
public static <I,O> List<O> map(List<I> input, Function<I,O> func) {
List<O> output;
output = new List<O>();
output.add(func.apply(input.get()));
return output;
}
*/
}
class List<A>{
A get();
void add(A);
}
class Function<A,B>{
B apply(A a);
}

23
test/javFiles/Lambda3.jav Normal file
View File

@ -0,0 +1,23 @@
public class Lambda2
{
/*
public static <A> List<A> map(List<? extends A> input,
Function<? super A, ? extends A> func){
input.add(func.apply(input.get()));
}
*/
public map(input,func){
input.add(func.apply(input.get()));
return map(new List<String>(), func);
}
}
class List<A>{
A get();
void add(A);
}
class Function<A,B>{
B apply(A a);
}

View File

@ -0,0 +1,12 @@
class mathStruc<A> {
mathStruc(A a) { }
A model(){ A a; return a; }
methode(){
auto innerOp = o -> ms ->
new mathStruc<A>(o.apply(this.model(),ms.model()));
return innerOp;
}
}

View File

@ -1,8 +1,16 @@
package typeinference; package typeinference;
import de.dhbwstuttgart.core.JavaTXCompiler; import de.dhbwstuttgart.core.JavaTXCompiler;
import de.dhbwstuttgart.exceptions.DebugException;
import de.dhbwstuttgart.parser.ClassNotFoundException; import de.dhbwstuttgart.parser.ClassNotFoundException;
import de.dhbwstuttgart.syntaxtree.SourceFile;
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
import de.dhbwstuttgart.syntaxtree.visual.ASTPrinter;
import de.dhbwstuttgart.syntaxtree.visual.ASTTypePrinter;
import de.dhbwstuttgart.syntaxtree.visual.OutputGenerator;
import de.dhbwstuttgart.typedeployment.TypeInsert;
import de.dhbwstuttgart.typedeployment.TypeInsertFactory;
import de.dhbwstuttgart.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typedeployment.TypeInsertPoint;
import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.ResultSet;
import org.junit.Test; import org.junit.Test;
@ -13,29 +21,37 @@ import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import static org.junit.Assert.*; import static org.junit.Assert.*;
public class JavaTXCompilerTest { public class JavaTXCompilerTest extends JavaTXCompiler {
private static final String rootDirectory = System.getProperty("user.dir")+"/test/javFiles/"; private static final String rootDirectory = System.getProperty("user.dir")+"/test/javFiles/";
private static final List<File> filesToTest = new ArrayList<>();
@Test @Test
public void test() throws IOException, ClassNotFoundException { public void test() throws IOException, ClassNotFoundException {
JavaTXCompiler compiler = new JavaTXCompiler(); //filesToTest.add(new File(rootDirectory+"Faculty.jav"));
compiler.parse(new File(rootDirectory+"Vector.jav")); filesToTest.add(new File(rootDirectory+"mathStruc.jav"));
//compiler.parse(new File(rootDirectory+"Generics.jav")); //filesToTest.add(new File(rootDirectory+"Lambda.jav"));
//compiler.parse(new File(rootDirectory+"MethodsEasy.jav")); //filesToTest.add(new File(rootDirectory+"Lambda2.jav"));
//compiler.parse(new File(rootDirectory+"Lambda.jav")); //filesToTest.add(new File(rootDirectory+"Lambda3.jav"));
//compiler.parse(new File(rootDirectory+"Matrix.jav")); //filesToTest.add(new File(rootDirectory+"Vector.jav"));
//filesToTest.add(new File(rootDirectory+"Generics.jav"));
List<TypeInsertPoint> result = compiler.getTypeInserts(new File(rootDirectory+"Vector.jav")); //filesToTest.add(new File(rootDirectory+"MethodsEasy.jav"));
String content = readFile(rootDirectory+"Vector.jav", StandardCharsets.UTF_8); //filesToTest.add(new File(rootDirectory+"Matrix.jav"));
for(TypeInsertPoint tip : result){ for(File f : filesToTest){
System.out.println(tip.insert(content)); SourceFile sf = this.parse(f);
System.out.println(ASTTypePrinter.print(this.sourceFiles.get(sourceFiles.size()-1)));
List<TypeInsert> result = TypeInsertFactory.createTypeInsertPoints(sf, this.typeInference());
String content = readFile(f.getPath(), StandardCharsets.UTF_8);
for(TypeInsert tip : result){
System.out.println(tip.insert(content));
}
} }
} }
static String readFile(String path, Charset encoding) static String readFile(String path, Charset encoding)
@ -44,4 +60,5 @@ public class JavaTXCompilerTest {
byte[] encoded = Files.readAllBytes(Paths.get(path)); byte[] encoded = Files.readAllBytes(Paths.get(path));
return new String(encoded, encoding); return new String(encoded, encoding);
} }
} }